FS#27862 - [kmod] Bug with libkmod when building initrd file.

Attached to Project: Arch Linux
Opened by Frederic Bezies (fredbezies) - Saturday, 07 January 2012, 19:53 GMT
Last edited by Dave Reisner (falconindy) - Monday, 09 January 2012, 10:54 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: Hello. When I upgraded linux kernel on my acer 5520, I got this for main initrd image :

-> Parsing hook: [autodetect]
libkmod: kmod_lookup_alias_from_alias_bin: File name too long

Additional info:

linux 3.2.0-2
kmod 3-4

Steps to reproduce:

See details.

I don't know if it is related, but I have to boot 3 or 4 times in order to get a working system. Other times, I get an initrd shell, and I have to do a reboot using ctrl-alt-del.

The message is related to a / partition which cannot be found, because of an UUID not found.
This task depends upon

Closed by  Dave Reisner (falconindy)
Monday, 09 January 2012, 10:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  testing kmod/3-5
Comment by Frederic Bezies (fredbezies) - Saturday, 07 January 2012, 20:16 GMT
Got the bug right now on my laptop : copying it. Have it with main and fallback initrd image.

ERROR: Unable to find root device 'UUID=cfbc185c-cab3-48c0-bb97-820134b14bfd'.
You are being dropped to a recovery shell
Type 'exit" to try and continue booting
sh: can't access tty; job control turned off

When I type exit :
mount: you must specify the filesystem type
You are being dropped into an emergency shell
sh: can't access tty; job control turned off

And last exit :
ERROR: Failed to mount the real root device.
Bailing out, you're on your own. Good Luck.
sh: can't access tty; job control turned off

Here is the grub.cfg part related to root UUID :

linux /vmlinuz-linux root=UUID=cfbc185c-cab3-48c0-bb97-820134b14bfd ro quiet
echo 'Chargement du disque mémoire initial ...'
initrd /initramfs-linux.img

Here is the log of last linux update :

[2012-01-07 20:47] ==> Building image from preset: 'default'
[2012-01-07 20:47] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/
initramfs-linux.img
[2012-01-07 20:47] ==> Starting build: 3.2.0-2-ARCH
[2012-01-07 20:47] -> Parsing hook: [base]
[2012-01-07 20:47] -> Parsing hook: [udev]
[2012-01-07 20:47] -> Parsing hook: [autodetect]
[2012-01-07 20:47] libkmod: kmod_lookup_alias_from_alias_bin: File name too long
[2012-01-07 20:47] -> Parsing hook: [pata]
[2012-01-07 20:47] -> Parsing hook: [scsi]
[2012-01-07 20:47] -> Parsing hook: [sata]
[2012-01-07 20:47] -> Parsing hook: [filesystems]
[2012-01-07 20:47] -> Parsing hook: [usbinput]
[2012-01-07 20:47] ==> Generating module dependencies
[2012-01-07 20:47] ==> Creating gzip initcpio image: /boot/initramfs-linux.img
[2012-01-07 20:47] ==> Image generation successful
[2012-01-07 20:47] ==> Building image from preset: 'fallback'
[2012-01-07 20:47] -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
[2012-01-07 20:47] ==> Starting build: 3.2.0-2-ARCH
[2012-01-07 20:47] -> Parsing hook: [base]


Comment by Dave Reisner (falconindy) - Saturday, 07 January 2012, 21:10 GMT
You're conflating two bugs into one.

1) the "filename too long" error from libkmod. I need more info: Please run this and post the log:

{
find /sys -name modalias
printf '\n\n'
find /sys -name modalias -exec sort -u {} + | while read -r mod; do printf '==> %s\n' "$mod"; modprobe -vvvvvR $mod; done
} &>logfile

My guess is that this error was always hit, kmod is just the first to tell you about it. module-init-tools has awful error reporting.

2) Failure to boot. I know about this. The initramfs is correct and everything you need is in it. As far as I can tell, it's a race in modprobe. Not going to deal with this particular bug in this report.
Comment by Dave Reisner (falconindy) - Sunday, 08 January 2012, 03:40 GMT
'name too long' turned out to be a bug in libkmod after all. It's fixed upstream. Not going to reroll a new package just yet, but please retest if you can:

http://dev.archlinux.org/~dreisner/kmod-3-4.1-i686.pkg.tar.xz
http://dev.archlinux.org/~dreisner/kmod-3-4.1-x86_64.pkg.tar.xz

Install and regenerate your initramfs. The error should be gone, but I need to know if you still have the same sporadic issues with booting.
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 06:52 GMT
Logfile you asked for.

Modprobe problem, maybe. Sometimes when I can boot, ath5k module doesn't seem to be loaded. It is needed by the laptop wifi chipset.
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 06:59 GMT
Error is gone. Try rebooting ;)
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 07:02 GMT
Reboot successfull after 3 failures. Very strange. Thanks for fixing kmod, even if my starting troubles began with kmod replace modules-init-tools.
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 07:06 GMT
Here is what my dmesg | tail gave me on successful start :

[fred@fredo-arch ~]$ dmesg | tail
[ 17.054925] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 18.486766] wlan0: authenticate with f4:ca:e5:de:ce:64 (try 1)
[ 18.488376] wlan0: authenticated
[ 18.494881] wlan0: associate with f4:ca:e5:de:ce:64 (try 1)
[ 18.517437] wlan0: RX AssocResp from f4:ca:e5:de:ce:64 (capab=0x411 status=0 aid=1)
[ 18.517450] wlan0: associated
[ 18.522909] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 18.678669] Intel AES-NI instructions are not detected.
[ 31.733188] EXT4-fs (sda5): re-mounted. Opts: commit=600
[ 31.857199] EXT4-fs (sda6): re-mounted. Opts: commit=600

Adding my full dmesg if it could help.
   dmesg.log (47.1 KiB)
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 10:14 GMT
Downgrading again kmod to module-init-tools makes my laptop booting 100% of the time. So, there is a bug in kmod somewhere.

Maybe a new bug is needed here.
Comment by Dave Reisner (falconindy) - Sunday, 08 January 2012, 20:25 GMT
New packages:

http://dev.archlinux.org/~dreisner/kmod-3-4.2-x86_64.pkg.tar.xz
http://dev.archlinux.org/~dreisner/kmod-3-4.2-i686.pkg.tar.xz

This should fix the periodic boot failures. Please install, regenerate your initramfs and reboot a few times.
Comment by Frederic Bezies (fredbezies) - Sunday, 08 January 2012, 21:04 GMT
Well, this time, you nail this bug down. Boot it twice with this package version without problems. Thanks a lot, I only hope this version will boot flawlessly on my desktop :D
Comment by Jens Adam (byte) - Sunday, 08 January 2012, 21:12 GMT
Well, I was about to post a long rant about Arch devs not testing stuff and pushing buggy packages upon users ... but it seems like I simply ignored the "/usr on separate filesystem" warnings for too long.
/sbin/modprobe is a symlink to /usr/bin/kmod now.

Any quick pointers on The Right Way/Place[tm] to mount /usr in initramfs?
Comment by Dave Reisner (falconindy) - Sunday, 08 January 2012, 21:13 GMT
completely outside the scope of this bug report, but here, have a mkinitcpio branch:

http://code.falconindy.com/cgit/mkinitcpio.git/log/?h=usr

make sure you have the shutdown and fsck hooks in /etc/mkinitcpio.conf.
Comment by Jens Adam (byte) - Sunday, 08 January 2012, 23:31 GMT
kmod-3-4.2-i686 + mkinitcpio-git (usr branch) work fine, thanks.

Loading...