Upstart 0.5.0. Assertion causing kernel panic with respawn stanza

Sandeep Puddupakkam (spuddupa) spuddupa at cisco.com
Fri May 22 07:59:04 BST 2009


Hi,
We are using Upstart version 0.5.0.
If a job has a respawn stanza and the main process terminates before
post-start script ends, there is a assertion which is causing a kernel
panic.
This does not cause a assertion if the respawn stanza is not present.
I am working on a fix for this issue. 
However I want to find out if this issue fixed in any of the newer
versions? I could not find a related bug in the bug list.

Thanks,
Sandeep

Here is how my job looks.
####
[/nobackup/spuddupa/ppcroot/nova/etc/init/jobs.d]$ cat job1
console output
respawn
respawn limit 3 20
normal exit 0

pre-start script
  echo "Printing from pre-start script"
end script
script
  echo "Printing from main script"
  # die.sh will sleep for 2 seconds and exit 100
  # The idea is that main process dies before post-start completes.
  exec /etc/init/scripts/die.sh 100 2
end script
post-start script
  echo "Printing from post-start script"
  sleep 5
end script
pre-stop script
   echo "Printing from pre-stop script"
end script
post-stop script
    echo "Printing from post-stop script"
end script

Output on /var/log/messages
May 22 05:59:56 10 <1242971996,684859>init: Connection from private
client
May 22 05:59:56 10 <1242971996,776121>init: job1 goal changed from stop
to start
May 22 05:59:56 10 <1242971996,778388>init: job1 state changed from
waiting to starting
May 22 05:59:56 10 <1242971996,781999>init: Handling starting event
May 22 05:59:56 10 <1242971996,784802>init: job1 state changed from
starting to pre-start
May 22 05:59:56 10 <1242971996,823768>init: job1 pre-start process
(1029)
May 22 05:59:56 10 <1242971996,902085>init: job1 pre-start process
(1029) exited normally
May 22 05:59:56 10 <1242971996,902714>init: job1 state changed from
pre-start to spawned
May 22 05:59:56 10 <1242971996,943757>init: job1 main process (1031)
May 22 05:59:56 10 <1242971996,950937>init: job1 state changed from
spawned to post-start
May 22 05:59:57 10 <1242971997,14097>init: job1 post-start process
(1033)
May 22 05:59:59 10 <1242971999,299350>init: job1 main process (1031)
terminated with status 100
May 22 05:59:59 10 <1242971999,300173>init: job1 main process ended,
respawning
May 22 05:59:59 10 <1242971999,300569>init: job1 state changed from
post-start to running
May 22 05:59:59 10 <1242971999,306389>init: Handling started event
May 22 06:00:02 10 <1242972002,244865>init: job1 post-start process
(1033) exited normally
May 22 06:00:02 10 <1242972002,247633>init:
/nobackup/spuddupa/nova/contrib/upstart/init/job_process.c:1094:
Assertion failed in job_process_terminated: job->state == JOB_POST_START
May 22 06:00:02 10 <1242972002,261114>init: Unable to set root
directory: Resource temporarily unavailable
May 22 06:00:02 10 <1242972002,663105>ng_dumper: Built at May 20 2009
12:11:58 
May 22 06:00:02 10 <1242972002,669561>ng_dumper: '-c 4294967295' is
invalid.
May 22 06:00:02 10 <1242972002,671308>ng_dumper: Command Line: -p 1036
-u 0 -g 0 -s 6 -t 1242972002, -c 0 -h 10.0.2.15 -e init -d /root -o <?>
May 22 06:00:02 10 <1242972002,672308>ng_dumper: Temporary directory is 
missing, default '/tmp' will be used

Output on console
10.0.2.15 login: Printing from pre-start script
Printing from main script
Printing from post-start script
Kernel panic - not syncing: Attempted to kill init!
Rebooting in 180 seconds..<0>System Halted, OK to turn off power



More information about the upstart-devel mailing list