Ubuntu

mountall crashed with SIGSEGV in main() without initramfs

Reported by Scott Moser on 2010-01-05
56
This bug affects 7 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
High
Steve Langasek
Lucid
High
Steve Langasek

Bug Description

Binary package hint: mountall

I'm booting a system without a ramdisk, using 2.6.32-9-generic-pae . I see this failure on 32 or 64 bit. the console shows the following output:

[ 0.808201] VFS: Mounted root (ext3 filesystem) readonly on device 8:0.
[ 0.809808] devtmpfs: mounted
[ 0.810402] Freeing unused kernel memory: 568k freed
[ 0.818208] Write protecting the kernel text: 4736k
[ 0.824659] Write protecting the kernel read-only data: 1924k
init: ureadahead main process (51) terminated with status 3
mountall: Could not connect to Plymouth
init: mountall main process (52) killed by SEGV signal
General error mounting filesystems.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and reboot the system.
Give root password for maintenance

I'm able to get past the immediate mountall failure if I boot with init=/bin/bash and then do something like:
  mount -t proc /proc /proc
  exec /sbin/init

That ends up booting, but then / is read-only.

I'm attaching an apport report file that I generated by booting with init=/bin/bash, then:
  mount -t proc /proc /proc
  mount -t tmpfs none /var/crash
  mount -t tmpfs none /var/log
  echo "|/usr/share/apport/apport %p %s %c" > /proc/sys/kernel/core_pattern
  umount /proc/
  ulimit -c unlimited
  exec /sbin/init

mountall dies, and init gives a maintainence prompt. I extracted the apport crash from /var/crash.

It looks as if mountall is relying on some of the mounts or setup that is done in an initramfs.

ProblemType: Crash
Architecture: i386
Date: Tue Jan 5 03:23:09 2010
DistroRelease: Ubuntu 10.04
ExecutablePath: /sbin/mountall
Package: mountall 2.3
ProcCmdline: mountall --daemon
ProcEnviron: PATH=(custom, no user)
ProcVersionSignature: Ubuntu 2.6.32-9.13-generic-pae
SegvAnalysis:
 Segfault happened at: 0xb7782a43: mov 0x4(%edx),%esi
 PC (0xb7782a43) ok
 source "0x4(%edx)" (0x00000004) not located in a known VMA region (needed readable region)!
 destination "%esi" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: mountall
StacktraceTop:
 ?? () from /sbin/mountall
 ?? () from /sbin/mountall
 ?? () from /sbin/mountall
 main () from /sbin/mountall
Tags: lucid
Title: mountall crashed with SIGSEGV in main()
Uname: Linux 2.6.32-9-generic-pae i686
UserGroups:

Related branches

Scott Moser (smoser) wrote :

StacktraceTop:
 find_mount (mountpoint=0xb778ecb4 "/proc") at mountall.c:424
 mount_proc () at mountall.c:666
 parse_filesystems () at mountall.c:838
 main (argc=2, argv=0xbfb17aa4) at mountall.c:2969

Changed in mountall (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Scott Moser (smoser) on 2010-01-05
summary: - mountall crashed with SIGSEGV in main()
+ mountall crashed with SIGSEGV in main() without initramdisk
summary: - mountall crashed with SIGSEGV in main() without initramdisk
+ mountall crashed with SIGSEGV in main() without initramfs
Scott Moser (smoser) on 2010-01-05
visibility: private → public
Scott Moser (smoser) on 2010-01-05
tags: added: ec2-images
Changed in mountall (Ubuntu):
importance: Medium → High
Michael Marley (mamarley) wrote :

This also affects my non-initramfs custom kernel.

Michael Marley (mamarley) wrote :

Additionally, I just tried the patch. With the patch, mountall no longer segfaults, but instead it complains twice about some kind of failure (I forgot the text) and then it says "Ignoring x at user request" several times while x is all of my partitions. It still does not boot properly.

Johan Kiviniemi (ion) wrote :

It would be useful to know the error message you get twice.

Michael Marley (mamarley) wrote :

The full output from Mountall is:

mountall: Could not connect to Plymouth
mountall: Event failed
mountall: Event failed
Skipping / at user request
Skipping /tmp at user request
Skipping UUID=xxxx at user request

and then the system locks up in such a way that neither Ctrl+Alt+Del nor a short press of the power button have any result. Booting any kernel with an initramfs still works normally.

Thierry Carrez (ttx) on 2010-01-08
Changed in mountall (Ubuntu):
status: New → Confirmed
Changed in mountall (Ubuntu Lucid):
milestone: none → lucid-alpha-2
Lukas Hejtmanek (xhejtman) wrote :

Same for me. I reverted mountall to version 1.0.1 and system boots again.

Steve Langasek (vorlon) on 2010-01-08
Changed in mountall (Ubuntu Lucid):
assignee: nobody → Steve Langasek (vorlon)
Johan Kiviniemi (ion) wrote :

Please try with the current version of the linked branch. Perhaps we’re lucky and I found all the bugs. :-P

Michael Marley (mamarley) wrote :

No, the issue still occurs in exactly the same way that I reported above.

Johan Kiviniemi (ion) wrote :

Michael,

Ah, I had missed the part about you running a custom kernel. Does mountall work for you with a standard Ubuntu kernel?

In any case, the issue you’re encountering should go to a separate bug report, since this one is about the segfault when mounting /proc.

When reporting it, please include the debug output from mountall. Add ‘--debug >/dev/mountall.log 2>&1’ to the ‘exec mountall ...’ line in /etc/init/mountall.conf and add sulogin.conf from http://upstart.ubuntu.com/wiki/OMGBroken, so you get a shell from which to get /dev/mountall.log to the bug report.

Steve,

It seems my branch fixes the actual bug this report is about (in addition to two other unrelated crashes).

Michael Marley (mamarley) wrote :

Yes, the standard Ubuntu kernel works fine, as does my custom kernel if I compile with initramfs. Any kernel I have tried without the initramfs fails.

Thierry Carrez (ttx) wrote :

The ramdiskless feature is blocked by bug 494565, which wasn't fixed in time for alpha-2 kernels. Remilestoning to alpha-3, however we still need this fixed as soon as possible to start exercising the feature against the post-alpha2 dailies.

Changed in mountall (Ubuntu Lucid):
milestone: lucid-alpha-2 → lucid-alpha-3
Steve Langasek (vorlon) wrote :

I'm not sure which of the bug #s my problem actually corresponds to, but I'm happy to report that the merge-proposed branch fixes the failure I've been seeing with mountall failing to mount NFS shares at boot time.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mountall - 2.4

---------------
mountall (2.4) lucid; urgency=low

  * conf/mountall-net.conf: only send SIGUSR1 to the main process, not to
    any pre-start or post-stop script we might have; killing the post-stop
    script with -USR1, though an unlikely race to hit, is definitely wrong.
    LP: #506902.

  [ Johan Kiviniemi ]
  * src/mountall.c: The mount table needs to exist for parse_filesystems
    - parse_filesystems() could call mount_proc(), which would call
      find_mount() and segfault. LP: #503212.
  * src/mountall.c: Handle TAG_UNKNOWN. LP: #505748.
  * src/mountall.c: Ensure boredom_timer is set to NULL when freeing
  * src/mountall.c: Default to no action for boredom query if prompt fails.
    LP: #505530.
 -- Steve Langasek <email address hidden> Thu, 14 Jan 2010 05:30:13 -0800

Changed in mountall (Ubuntu Lucid):
status: Confirmed → Fix Released
Michael Marley (mamarley) wrote :

This is not fixed fully. It doesn't segfault anymore, but it just locks up and fails to boot.

Johan Kiviniemi (ion) wrote :

Michael,

As I said, the issue you have should go to another bug report, since this one is about the segfault that was fixed.

You might be encountering bug #506727, for instance.

Scott Moser (smoser) wrote :

I opened bug 509841 to address "fails to boot without ramdisk".

ZhengPeng Hou (zhengpeng-hou) wrote :

got most likely the sam thing on armel, lucid 20090122 kubuntu-netbook + customized kernel, system stuck after init, shows
mountall: Event failed

On Thu, 28 Jan 2010, ZhengPeng Hou wrote:

> got most likely the sam thing on armel, lucid 20090122 kubuntu-netbook +
> customized kernel, system stuck after init, shows
> mountall: Event failed

bug 509841, make sure your custom kernel has CONFIG_DEVTMPFS=y

Loïc Minier (lool) wrote :

Exactly; I've researched this for a while, and turns out that /dev on tmpfs support is currently broken on upstart/mountall. Only /dev on devtmpfs works. See bug #513919.

Loïc Minier (lool) wrote :

For custom kernel, pay attention to turn on CONFIG_CONNECTOR for netlink and CONFIG_INOTIFY.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers