[Bug 1181789] Re: second call of 'initctl start' leads to fork instead of exec ('mount: / is busy' during shutdown)

Steve Langasek steve.langasek at canonical.com
Thu Nov 7 03:12:22 UTC 2013


Landing this fix in raring was blocked by bug #1199778, which we ran out
of time to resolve before the 13.10 release.  My work-in-progress branch
is available at lp:~vorlon/ubuntu/raring/upstart/lp.1199778 in case
anyone else wants to pick this up for 13.04.  Otherwise, this bug is
'wontfix'.

** Changed in: upstart (Ubuntu Raring)
       Status: Triaged => Won't Fix

** Changed in: upstart (Ubuntu Raring)
     Assignee: Stéphane Graber (stgraber) => (unassigned)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1181789

Title:
  second call of 'initctl start' leads to fork instead of exec ('mount:
  / is busy' during shutdown)

Status in Upstart:
  Fix Released
Status in “upstart” package in Ubuntu:
  Fix Released
Status in “upstart” source package in Raring:
  Won't Fix
Status in “upstart” source package in Saucy:
  Fix Released

Bug description:
  The real case for this issue is the Bug lp: #1181528 (ureadahead)
  "/etc/init.d/umountroot: 'mount / is busy' due to upstart log file"
  and a variant of Bug lp: #1073433
  "Ext4 corruption associated with shutdown of Ubuntu 12.10"
  Upstart holds a file open for writing so /etc/init.d/umountroot
  can not cleanly remount root filesystem readonly.

  Assume the following job description that is simulation of
  ureadahead-other.conf when there is no .pack file for a mount
  <file name="lazy-daemon.conf">
  description "Debug open log file issue"
  manual
  expect fork
  normal exit 0 4
  exec /bin/sh -c 'echo "I am tired" >&2 ; exit 4 '
  </file>

  Let's start it

  start lazy-daemon
  [ 8433.561627] init: Connection from private client
  [ 8433.563649] init: lazy-daemon goal changed from stop to start
  [ 8433.563854] init: lazy-daemon state changed from waiting to starting
  [ 8433.564474] init: Handling starting event
  [ 8433.564797] init: lazy-daemon state changed from starting to pre-start
  [ 8433.565106] init: lazy-daemon state changed from pre-start to spawned
  [ 8433.567494] init: lazy-daemon main process (3673)
  [ 8433.569516] init: lazy-daemon main process (3673) executable changed
  [ 8433.570797] init: lazy-daemon main process (3673) terminated with status 4
  [ 8433.571183] init: lazy-daemon goal changed from start to stop
  [ 8433.571597] init: lazy-daemon state changed from spawned to stopping
  [ 8433.571981] init: Handling stopping event
  [ 8433.572459] init: lazy-daemon state changed from stopping to killed
  [ 8433.572817] init: lazy-daemon state changed from killed to post-stop
  [ 8433.573164] init: lazy-daemon state changed from post-stop to waiting
  [ 8433.574376] init: Handling stopped event
  lazy-daemon stop/waiting

  In general everything works as expected (However I am in doubt
  concerning 'executable changed'

  Let's start again (One more mount and call of ureadahead-other
  for it)

  start lazy-daemon
  [ 8493.929425] init: Connection from private client
  [ 8493.931370] init: lazy-daemon goal changed from stop to start
  [ 8493.931576] init: lazy-daemon state changed from waiting to starting
  [ 8493.931817] init: Handling starting event
  [ 8493.932444] init: lazy-daemon state changed from starting to pre-start
  [ 8493.932750] init: lazy-daemon state changed from pre-start to spawned
  [ 8493.935620] init: lazy-daemon main process (3681)
  [ 8493.937540] init: lazy-daemon main process (3681) became new process (3682)
  [ 8493.937620] init: lazy-daemon state changed from spawned to post-start
  [ 8493.937860] init: lazy-daemon state changed from post-start to running
  [ 8493.938093] init: Handling started event
  lazy-daemon start/running, process 3682

  I do not expect fake fork here. There is no 3682 process.
  In any case upstart has to close the log file

  ps uw 3682
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  initctl status lazy-daemon
  lazy-daemon start/running, process 3682
  lsof | grep lazy-daemon
  init         1            root   13w      REG        8,2        24    2888252 /var/log/upstart/lazy-daemon.log

  Bug lp: #1130611 "Upstart never closes /var/log/upstart/mysql.log"
  might be related to this issue

  Versions:
  Ubuntu 13.10 Raring i686
  upstart: Installed: 1.8-0ubuntu1

To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/1181789/+subscriptions



More information about the foundations-bugs mailing list