Bug 13006 - Fork handling under messaging load broken
Summary: Fork handling under messaging load broken
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-31 12:29 UTC by Volker Lendecke
Modified: 2020-12-11 13:28 UTC (History)
5 users (show)

See Also:


Attachments
git-am fix for 4.7.0. (7.75 KB, patch)
2017-09-01 22:32 UTC, Jeremy Allison
vl: review+
Details
git-am back-port of patch to 4.6.x. Doesn't include test. (4.34 KB, patch)
2017-09-01 22:39 UTC, Jeremy Allison
no flags Details
git-am full backport for 4.6.x - includes test. (7.82 KB, patch)
2017-09-01 22:56 UTC, Jeremy Allison
vl: review+
Details
git-am partial backport for 4.5.x - test depends on pthreadpool_pipe_add_job() which doesn't exist in 4.5.x. (4.35 KB, patch)
2017-09-01 23:05 UTC, Jeremy Allison
no flags Details
Patch (1.20 KB, patch)
2017-09-06 15:09 UTC, Volker Lendecke
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lendecke 2017-08-31 12:29:13 UTC
The pthreadpool_atfork handlers don't work correctly when the parent process has idle threads (possibly from messaging_dgm). Have patch, need bugnumber.
Comment 1 Jeremy Allison 2017-09-01 22:32:15 UTC
Created attachment 13530 [details]
git-am fix for 4.7.0.

Back-port to 4.6.x might be trickier...
Comment 2 Jeremy Allison 2017-09-01 22:39:30 UTC
Created attachment 13531 [details]
git-am back-port of patch to 4.6.x. Doesn't include test.
Comment 3 Jeremy Allison 2017-09-01 22:56:29 UTC
Created attachment 13532 [details]
git-am full backport for 4.6.x - includes test.
Comment 4 Jeremy Allison 2017-09-01 23:05:49 UTC
Created attachment 13533 [details]
git-am partial backport for 4.5.x - test depends on pthreadpool_pipe_add_job() which doesn't exist in 4.5.x.
Comment 5 Volker Lendecke 2017-09-06 14:49:25 UTC
Comment on attachment 13533 [details]
git-am partial backport for 4.5.x - test depends on pthreadpool_pipe_add_job() which doesn't exist in 4.5.x.

While the 4.5 backport patches in precisely what went into master and the others, I would be a bit more careful here. We changed from dependent to detached threads with 4.6, so I could imagine that we need a pthread_join call in the pthreadpool_parent() code. Otherwise we might end up with data structures for zombie threads in the child. I'd need to spend more time than I have right now on this, in particular port the test. Can we talk about that at SDC? For now, no "+" on the 4.5 port until you convince me it's correct :-)
Comment 6 Volker Lendecke 2017-09-06 15:09:51 UTC
Created attachment 13551 [details]
Patch

This one is the reason why I did not upload the patches yet. I had wanted to make that in one run, but apparently I was just too slow for our development methodology, sorry for that.
Comment 7 Volker Lendecke 2017-09-06 15:17:58 UTC
(In reply to Volker Lendecke from comment #6)
> This one is the reason why I did not upload the patches yet.

Applies cleanly to 4.6 as well.
Comment 8 Jeremy Allison 2017-09-08 18:57:15 UTC
Let's just target 4.6.x, 4.7.0 with these fixes and not do a 4.5.x fix yet.
Comment 9 Jeremy Allison 2017-09-08 18:57:42 UTC
Re-assigning to Karolin for inclusion in 4.7.0, 4.6.next.
Comment 10 Karolin Seeger 2017-09-08 19:21:51 UTC
(In reply to Jeremy Allison from comment #9)
Pushed to autobuild-v4-{7,6}-test.
Comment 11 Jeremy Allison 2017-09-08 23:48:34 UTC
Karolin, don't forget to add attachment #13551 [details] :

https://bugzilla.samba.org/attachment.cgi?id=13551

to both 4.7.0 and 4.6.x, that is also needed for the complete bugfix.

Thanks !

Jeremy.
Comment 12 Karolin Seeger 2017-09-10 13:35:36 UTC
(In reply to Jeremy Allison from comment #11)
Thanks for the hint, Jeremy!
Pushed to autobuild-v4-{6,7}-test.
Comment 13 Karolin Seeger 2017-09-11 16:13:55 UTC
Pushed to both branches.
Closing out bug report.

Thanks!