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

Richard Sharpe realrichardsharpe at gmail.com
Thu Aug 30 16:49:06 UTC 2018


On Thu, Aug 30, 2018 at 9:23 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> On Thu, Aug 30, 2018 at 9:07 AM, Ralph Böhme <slow at samba.org> wrote:
>> On Thu, Aug 30, 2018 at 08:32:04AM -0700, Richard Sharpe wrote:
>>>
>>> By killing the smbd-scavenger processes first?
>>
>>
>> ps -o pid,comm
>>
>> But kill -SIGTERM send to the parent smbd should work and not crash. Why not
>> try to fix the underlying bug instead of resorting to such a crutch. :)
>
> Why are you so serious? :-)
>
> OK, so the correct fix is probably to:
>
> 1. Add a scavenger_shutdown function to scavenger.c, and
> 2. Call scavenger_shutdown from exit_server_common.

Although, sending a sigterm to the scavenger child might also work,
but care will need to be taken with races, because it is entirely
possible that the parent has exited before the child has exited and it
still gets a signal saying its parent died.

> --
> Regards,
> Richard Sharpe
> (何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)



More information about the samba-technical mailing list