Bug 12392 - CTDBD child processes keep running at high priority on RHEL6 and RHEL7
Summary: CTDBD child processes keep running at high priority on RHEL6 and RHEL7
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: CTDB (show other bugs)
Version: 4.5.0
Hardware: All All
: P5 critical (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-25 04:16 UTC by Amitay Isaacs
Modified: 2016-11-23 11:13 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-5 (1.80 KB, patch)
2016-10-25 22:07 UTC, Amitay Isaacs
martins: review+
Details
Patches for v4-4 (1.75 KB, patch)
2016-10-25 22:07 UTC, Amitay Isaacs
martins: review+
Details
Additional patch for v4-4 (1.24 KB, patch)
2016-11-21 01:53 UTC, Amitay Isaacs
martins: review+
Details
Additional patch for v4-5 (1.24 KB, patch)
2016-11-21 01:53 UTC, Amitay Isaacs
martins: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Amitay Isaacs 2016-10-25 04:16:20 UTC
RHEL6 and RHEL7 kernels are broken with respect to SCHED_RESET_ON_FORK feature.

If this flag is defined, CTDB relies on fork() to reset the priority of the child processes.  

In RHEL6 the scheduling class is reset, but the process priority is not.
In RHEL7 the scheduling class is not reset, so all child processes will continue to run with real-time priority.
Comment 1 Amitay Isaacs 2016-10-25 22:07:18 UTC
Created attachment 12601 [details]
Patches for v4-5
Comment 2 Amitay Isaacs 2016-10-25 22:07:48 UTC
Created attachment 12602 [details]
Patches for v4-4
Comment 3 Martin Schwenke 2016-10-26 01:21:04 UTC
Hi Karolin,

This is ready for 4.5/4.4.  If there's still a chance of squeezing it into the releases you're doing today then that would be tremendous.

If not then that's the way things go...  :-)

Thanks...
Comment 4 Karolin Seeger 2016-10-31 10:17:51 UTC
(In reply to Martin Schwenke from comment #3)
Sorry, those last minute stunts usually break the whole release... ;-)
Pushed to autobuild-v4-{5,4}-test.
Comment 5 Karolin Seeger 2016-11-01 07:52:52 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to both branches.
Closing out bug report.

Thanks!
Comment 6 Amitay Isaacs 2016-11-17 05:14:38 UTC
The fix is incomplete.

Earlier we were relying on SCHED_RESET_ON_FORK to reset the priority of lock
helper processes.  Since SCHED_RESET_ON_FORK support has been removed, the
scheduling priority of child processes created using vfork() need to be reset
explicitly in the helper processes.
Comment 7 Steve French 2016-11-18 17:35:06 UTC
(In reply to Amitay Isaacs from comment #6)
So this also needs to be pushed to 4.5 (and probably 4.4 as well) right ...?
Comment 8 Amitay Isaacs 2016-11-21 01:52:39 UTC
(In reply to Steve French from comment #7)

Yes. Both 4.5 and 4.4.
Comment 9 Amitay Isaacs 2016-11-21 01:53:15 UTC
Created attachment 12678 [details]
Additional patch for v4-4
Comment 10 Amitay Isaacs 2016-11-21 01:53:40 UTC
Created attachment 12679 [details]
Additional patch for v4-5
Comment 11 Martin Schwenke 2016-11-21 03:47:24 UTC
Hi Karolin,

Additional patches are ready for 4.4/4.5.

Thanks!
Comment 12 Karolin Seeger 2016-11-21 11:00:44 UTC
(In reply to Martin Schwenke from comment #11)
Pushed to autobuild-v4-{5,4}-test.
Comment 13 Karolin Seeger 2016-11-23 11:13:15 UTC
(In reply to Karolin Seeger from comment #12)
Pushed to both branches.
Closing out bug report.

Thanks!