The smbd_scavenger crashes with a core dump if its parent dies first

Ralph Böhme slow at samba.org
Thu Aug 30 17:14:28 UTC 2018


On Thu, Aug 30, 2018 at 10:11:58AM -0700, Richard Sharpe wrote:
>On Thu, Aug 30, 2018 at 10:07 AM, Ralph Böhme <slow at samba.org> wrote:
>> On Thu, Aug 30, 2018 at 10:00:50AM -0700, Richard Sharpe wrote:
>>>
>>> (gdb) where
>>> #0  0x00007f42b9986277 in raise () from /lib64/libc.so.6
>>> #1  0x00007f42b9987968 in abort () from /lib64/libc.so.6
>>> #2  0x00007f42bb32d5ae in dump_core () at ../source3/lib/dumpcore.c:338
>>> #3  0x00007f42bb31ddb7 in smb_panic_s3 (why=<optimized out>)
>>>    at ../source3/lib/util.c:827
>>> #4  0x00007f42bd40a02f in smb_panic (
>>>    why=why at entry=0x7f42bd126e34 "smbd_scavenger_parent_dead")
>>>    at ../lib/util/fault.c:166
>>> #5  0x00007f42bcff23e1 in exit_server_common
>>> (how=how at entry=SERVER_EXIT_ABNORMAL,
>>>    reason=0x7f42bd126e34 "smbd_scavenger_parent_dead")
>>>    at ../source3/smbd/server_exit.c:238
>>> #6  0x00007f42bcff26c1 in smbd_exit_server (explanation=<optimized out>)
>>>    at ../source3/smbd/server_exit.c:256
>>> #7  0x00007f42ba348b92 in exit_server (
>>>    reason=reason at entry=0x7f42bd126e34 "smbd_scavenger_parent_dead")
>>>    at ../source3/lib/smbd_shim.c:123
>>> #8  0x00007f42bcff497e in smbd_scavenger_parent_dead (event_ctx=<optimized
>>> out>,
>>>    fde=<optimized out>, flags=<optimized out>, private_data=<optimized
>>> out>)
>>>    at ../source3/smbd/scavenger.c:103
>>
>>
>> guess we may want to call exit_server_cleanly() instead of exit_server() in
>> smbd_scavenger_parent_dead().
>
>Added samba-technical back because I probably dropped it somewhere.
>
>Well, that could be done ... but it would possibly obscure those cases
>where the parent was killed without us knowing.

we do know, because the pipe to the parent gets closed which is why we end up in 
smbd_scavenger_parent_dead().

>That will certainly fix my current problem. We could add a DEBUG(0,...
>or equivalent.

The string passed to exit_server_cleanly() will be logged iirc.

-slow

-- 
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
GPG Key Fingerprint:           FAE2 C608 8A24 2520 51C5
                               59E4 AA1E 9B71 2639 9E46



More information about the samba-technical mailing list