Bug 430301 - (F9 and F8 mixing unsupported) mkinitrd fails - segfault in nash
Summary: (F9 and F8 mixing unsupported) mkinitrd fails - segfault in nash
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: 8
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-01-25 22:20 UTC by Neal Becker
Modified: 2008-06-09 09:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-03-19 05:19:08 UTC

Attachments (Terms of Use)
Patch backported from mkinitrd-6.0.43-1.fc9 (717 bytes, patch)
2008-04-14 00:04 UTC, Pavel Roskin
no flags Details | Diff

Description Neal Becker 2008-01-25 22:20:25 UTC
Description of problem:

segfault in nash!

nash received SIGSEGV!  Backtrace (12):

sh -x /sbin/mkinitrd -v -f /tmp/initrd-
+ case " $handleddevices " in
+ handleddevices=' md0 sda'
+ [[ sda =~ md[0-9]+ ]]
+ vecho 'Looking for driver for device sda'
+ '[' 'Looking for driver for device sda' == -n ']'
+ '[' -n -v ']'
+ echo 'Looking for driver for device sda'
Looking for driver for device sda
+ [[ sda =~ ^mapper/ ]]
++ findone -type d /sys/block -name sda
++ echo nash-find -type d /sys/block -name sda
++ /sbin/nash --force --quiet
++ /bin/awk '{ print $1; exit; }'
nash received SIGSEGV!  Backtrace (12):

Version-Release number of selected component (if applicable):

 rpm -qf /sbin/nash
 rpm -q mkinitrd
How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Osma Ahvenlampi 2008-01-27 08:19:42 UTC
Got this as well. Currently running kernel-, can't generate an
initrd for kernel- due to this error.

Comment 2 Osma Ahvenlampi 2008-01-27 08:29:35 UTC
looks like it might have been caused by glib2-2.15.2-1.fc9 (I'm running
partially rawhide due to tracking evolution packages), problem went away by
upgrading to glib2-2.15.3-1.fc9 and libbdevid-python-6.0.28-3.fc9 

Comment 3 Neal Becker 2008-01-27 11:22:10 UTC
Yes, that fixed it for me, thanks!

Comment 4 William M. Brack 2008-03-19 05:12:58 UTC
similar problem fixed for me by downgrading glib2-2.16.1-1.fc9 to glib2-2.14.6-1.fc8

Comment 5 Warren Togami 2008-03-19 05:19:08 UTC
Mixing packages from F9 in F8 will often break your system. This is unsupported.

Comment 6 Pavel Roskin 2008-04-11 19:47:48 UTC
I think it would still be a good idea to understand why it's breaking.  glib2 is
supposed to be backwards compatible, which means that such things are not
supposed to happen.

The crash happens or cleanup, which means that merely running nash with wrong
arguments (like "nash -h") would cause it to crash.

# /sbin/nash -h
unknown argument -h
nash received SIGSEGV!  Backtrace (12):

And here's the gdb backtrace

Program received signal SIGSEGV, Segmentation fault.
g_hash_table_remove_node (hash_table=0x1a74800, node_ptr_ptr=0x7fffe01802d0,
    at ghash.c:198
198       *node_ptr = node->next;
(gdb) where
#0  g_hash_table_remove_node (hash_table=0x1a74800, node_ptr_ptr=0x7fffe01802d0,
    at ghash.c:198
#1  0x00007ffdd7473159 in g_hash_table_foreach_remove_or_steal
    func=0x7ffdd7b43347, user_data=0x1a73a30, notify=1) at ghash.c:972
#2  0x00007ffdd7b43411 in bdevid_module_unload_all () from
#3  0x00007ffdd7b42bef in bdevid_destroy () from /usr/lib64/libbdevid.so.6.0.19
#4  0x00007ffdd7d5bfe2 in ?? () from /usr/lib64/libnash.so.6.0.19
#5  0x00007ffdd7d5c661 in nash_vitals_destroy_probes () from
#6  0x00007ffdd7d4cef4 in _nashFreeContext () from /usr/lib64/libnash.so.6.0.19
#7  0x000000000040cba0 in ?? ()
#8  0x00007ffdd6e7632a in __libc_start_main (main=0x40c8c7, argc=2,
    init=<value optimized out>, fini=<value optimized out>, rtld_fini=<value
optimized out>, 
    stack_end=0x7fffe0180578) at libc-start.c:220
#9  0x0000000000404179 in ?? ()
#10 0x00007fffe0180578 in ?? ()
#11 0x000000000000001c in ?? ()
#12 0x0000000000000002 in ?? ()
#13 0x00007fffe01826d6 in ?? ()
#14 0x00007fffe01826e1 in ?? ()
#15 0x0000000000000000 in ?? ()
(gdb) p node
$1 = (GHashNode *) 0x0

Comment 7 Warren Togami 2008-04-12 05:06:34 UTC
If you can boil it down to a bit of glib2 using code that builds on F8 and
crashes on F9 then you might have found a legitimate glib2 bug that should be
reported upstream.  But otherwise realistically resources cannot be prioritized
for this specific issue. 

Comment 8 Pavel Roskin 2008-04-14 00:04:36 UTC
Created attachment 302288 [details]
Patch backported from mkinitrd-6.0.43-1.fc9

This patch fixes the problem.  And that's the corresponding chaglelog entry
from mkinitrd.spec:

* Fri Dec 21 2007 Peter Jones <pjones@redhat.com> - 6.0.25-1
- Don't remove two things from a GHashTable at the same time;
  it doesn't work with newer glib2.

Comment 9 Pavel Roskin 2008-04-14 11:59:20 UTC
The bug doesn't just affect the case where packages from different versions of
Fedora are mixed.  I installed the latest glib into /usr/local to be able to
compile the latest swfdec.  I was assured that it's backwards compatible.  Yet
installing kernels stopped working after that.

Comment 10 David Fraser 2008-06-09 09:20:04 UTC
Having had the same problem with glibc, I simply rebuilt the src rpm from
http://koji.fedoraproject.org/koji/buildinfo?buildID=28893 and that worked fine.

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