[Bug 839166] Re: mountall hangs while trying to send dbus? messages for /proc

DaveHansen dave at sr71.net
Sun May 20 20:42:10 UTC 2012


> Do you have custom or non-standard jobs in /etc/init that reference
the 'mounted' event?

Not that I know of.

> Is this problem reproducible in 12.04 LTS?

Yeah, it managed to persist after the dist-upgrade.

After a bit more digging in /etc/init, I realized that some of
mountall's /etc/init/mountall*.conf files were missing.  A normal "dpkg
-i" did not restore them, but adding  --force-confnew did, after which,
it seems to boot OK.

I do think there's still a bit of a bug here in mountall.  Granted, there was something wrong (most recently missing conffiles) that caused a failure.  But, mountall failed in a pretty bad way:
1. Indefinite, permanent boot hang, had to use init=/bin/bash to recover
2. Didn't accept user input
3. No messages about what was going on

Seems like we could do better than that, even booting in to a crippled
environment like I did by hacking the 90s in instead of
NIH_DBUS_TIMEOUT_NEVER would be vastly superior to what we've got at the
moment.

-- 
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/839166

Title:
  mountall hangs while trying to send dbus? messages for /proc

Status in “mountall” package in Ubuntu:
  Incomplete

Bug description:
  Symptoms: system hangs forever at boot
  Versions: originally discovered with 2.25ubuntu1, but reproduced with 2.31 as well
  Description:	Ubuntu 11.04
  Release:	11.04
  # apt-cache policy mountall
  mountall:
    Installed: 2.25ubuntu1
    Candidate: 2.25ubuntu1
    Version table:
   *** 2.25ubuntu1 0
          500 http://ubuntu.osuosl.org/ubuntu/ natty/main amd64 Packages
          100 /var/lib/dpkg/status

  Alt-sysrq-k shows that it was it was waiting for mountall.  Adding some debugging shows that it's waiting on this line of code in mounted() for /proc:
          emit_event ("mounted", mnt);
  Which in turn is waiting on:
          pending_call = NIH_SHOULD (upstart_emit_event (upstart,
                                                         name, env, mnt ? TRUE : FALSE,
                                                         NULL, emit_event_error, NULL,
                                                       NIH_DBUS_TIMEOUT_NEVER));

  Changing that NIH_DBUS_TIMEOUT_NEVER to something like "90 * 1000"
  will let the system at least boot (after 90 seconds of course),
  although into somewhat of a crippled state because mountall dies,
  although the rest of the system seems to start OK.

  The first problem is that the system simply hangs.  None of the
  mountall key commands like 'S' to skip mounts are yet available.
  There is also no message about what it is doing.  Basically, it's
  really hard to debug.  Some messages from mountall would probably be
  really handy here.  Perhaps it could pass a timeout value in and at
  least spit something to the console, like:

  int wait = mnt ? TRUE : FALSE,
  while (wait) {
          pending_call = NIH_SHOULD (upstart_emit_event (upstart,..., MY_TIMEOUT));
          if (pending_call)
              break;
          print_helpful_message_here();
  }

  The other part is that I have no idea how this could have ever worked.  upstart_emit_event() looks to be talking to dbus, but dbus does not get started until local-filesystems are mounted (from /etc/init/dbus.conf):
  start on local-filesystems

  The 'local-filesystems' event appears to me in trigger_events() to only be triggered *after* virtual filesystems:
          /* Enforce local only after virtual filesystems triggered */
  So, since /proc is a virtual filesystem, it makes sense that it would hang trying to notify dbus since dbus is not yet started.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/839166/+subscriptions




More information about the foundations-bugs mailing list