tfork() test hanging in socket_wrapper lock

Andrew Bartlett abartlet at samba.org
Tue Nov 20 00:37:47 UTC 2018


On Mon, 2018-11-19 at 19:17 +0100, Ralph Böhme via samba-technical
wrote:
> On Mon, Nov 19, 2018 at 07:12:17PM +0100, Andreas Schneider via samba-technical wrote:
> > On Monday, 19 November 2018 19:01:18 CET Andrew Bartlett wrote:
> > > On Mon, 2018-11-19 at 11:54 +0100, Andreas Schneider wrote:
> > > > On Monday, 19 November 2018 03:59:35 CET Andrew Bartlett wrote:
> > > > > Today on sn-devel my autobuild hung running the tfork test:
> > > > > 
> > > > > It appears to be waiting forever for a mutex lock.
> > > > 
> > > > Anoop and myself tried to reproduce it, but we couldn't. However helgrind
> > > > reports several errors in tfork itself.
> > > 
> > > I should have mentioned, I've left them stuck in case they can be
> > > debugged.
> > 
> > I think Ralph already nailed it. It is an issue with SIGCHLD handling in
> > tfork.
> > 
> > https://gitlab.com/samba-team/devel/samba/pipelines/37140126
> > 
> > Already looks good.
> > 
> > However we are looking into Thread Sanitizer right now.
> 
> looks like Thread Sanitizer doesn't like a few things in Samba as Andreas and I 
> discovered. Particularily the combination of threads and fork gives it a hard 
> time. :)
> 
> -slow

G'Day Ralph,

Thanks for the great debugging work!

I assume this is just a first step?  How does this interact in the real
world if callers to tfork() don't do this magic?

I've hit this twice trying to get things in to autobuild, so naturally
keen to help you get to the bottom of this.

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list