Bug#839880: proftpd-basic: proftpd server instance crashed with signal 11

Олег Мороз oleg.moroz at mcc.vniiem.ru
Wed Jan 3 08:39:46 UTC 2018


So sorry for delay, i'm on vacation.

I believe that problem is in mod_sftp.so

part of proftpd.log stack trace
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [5] /usr/lib/proftpd/mod_sftp.so(+0x3c7ef) 
[0x7f5e93b9d7ef]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [6] 
/usr/lib/proftpd/mod_sftp.so(sftp_auth_handle+0x62) [0x7f5e93b9dc31]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [7] 
/usr/lib/proftpd/mod_sftp.so(sftp_ssh2_packet_handle+0x363) [0x7f5e93b7c9ad]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [8] /usr/lib/proftpd/mod_sftp.so(+0xfa07) 
[0x7f5e93b70a07]


# addr2line -e /usr/lib/proftpd/mod_sftp.so 0x3c7ef
./contrib/mod_sftp/auth.c:1312


# addr2line -e /usr/lib/proftpd/mod_sftp.so +0xfa07
./contrib/mod_sftp/mod_sftp.c:247


unfortunatelly i cant use 64 bit addresses like 0x7f5e93b9d7ef , because 
in that case addr2line gives ??:0




--- logs ---

cat proftpd.log
2018-01-03 11:29:00,728 sim-ng-data proftpd[29204] sim-ng-data: ProFTPD 
1.3.5e (maint) (built Fri Jul 7 2017 10:06:53 UTC) standalone mode STARTUP
2018-01-03 11:29:26,276 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): SSH2 session opened.
2018-01-03 08:29:28,666 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): USER ftp: Login successful
2018-01-03 08:29:28,667 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): ProFTPD terminating (signal 11)
2018-01-03 08:29:28,667 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): SSH2 session closed.
2018-01-03 08:29:28,667 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): -----BEGIN STACK TRACE-----
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [0] /usr/sbin/proftpd(+0x1f3b0) [0x558dcafec3b0]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [1] /usr/sbin/proftpd(+0x1f3b0) [0x558dcafec3b0]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [2] /usr/sbin/proftpd(palloc+0x37) 
[0x558dcafec4b2]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [3] /usr/sbin/proftpd(pcalloc+0x32) 
[0x558dcafec547]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [4] /usr/sbin/proftpd(pr_response_add+0xee) 
[0x558dcb016e25]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [5] /usr/lib/proftpd/mod_sftp.so(+0x3c7ef) 
[0x7f5e93b9d7ef]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [6] 
/usr/lib/proftpd/mod_sftp.so(sftp_auth_handle+0x62) [0x7f5e93b9dc31]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [7] 
/usr/lib/proftpd/mod_sftp.so(sftp_ssh2_packet_handle+0x363) [0x7f5e93b7c9ad]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [8] /usr/lib/proftpd/mod_sftp.so(+0xfa07) 
[0x7f5e93b70a07]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [9] /usr/sbin/proftpd(+0x19ee3) [0x558dcafe6ee3]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [10] /usr/sbin/proftpd(+0x1a706) [0x558dcafe7706]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [11] /usr/sbin/proftpd(+0x1bf2f) [0x558dcafe8f2f]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [12] /usr/sbin/proftpd(main+0x94b) 
[0x558dcafe9ce3]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [13] 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f5e974a1561]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): [14] /usr/sbin/proftpd(_start+0x2a) 
[0x558dcafe3daa]
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): -----END STACK TRACE-----
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): ProFTPD terminating (signal 11)
2018-01-03 08:29:28,674 sim-ng-data proftpd[29225] sim-ng-data 
(OpenWrt[192.168.3.180]): SSH2 session closed.



cat sftp.log
2018-01-03 11:29:26,276 mod_sftp/0.9.9[29225]: error using DisplayLogin 
'welcome.msg': No such file or directory
2018-01-03 11:29:26,277 mod_sftp/0.9.9[29225]: sent server version 
'SSH-2.0-mod_sftp/0.9.9'
2018-01-03 11:29:26,277 mod_sftp/0.9.9[29225]: received client version 
'SSH-2.0-FileZilla_3.29.0'
2018-01-03 11:29:26,277 mod_sftp/0.9.9[29225]: handling connection from 
SSH2 client 'FileZilla_3.29.0'
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session key exchange: 
ecdh-sha2-nistp256
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session server 
hostkey: ssh-rsa
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session 
client-to-server encryption: aes256-ctr
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session 
server-to-client encryption: aes256-ctr
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session 
client-to-server MAC: hmac-sha2-256
2018-01-03 11:29:26,360 mod_sftp/0.9.9[29225]:  + Session 
server-to-client MAC: hmac-sha2-256
2018-01-03 11:29:26,361 mod_sftp/0.9.9[29225]:  + Session 
client-to-server compression: none
2018-01-03 11:29:26,361 mod_sftp/0.9.9[29225]:  + Session 
server-to-client compression: none
2018-01-03 11:29:28,398 mod_sftp/0.9.9[29225]: sending acceptable 
userauth methods: keyboard-interactive,password
2018-01-03 11:29:28,644 mod_sftp/0.9.9[29225]: sending userauth banner
2018-01-03 11:29:28,644 mod_sftp/0.9.9[29225]: sending userauth banner
2018-01-03 08:29:28,666 mod_sftp/0.9.9[29225]: sending userauth success
2018-01-03 08:29:28,666 mod_sftp/0.9.9[29225]: user 'ftp' authenticated 
via 'keyboard-interactive' method




30.12.2017 12:47, Hilmar Preuße пишет:
> On 29.12.2017 23:04, Hilmar Preuße wrote:
>
> Hi Олег,
>
> could you please attach both log files proftpd.log & sftp.log showing
> the crashes.
>
> Hilmar
>
>> On 28.12.2017 14:53, Hilmar Preuße wrote:
>>
>> Добры бечер Олег,
>>
>> On my system the addr2line command gives only useful results if I use
>> the numbers in (), like this. At least output below makes sense to me.
>> What does your addr2line returns?
>>
>> hille at amd64-sid:~$ addr2line -e /usr/sbin/proftpd 0x55e39fd633b0
>> ??:0
>> hille at amd64-sid:~$ addr2line -e /usr/sbin/proftpd 0x1f3b0
>> ./src/pool.c:546
>>
>> Hilmar
>>
>>> Hi Олег,
>>>
>>> did to try to run addr2line as described on [1]? Does is print something
>>> useful. The command is provided by package binutils.
>>>
>>> Hilmar
>>>
>>> [1] http://www.proftpd.org/docs/howto/Compiling.html
>>>
>>>> Got some positive results
>>>>
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): -----BEGIN STACK TRACE-----
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [0] /usr/sbin/proftpd(+0x1f3b0)
>>>> [0x55e39fd633b0]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [1] /usr/sbin/proftpd(+0x1f3b0)
>>>> [0x55e39fd633b0]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [2] /usr/sbin/proftpd(palloc+0x37)
>>>> [0x55e39fd634b2]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [3] /usr/sbin/proftpd(pcalloc+0x32)
>>>> [0x55e39fd63547]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [4]
>>>> /usr/sbin/proftpd(pr_response_add+0xee) [0x55e39fd8de25]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [5] /usr/lib/proftpd/mod_sftp.so(+0x3c7ef)
>>>> [0x7f04249dd7ef]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [6]
>>>> /usr/lib/proftpd/mod_sftp.so(sftp_auth_handle+0x62) [0x7f04249ddc31]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [7]
>>>> /usr/lib/proftpd/mod_sftp.so(sftp_ssh2_packet_handle+0x363)
>>>> [0x7f04249bc9ad]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [8] /usr/lib/proftpd/mod_sftp.so(+0xfa07)
>>>> [0x7f04249b0a07]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [9] /usr/sbin/proftpd(+0x19ee3)
>>>> [0x55e39fd5dee3]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [10] /usr/sbin/proftpd(+0x1a706)
>>>> [0x55e39fd5e706]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [11] /usr/sbin/proftpd(+0x1bf2f)
>>>> [0x55e39fd5ff2f]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [12] /usr/sbin/proftpd(main+0x94b)
>>>> [0x55e39fd60ce3]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [13]
>>>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f04282e1561]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): [14] /usr/sbin/proftpd(_start+0x2a)
>>>> [0x55e39fd5adaa]
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): -----END STACK TRACE-----
>>>> 2017-12-28 07:32:21,761 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): ProFTPD terminating (signal 11)
>>>> 2017-12-28 07:32:21,762 sim-ng-data proftpd[26614] sim-ng-data
>>>> (PG10.local[192.168.3.17]): SSH2 session closed.
>>>>
>>>>
>>>> 28.12.2017 0:09, Hilmar Preuße пишет:
>>>>> On 26.12.2017 09:41, Мороз Олег wrote:
>>>>>
>>>>> Hi Олег,
>>>>>
>>>>>> Have made changes in
>>>>>>
>>>>>> /etc/security/limits.d/core_dump.conf
>>>>>>
>>>>>> then set path to save code dumps into /tmp
>>>>>>
>>>>>> vniiem at sim-ng-data /tmp % /sbin/sysctl -a -r kernel.core
>>>>>> kernel.core_pattern = /tmp/core.%e.%p.%t
>>>>>> kernel.core_pipe_limit = 0
>>>>>> kernel.core_uses_pid = 0
>>>>>>
>>>>>> Then relogin and reinstall proftpd, tried to login to ftp , but no
>>>>>> core.dump was generated
>>>>>>
>>>>> So, proftpd seems to trap the SIGSEGV (sig11) and performs a grace
>>>>> shutdown upon SIG11. I've found [1] giving some hints to debug crash
>>>>> problems. I've put debug binaries using --enable-devel=stacktrace on
>>>>> [2]. I've crashed the binaries using a SIGSEGV and found a stack trace
>>>>> in /var/log/proftpd/proftpd.log:
>>>>>
>>>>> 2017-12-27 21:51:07,528 amd64-sid proftpd[23112] amd64-sid: -----BEGIN
>>>>> STACK TRACE-----
>>>>> 2017-12-27 21:51:07,528 amd64-sid proftpd[23112] amd64-sid: [0]
>>>>> /lib/x86_64-linux-gnu/libc.so.6(__select+0x13) [0x7fd99e1c3cc3]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [1]
>>>>> /lib/x86_64-linux-gnu/libc.so.6(__select+0x13) [0x7fd99e1c3cc3]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [2]
>>>>> /usr/sbin/proftpd(+0x1a2d0) [0x5559bc50c2d0]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [3]
>>>>> /usr/sbin/proftpd(+0x1bf2f) [0x5559bc50df2f]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [4]
>>>>> /usr/sbin/proftpd(main+0x94b) [0x5559bc50ece3]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [5]
>>>>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fd99e0ff561]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: [6]
>>>>> /usr/sbin/proftpd(_start+0x2a) [0x5559bc508daa]
>>>>> 2017-12-27 21:51:07,529 amd64-sid proftpd[23112] amd64-sid: -----END
>>>>> STACK TRACE-----
>>>>>
>>>>> Please install the binary, the stack trace should at least show us if
>>>>> the problematic code is in proftp or anywhere else.
>>>>> The addr2line directions in [1] did not help me, I always got "??:0". At
>>>>> least the stack trace should be a basis to issue a bug @upstream.
>>>>>
>>>>> Many thanks for help!
>>>>>
>>>>> Hilmar
>>>>>
>>>>> [1] http://www.proftpd.org/docs/howto/Compiling.html
>>>>> [2] https://freeshell.de/~hille42/proftpd/stacktrace/
>>>
>



More information about the Pkg-proftpd-maintainers mailing list