Skip to Content.
Sympa Menu

sm-grimoire-bugs - [SM-Grimoire-Bugs] [Bug 13114] simpleinit doesn't stop services during shutdown on recent kernels

sm-grimoire-bugs AT lists.ibiblio.org

Subject: SourceMage Grimoire Bug List

List archive

Chronological Thread  
  • From: bugzilla-daemon AT bugs.sourcemage.org
  • To: sm-grimoire-bugs AT lists.ibiblio.org
  • Subject: [SM-Grimoire-Bugs] [Bug 13114] simpleinit doesn't stop services during shutdown on recent kernels
  • Date: 27 Feb 2007 07:53:46 -0000

http://bugs.sourcemage.org/show_bug.cgi?id=13114





------- Additional Comments From jblosser-smgl AT firinn.org 2007-02-27 01:53
-------
>From the code, what's supposed to happen is:

shutdown does:
if (init_is_simpleinit)
system ("/sbin/initctl -r -f"); /* Roll back services */

initctl writes the command data to the /dev/initctl fifo and then does:
kill(init_pid,SIGCHLD); /* wake up init if sleeping, to process command */
command->command &= CLEAR_FLAGS;

if (command->command != COMMAND_DUMP_LIST)
{
sigemptyset (&ss);
while (caught_signal == 0) sigsuspend (&ss);

init treats SIGCHLD as a noop, it's just used to wake up init, like that
comment
says:
void sigchild_handler (int sig)
{
/* empty handler to make sure SIGCHLD doesn't get ignored */
sig=sig;
}


So what's supposed to happen is that init is supposed to see the commands in
/dev/initctl as part of its regular wait loop and follow the instruction to
stop
the services. It fails to do this... you may be right that the error in the
non-working sample is just a result of the right thing not happening before
the
error fires, but keep in mind this is breaking after nothing but a kernel
upgrade, so a kernel change appears to be involved somewhere.

I don't know any way to strace init but FWIW in the working environment
there's
a 3 second delay between the suspend starting and the services stopping. In
the
non-working example it's 12 seconds and nothing happens.

--
Configure bugmail: http://bugs.sourcemage.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




Archive powered by MHonArc 2.6.24.

Top of Page