[Bug 447654] Re: init: using 'and' operators can cause hangs

soundararjan veluse at gmail.com
Sat Jun 23 23:04:06 UTC 2012


** Branch unlinked: lp:ubuntu/lucid/mountall

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

Title:
  init: using 'and' operators can cause hangs

Status in Upstart:
  Triaged
Status in “mountall” package in Ubuntu:
  Fix Released
Status in “nfs-utils” package in Ubuntu:
  Fix Released
Status in “upstart” package in Ubuntu:
  Invalid
Status in “mountall” source package in Lucid:
  Fix Released
Status in “nfs-utils” source package in Lucid:
  Fix Released
Status in “upstart” source package in Lucid:
  Won't Fix
Status in “mountall” source package in Karmic:
  Fix Released
Status in “nfs-utils” source package in Karmic:
  Fix Released
Status in “upstart” source package in Karmic:
  Won't Fix

Bug description:
  Event operators are reset each time they become TRUE, with the
  blocking state being transferred to the actual instance that is
  started.  This means that combining the two operators leads to
  undesirable behaviour.

  For example, in /etc/init/quest.conf:

    start on gandalf and (bilbo or thorin)

  When gandalf arrives, he'll block waiting for bilbo or thorin.  If
  bilbo then arrives, the operator tree is complete and the quest can
  start.

  If thorin then arrives, he'll block waiting for gandalf.
  Unfortunately gandalf has already gone, so he has little choice but to
  sit down and start singing about gold.

  A short-term fix is not to combine event operators this way, and
  instead separate them out into separate jobs.  For example if we had
  an /etc/init/quest/member.conf with:

    start on bilbo or thorin

  Then /etc/init/quest.conf would have:

    start on gandalf and started quest/member

  In this case when gandalf arrives, he'd still block on a quest member.
  Bilbo then arrives, "starting" the quest/member job and thus also
  starting the quest.

  If thorn then arrives, the quest/member job has already been started
  so he doesn't block waiting for it to start.

  The longer term fix is included in the move to "while", which means
  that we'd remember that we had gandalf so when thorin arrived he'd
  know the quest was already started - and he could either start a new
  quest or catch up with the existing one.

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




More information about the foundations-bugs mailing list