Red Hat Bugzilla – Bug 131195
Mkinitrd hangs after "Switching to new root"
Last modified: 2007-11-30 17:10:48 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.2)
Description of problem:
After using mkinitrd-4.1.8-1 to create an initrd, my system hangs
following "Switching to new root" message.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install mkinitrd-4.1.8-1.
2. Regenerate my initrd.
Actual Results: System hangs. I added some printfs to nash and the
hang seems to happen inside the getKernelCmdLine() function that is
called by switchrootCommand(). The hang happens immediately following
"buf = malloc(CMDLINESIZE);"
The getKernelCmdLine() function is also called earlier by the
mkrootdevCommand(), which does not have any trouble.
Perhaps there is some type of heap corruption that is causing "buf =
malloc(CMDLINESIZE);" to die.
I would love to run nash through valgrind but I don't have an x86 machine.
I should have been more clear that I am having this problem on a
It seems that the definition of CMDLINESIZE may cause this. Nash.c
defines CMDLINESIZE like this:
#define CMDLINESIZE 256
#define CMDLINESIZE 1024
However, the kernel's include/asm-ppc/setup.h defines
COMMAND_LINE_SIZE as 512.
When I change CMDLINESIZE from 256 to 512, I don't have any trouble.
The odd thing is that the read call only reads 31 bytes of command
line on my system. I don't see why changing CMDLINESIZE from 256 to
512 would fix things but it seems to. I'm still not convinced there
isn't some memory issue elsewhere.
Found one little thing with valgrind, it's in 4.1.11 (maybe it'll help...)
Could you try with 4.1.11 (http://people.redhat.com/~katzj/mkinitrd/
will have the package when it's done) and see if that helps?
4.1.11's nash no longer hangs as described above.