[PATCH] Fix pthreadpool fork behaviour

Jeremy Allison jra at samba.org
Wed Aug 30 17:39:56 UTC 2017


On Wed, Aug 30, 2017 at 07:26:22PM +0200, Ralph Böhme via samba-technical wrote:
> Hi Volker,
> 
> On Wed, Aug 30, 2017 at 04:08:18PM +0200, Volker Lendecke via samba-technical wrote:
> > At a customer site we've had tons of smbds stuck in
> > 
> > #0  0x00007fb9266bc579 in pthread_cond_destroy@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> > #1  0x00007fb9217bd16a in pthreadpool_free (pool=0x7fb9285b0590) at ../source3/lib/pthreadpool/pthreadpool.c:246
> > #2  0x00007fb9217bd6a1 in pthreadpool_free (pool=<optimized out>) at ../source3/lib/pthreadpool/pthreadpool.c:301
> > #3  pthreadpool_destroy (pool=<optimized out>) at ../source3/lib/pthreadpool/pthreadpool.c:287
> > #4  0x00007fb9217bde6c in pthreadpool_tevent_destructor (pool=pool at entry=0x7fb9285aeeb0) at ../source3/lib/pthreadpool/pthreadpool_tevent.c:82
> > #5  0x00007fb9256c20e0 in _tc_free_internal (location=0x7fb9217c1c28 "../source3/lib/messages_dgm.c:1285", tc=0x7fb9285aee50) at ../lib/talloc/talloc.c:1078
> > #6  _tc_free_children_internal (location=0x7fb9217c1c28 "../source3/lib/messages_dgm.c:1285", ptr=0x7fb9285b0460, tc=0x7fb9285b0400) at ../lib/talloc/talloc.c:1593
> > #7  _tc_free_internal (tc=0x7fb9285b0400, location=0x7fb9217c1c28 "../source3/lib/messages_dgm.c:1285") at ../lib/talloc/talloc.c:1104
> > #8  0x00007fb9217bfbac in messaging_dgm_destroy () at ../source3/lib/messages_dgm.c:1285
> > #9  0x00007fb9217c086d in msg_dgm_ref_destructor (r=r at entry=0x7fb92867e320) at ../source3/lib/messages_dgm_ref.c:160
> > #10 0x00007fb9256c1ef3 in _tc_free_internal (tc=0x7fb92867e2c0, location=0x7fb923d92bfe "../source3/lib/messages.c:393") at ../lib/talloc/talloc.c:1078
> > #11 0x00007fb923d6f79e in messaging_reinit (msg_ctx=msg_ctx at entry=0x7fb9285b0390) at ../source3/lib/messages.c:393
> > #12 0x00007fb923d6305b in reinit_after_fork (msg_ctx=msg_ctx at entry=0x7fb9285b0390, ev_ctx=ev_ctx at entry=0x7fb9285af5f0, parent_longlived=parent_longlived at entry=true, comment=comment at entry=0x0) at ../source3/lib/util.c:477
> > 
> > which led to the attached patchset. The new test works fine on FreeBSD
> > 11 too.
> > 
> > Comments?
> 
> just for the records: I'll try to find time to review tomorrow, but if someone
> else feels like it, feel free. But: HC SVNT DRACONES.

I'm looking at it now..

But dealing with pthread bugs reminds me of this... :

https://www.youtube.com/watch?v=o7tMHD9x7ro

They never really die :-).



More information about the samba-technical mailing list