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

Richard Sharpe realrichardsharpe at gmail.com
Thu Aug 30 14:56:50 UTC 2018


On Thu, Aug 30, 2018 at 7:05 AM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> Our QA organization is zealous in finding cores after tests.
>
> If the parent smbd dies before a signal is delivered telling the
> scavenger to die, it core dumps.
>
> However, the order in which signals are delivered is not controllable.
>
> If we were to call prctl(PR_SET_NAME, "smbd_scavenger", NULL, NULL,
> NULL) in the scavenger just after fork, this could help make shutdown
> deterministic and keep QA off my back!
>
> Or perhaps we should just use setproctitle, since that is already used
> in winbindd and would work on FreeBSD with no changes.
>
> Would a patch be welcome?

Well, I see that reinit_after_fork tries to do that if a comment is
passed in, which it is, at least in master.

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



More information about the samba-technical mailing list