[Bug 552845] New: CTDB dies when invoked by parent process with nonzero scheduling priority
http://bugzilla.novell.com/show_bug.cgi?id=552845 Summary: CTDB dies when invoked by parent process with nonzero scheduling priority Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: x86-64 OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: 3rd party software AssignedTo: opensuse-communityscreening@forge.provo.novell.com ReportedBy: tserong@novell.com QAContact: opensuse-communityscreening@forge.provo.novell.com Found By: Development CTDB is unable to run if "/etc/init.d/ctdb start" is invoked by a process that has a non-zero scheduling priority. This is trivially reproducible as follows: # chrt -r 1 /etc/init.d/ctdb start /var/log/ctdb/log.ctdb then shows: 2009/11/02 05:04:36.178512 [12159]: Starting CTDB daemon 2009/11/02 05:04:36.188993 [12160]: Set scheduler to SCHED_FIFO 2009/11/02 05:04:36.190095 [12160]: tcp/tcp_connect.c:349 Failed to bind() to socket. Success(0) ... 2009/11/02 05:04:36.197867 [12160]: Monitoring has been started 2009/11/02 05:04:36.197897 [12162]: ctdb fatal error: Unable to restore old scheduler parameters ^ There's the problem 2009/11/02 05:05:04.241103 [12160]: Shutting down recovery daemon 2009/11/02 05:05:04.241245 [12160]: Monitoring has been stopped ... 2009/11/02 05:05:05.324621 [12160]: Received SHUTDOWN command. Stopping CTDB daemon. 2009/11/02 05:05:05.324807 [12160]: CTDB daemon shutting down The code in question is in the ctdb_restore_scheduler() function in common/ctdb_util.c, specifically: if (sched_setscheduler(0, SCHED_OTHER, (struct sched_param *)ctdb->saved_scheduler_param) == -1) { ctdb_fatal(ctdb, "Unable to restore old scheduler parameters\n"); } The only valid priority for SCHED_OTHER is zero, so restoring any previous non-zero saved scheduler param always results in failure here. Presumably the fix would be to either: 1) always call sched_setscheduler(SCHED_OTHER) with a priority of 0, or, 2) save the scheduler policy *and* priority, then restore both, instead of just restoring the priority. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=552845
User tserong@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=552845#c1
--- Comment #1 from Tim Serong
participants (1)
-
bugzilla_noreply@novell.com