Bug 131195 - Mkinitrd hangs after "Switching to new root"
Summary: Mkinitrd hangs after "Switching to new root"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: powerpc
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
 
Reported: 2004-08-28 21:32 UTC by W. Michael Petullo
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: mkinitrd-4.1.11-1
Clone Of:
Environment:
Last Closed: 2004-09-12 02:38:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description W. Michael Petullo 2004-08-28 21:32:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.2)
Gecko/20040809 Epiphany/1.3.5

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):
mkinitrd-4.1.8-1

How reproducible:
Always

Steps to Reproduce:
1.  Install mkinitrd-4.1.8-1.
2.  Regenerate my initrd.
3.  Reboot.
    

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.

Additional info:

Comment 1 W. Michael Petullo 2004-08-28 21:39:32 UTC
I should have been more clear that I am having this problem on a
PowerPC-based iBook.

Comment 2 W. Michael Petullo 2004-09-03 21:55:30 UTC
It seems that the definition of CMDLINESIZE may cause this.  Nash.c
defines CMDLINESIZE like this:

#ifdef __powerpc__
#define CMDLINESIZE 256
#else
#define CMDLINESIZE 1024
#endif

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.

Comment 3 Jeremy Katz 2004-09-10 21:30:54 UTC
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?

Comment 4 W. Michael Petullo 2004-09-12 02:38:41 UTC
4.1.11's nash no longer hangs as described above.


Note You need to log in before you can comment on or make changes to this bug.