Bug 205635

Summary: grubby and nash crash with bad free()
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-08 12:42:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2006-09-07 18:43:17 UTC
Description of problem:
Updating to today's rawhide (from a fresh install of FC6-Test3-20060906.0, if it
makes a difference) resulted in no new entries for the 2630 kernels that were
installed.  Adding the entries to grub.conf by hand and rebooting, nash would
crash with a bad free().  Downgrading mkinitrd to -10 fixed the problem.

Investigating the update logs, I found the following:

awk: warning: escape sequence `\]' treated as plain `]'
*** glibc detected *** /sbin/grubby: free(): invalid pointer: 0x00000037e59499e0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x37e566eb00]
/lib64/libc.so.6(cfree+0x8c)[0x37e567227c]
/sbin/grubby[0x451eb5]
/sbin/grubby[0x40fff9]
/sbin/grubby[0x410ba2]
/sbin/grubby[0x40dfe9]
/sbin/grubby[0x40e183]
/sbin/grubby[0x40e270]
/sbin/grubby[0x40874d]
/sbin/grubby[0x408943]
/sbin/grubby[0x409a90]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x37e561da44]
/sbin/grubby[0x404339]
======= Memory map: ========
00400000-00496000 r-xp 00000000 fd:01 3822687                           
/sbin/grubby
00696000-0069b000 rw-p 00096000 fd:01 3822687                           
/sbin/grubby
0069b000-00755000 rw-p 0069b000 00:00 0                                  [heap]
37e4600000-37e461a000 r-xp 00000000 fd:01 2203856                       
/lib64/ld-2.4.90.so
37e4819000-37e481a000 r--p 00019000 fd:01 2203856                       
/lib64/ld-2.4.90.so
37e481a000-37e481b000 rw-p 0001a000 fd:01 2203856                       
/lib64/ld-2.4.90.so
37e5600000-37e5744000 r-xp 00000000 fd:01 2203858                       
/lib64/libc-2.4.90.so
37e5744000-37e5944000 ---p 00144000 fd:01 2203858                       
/lib64/libc-2.4.90.so
37e5944000-37e5948000 r--p 00144000 fd:01 2203858                       
/lib64/libc-2.4.90.so
37e5948000-37e5949000 rw-p 00148000 fd:01 2203858                       
/lib64/libc-2.4.90.so
37e5949000-37e594e000 rw-p 37e5949000 00:00 0 
37e9e00000-37e9e0d000 r-xp 00000000 fd:01 2203865                       
/lib64/libgcc_s-4.1.1-20060828.so.1
37e9e0d000-37ea00c000 ---p 0000d000 fd:01 2203865                       
/lib64/libgcc_s-4.1.1-20060828.so.1
37ea00c000-37ea00d000 rw-p 0000c000 fd:01 2203865                       
/lib64/libgcc_s-4.1.1-20060828.so.1
2aaaaaaab000-2aaaaaaac000 rw-p 2aaaaaaab000 00:00 0 
2aaaaaaee000-2aaaaaaf0000 rw-p 2aaaaaaee000 00:00 0 
2aaaac000000-2aaaac021000 rw-p 2aaaac000000 00:00 0 
2aaaac021000-2aaab0000000 ---p 2aaaac021000 00:00 0 
7fffc2cf1000-7fffc2d07000 rw-p 7fffc2cf1000 00:00 0                      [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
/sbin/new-kernel-pkg: line 90:  4270 Aborted                 $grubby
--add-kernel=$bootPrefix/$kernelName-$version $INITRD --copy-default
$makedefault --title "$title" ${mbkernel:+--add-multiboot="$mbkernel"}
${mbargs:+--mbargs="$mbargs"} --args="root=$rootdevice $kernargs"
--remove-kernel="TITLE=$title"


Version-Release number of selected component (if applicable):
mkinitrd-5.1.11-1
kernel-2.6.17-1.2627.fc6 (running)
kernel-2.6.17-1.2630.fc6 (installing)
glibc-2.4.90-29

How reproducible:
Haven't tried to duplicate it

Additional info:
This is a 4-disk system with lots of PVs on RAID 1.

I see now that libbdevid-python was updated *after* the new kernel (maybe
mkinitrd needs a Prereq as opposed to Requires?), but kernel-xen and
kernel-kdump were installed afterwards and grubby crashed on them just the same.
 I didn't try to boot into kernel-xen, though.

Comment 1 Alexandre Oliva 2006-09-07 18:47:00 UTC
Err...  I misread the update log.  grubby didn't crash on kernel-kdump, of
course.  It doesn't even run! :-)

Comment 2 Peter Jones 2006-09-07 21:30:41 UTC
... grubby doesn't need libbdevid-python; anaconda does ;)

Can you try the packages at http://devserv.devel.redhat.com/~pjones/mkinitrd/ ?

Comment 3 Alexandre Oliva 2006-09-08 12:42:31 UTC
Success, thanks!