umount hangs with initramfs as root
Rob Landley
rob at landley.net
Wed Mar 22 23:47:22 UTC 2006
On Wednesday 22 March 2006 5:51 pm, Chuck Meade wrote:
> > Inability to umount is is a feature. The hang when attempting to umount
> > it is a bug. (The attempt should be ignored by the kernel, and is in
> > current kernels. Just like an attempt to send a kill signal to init.)
>
> Thanks for the info, Rob. I know this is Busybox 1.0.0 we are talking
> about here, but for the sake of the archives, and anyone else who may
> stumble across this, I found a bug in util-linux/umount.c, function
> mtab_getinfo(). Again, this is an *old version* of Busybox. The
> latest snapshot has different umount logic.
>
> Take a look at this function. Consider the line I marked with the
> arrow. If you ever reach this line, you are in an infinite loop.
> The "continue" skips past the "cur = cur->next" at the bottom, so
> cur never changes, and the while loop becomes infinite. When I rebooted,
> which umounted the rootfs, I hit this line and spun forever.
Ooh. Ick. Ok, totally unrelated bug. Erik added that code in svn 6946, and
I replaced it entirely in svn 11099.
> I have not tested the functionality of umounting an initramfs with the
> latest Busybox snapshot, or a 2.6.16 kernel, yet.
No, this isn't a kernel issue. This is a bug in the old umount count.
> Just want to thank you again for your help in finding this, especially as
> busy as you are right now.
It's just a coincidence that what I was talking about was where this bug
is. :)
> Best Regards,
> Chuck
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list