Description of problem: Fedora 29, installing Fedora 30 kernels, I get a dracut segmentation fault. Version-Release number of selected component (if applicable): dracut-049-25.git20181204.fc29.x86_64 How reproducible: Always with kernel-5.0.3-300.fc30.x86_64, did not previously happen with 5.0.2. Steps to Reproduce: # ls -l /tmp total 54808 -rw-rw-r--. 1 chris chris 24108 Mar 24 16:50 kernel-5.0.3-300.fc30.x86_64.rpm -rw-rw-r--. 1 chris chris 26728620 Mar 24 16:50 kernel-core-5.0.3-300.fc30.x86_64.rpm -rw-rw-r--. 1 chris chris 29364780 Mar 24 16:50 kernel-modules-5.0.3-300.fc30.x86_64.rpm # dnf install /tmp/*rpm And also on subsequent invocation of: # dracut --debug -f initramfs-5.0.3-300.fc30.x86_64.img 5.0.3-300.fc30.x86_64 Actual results: /usr/lib/dracut/dracut-init.sh: line 969: 9716 Segmentation fault (core dumped) $DRACUT_INSTALL ${initdir:+-D "$initdir"} ${loginstall:+-L "$loginstall"} ${hostonly:+-H} ${omit_drivers:+-N "$omit_drivers"} ${srcmods:+--kerneldir "$srcmods"} ${_optional:+-o} ${_silent:+--silent} -m "$@" dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.937xSB/initramfs -H --kerneldir /lib/modules/5.0.3-300.fc30.x86_64/ -o -m =drivers/net/phy =drivers/net/team =drivers/net/ethernet ecb arc4 bridge stp llc ipv6 bonding 8021q ipvlan macvlan af_packet virtio_net xennet Expected results: Should not crash. Additional info: Does not happen with kernel 5.0.2
Created attachment 1547546 [details] dracut with debug option # dracut --debug -f initramfs-5.0.3-300.fc30.x86_64.img 5.0.3-300.fc30.x86_64 crash happens at line 32901
dmesg shows [ 1620.520027] dracut-install[29478]: segfault at 0 ip 000055b7f9f50444 sp 00007ffd9397d568 error 4 in dracut-install[55b7f9f4a000+a000] [ 1620.520048] Code: f2 9d 00 00 48 89 1d eb 9d 00 00 48 89 03 5b c3 66 0f 1f 44 00 00 48 89 df 5b e9 67 a2 ff ff 0f 1f 80 00 00 00 00 f3 0f 1e fa <0f> be 17 b8 05 15 00 00 84 d2 74 18 89 c1 48 83 c7 01 c1 e1 05 01
$ sudo coredumpctl info 29478 PID: 29478 (dracut-install) UID: 0 (root) GID: 0 (root) Signal: 11 (SEGV) Timestamp: Sun 2019-03-24 17:15:29 MDT (17min ago) Command Line: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.ZcZyx6/initramfs -H --kerneldir /lib/modules/5.0.3-300.fc30.x86_64/ -o -m =drivers/net/phy =drivers/net/te> Executable: /usr/lib/dracut/dracut-install Control Group: /user.slice/user-1000.slice/session-1.scope Unit: session-1.scope Slice: user-1000.slice Session: 1 Owner UID: 1000 (chris) Boot ID: 51d9b86156d94d21a12cde714466ce5c Machine ID: 507442eec2af4c03ae5602ccbb5417b3 Hostname: fnuc.local Storage: /var/lib/systemd/coredump/core.dracut-install.0.51d9b86156d94d21a12cde714466ce5c.29478.1553469329000000.lz4 Message: Process 29478 (dracut-install) of user 0 dumped core. Stack trace of thread 29478: #0 0x000055b7f9f50444 n/a (dracut-install) #1 0x000055b7f9f5087a n/a (dracut-install) #2 0x000055b7f9f4c829 n/a (dracut-install) #3 0x000055b7f9f4e7cf n/a (dracut-install) #4 0x000055b7f9f4ee6b n/a (dracut-install) #5 0x000055b7f9f4f874 n/a (dracut-install) #6 0x000055b7f9f4b79d n/a (dracut-install) #7 0x00007f73e8301413 __libc_start_main (libc.so.6) #8 0x000055b7f9f4ba7e n/a (dracut-install) fnuc.local chris ~
$ sudo coredumpctl gdb 29478 PID: 29478 (dracut-install) UID: 0 (root) GID: 0 (root) Signal: 11 (SEGV) Timestamp: Sun 2019-03-24 17:15:29 MDT (23min ago) Command Line: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.ZcZyx6/initramfs -H --kerneldir /lib/modules/5.0.3-300.fc30.x86_64/ -o -m =drivers/net/phy =drivers/net/team =drivers/net/ethernet ecb arc4 bridge stp llc ipv6 bonding 8021q ipvlan macvlan af_packet virtio_net xennet Executable: /usr/lib/dracut/dracut-install Control Group: /user.slice/user-1000.slice/session-1.scope Unit: session-1.scope Slice: user-1000.slice Session: 1 Owner UID: 1000 (chris) Boot ID: 51d9b86156d94d21a12cde714466ce5c Machine ID: 507442eec2af4c03ae5602ccbb5417b3 Hostname: fnuc.local Storage: /var/lib/systemd/coredump/core.dracut-install.0.51d9b86156d94d21a12cde714466ce5c.29478.1553469329000000.lz4 Message: Process 29478 (dracut-install) of user 0 dumped core. Stack trace of thread 29478: #0 0x000055b7f9f50444 n/a (dracut-install) #1 0x000055b7f9f5087a n/a (dracut-install) #2 0x000055b7f9f4c829 n/a (dracut-install) #3 0x000055b7f9f4e7cf n/a (dracut-install) #4 0x000055b7f9f4ee6b n/a (dracut-install) #5 0x000055b7f9f4f874 n/a (dracut-install) #6 0x000055b7f9f4b79d n/a (dracut-install) #7 0x00007f73e8301413 __libc_start_main (libc.so.6) #8 0x000055b7f9f4ba7e n/a (dracut-install) GNU gdb (GDB) Fedora 8.2-6.fc29 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/lib/dracut/dracut-install...Reading symbols from /usr/lib/debug/usr/lib/dracut/dracut-install-049-25.git20181204.fc29.x86_64.debug...done. done. [New LWP 29478] warning: Loadable section ".note.gnu.property" outside of ELF segments warning: Loadable section ".note.gnu.property" outside of ELF segments warning: Loadable section ".note.gnu.property" outside of ELF segments warning: Loadable section ".note.gnu.property" outside of ELF segments warning: Loadable section ".note.gnu.property" outside of ELF segments [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `/usr/lib/dracut/dracut-install -D /var/tmp/dracut.ZcZyx6/initramfs -H --kerneld'. Program terminated with signal SIGSEGV, Segmentation fault. #0 string_hash_func (p=0x0) at install/hashmap.c:130 130 install/hashmap.c: No such file or directory. (gdb) thread apply all bt full Thread 1 (Thread 0x7f73e8273740 (LWP 29478)): #0 string_hash_func (p=0x0) at install/hashmap.c:130 hash = 5381 c = 0x0 #1 0x000055b7f9f5087a in hashmap_get (h=0x7f73e81ed860, key=key@entry=0x0) at install/hashmap.c:362 hash = <optimized out> e = <optimized out> #2 0x000055b7f9f4c829 in check_hashmap (hm=<optimized out>, item=item@entry=0x0) at install/dracut-install.c:591 existing = <optimized out> #3 0x000055b7f9f4e7cf in install_dependent_modules (modlist=0x55b7fad34e40) at install/dracut-install.c:1247 mod = 0x55b7fad33410 itr = 0x55b7fad34e40 path = 0x0 name = <optimized out> ret = 0 __func__ = "install_dependent_modules" #4 0x000055b7f9f4ee6b in install_module (mod=0x55b7fad33300) at install/dracut-install.c:1335 ret = 0 modlist = 0x0 modpre = 0x55b7fad34e40 modpost = 0x0 path = 0x55b7fad29480 "/lib/modules/5.0.3-300.fc30.x86_64//kernel/drivers/net/ethernet/realtek/r8169.ko.xz" name = <optimized out> __func__ = "install_module" #5 0x000055b7f9f4f874 in install_modules (argc=<optimized out>, argv=<optimized out>) at install/dracut-install.c:1626 modlist = 0x55b7fad33cb0 modname = 0x55b7fad33b90 "r8169" ftsent = <optimized out> path1 = 0x55b7fad28d90 "/lib/modules/5.0.3-300.fc30.x86_64//extra/drivers/net/ethernet" path2 = 0x55b7fad309d0 "/lib/modules/5.0.3-300.fc30.x86_64//kernel/drivers/net/ethernet" path3 = 0x55b7fad28f30 "/lib/modules/5.0.3-300.fc30.x86_64//updates/drivers/net/ethernet" fts = <optimized out> r = <optimized out> ret = 0 ctx = 0x55b7fad213d0 itr = 0x55b7fad33cb0 mod = 0x55b7fad33300 mod_o = 0x0 abskpath = <optimized out> p = <optimized out> i = <optimized out> modinst = <optimized out> __func__ = "install_modules" --Type <RET> for more, q to quit, c to continue without paging--c #6 0x000055b7f9f4b79d in main (argc=<optimized out>, argv=0x7ffd9397e088) at install/dracut-install.c:1805 r = 0 i = <optimized out> path = <optimized out> __func__ = "main" (gdb) q
OK I'm wrong it also happens with 5.0.2, but not with 4.20.16. So it seems like some interaction with 5.0 kernels and dracut. We've been seeing these faults in Fedora 30 QA testing as well.
Cute, forgot I filed a bug about this already. *** This bug has been marked as a duplicate of bug 1676357 ***