FS#30954 - [udev] udev in early init hangs on module insertion w/o firmware

Attached to Project: Arch Linux
Opened by Artem A Klevtsov (unikum) - Wednesday, 01 August 2012, 06:57 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 04 August 2012, 13:28 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

After recent update system began hangs during boot with the message:
:: running early hook [udev]

Additional info:
* package version(s)
core/mkinitcpio 0.10-1
* config and/or log files etc.


Steps to reproduce:
Update mkinitcpio to 0.10-1
Rebuild kernel image (mkinitcpio -p linux)
Reboot
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 04 August 2012, 13:28 GMT
Reason for closing:  Upstream
Additional comments about closing:  This is specific to the microcode module in this case. Don't include it in the initramfs without firmware. If you want that behavior changed, take it upstream.
Comment by Artem A Klevtsov (unikum) - Wednesday, 01 August 2012, 07:19 GMT
Downgrade mkinitcpio and rebuild kernel image solve this issue.
Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 12:03 GMT
You'll need to reproduce the hang with an image generated by mkinitcpio 0.10 and attach here or provide a link to the image itself.
Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 12:21 GMT
Hmm... why do you have microcode in your initramfs without the firmware? This is probably why udev hangs.
Comment by Artem A Klevtsov (unikum) - Wednesday, 01 August 2012, 12:21 GMT
On my laptop (Archlinux i686) also reproduce this issue.
Comment by Artem A Klevtsov (unikum) - Wednesday, 01 August 2012, 12:23 GMT Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 12:30 GMT
Not interest in a kernel bzImage.

Can you boot properly with modprobe.blacklist=microcode on your kernel cmdline? Does udev eventually timeout waiting for a firmware request?
Comment by Thomas Bächler (brain0) - Wednesday, 01 August 2012, 12:32 GMT
Even with missing firmware, it shouldn't stall. It especially shouldn't stall when starting udev, but while settling.
Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 12:39 GMT
Ah, true. settle isn't called until later. Anyways, this seems more like a udev bug than a mkinitcpio bug. We're adopting slightly different behavior with /etc/initrd-release existing in the initramfs.

http://projects.archlinux.org/mkinitcpio.git/commit/?id=b8459a2ac067b05

Though, based on the udev code, I'm not quite sure why this would break other than due to a firmware request.
Comment by Artem A Klevtsov (unikum) - Wednesday, 01 August 2012, 12:44 GMT
Remove icrocode from mkinitcpio.conf solved problem.
Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 20:20 GMT
This thread is now about ponies^wudev.
Comment by Dave Reisner (falconindy) - Wednesday, 01 August 2012, 20:37 GMT
Just to be clear for anyone else reading this, the hang is on _modprobe_ because of the firmware request. It only happens when /etc/initrd-release exists (which alters udev's behavior wrt firmware slightly), and it does eventually timeout.
Comment by Tom Gundersen (tomegun) - Wednesday, 01 August 2012, 22:51 GMT
With the new udev/mkinitcpio firmware requests that cannot be fulfilled in the initramfs (due to the firmware not being around) will hang around and wait for the udev in the real root to deal with them. Earlier the firmware request would simply fail.

This is what you want in most cases.

However, the microcode module is a bit special as its only purpose is to load the relevant firmware. It is synchronous, and does not finish until the firmware is loaded, or fails to load (which no longer happens in the initramfs), or a two minute timeout is reached.

In your case the relevant firmware is not part of the initramfs, so the request waits for two minutes. Note that earlier the request would simply fail, so in practice you are not losing out on anything (except for two minutes of wasted time).

Just remove 'microcode' from the initramfs and everything should be fine.

@Dave: does mkinitcpio include all the relevant firmware that is installed? If so maybe we don't want to be doing this?
Comment by Dave Reisner (falconindy) - Thursday, 02 August 2012, 13:19 GMT
Yep, we pull in firmware listed for a module on addition. We could probably drop this.
Comment by Thomas Bächler (brain0) - Thursday, 02 August 2012, 13:45 GMT
There's a fuckton of reasons not to drop it - the first being radeon KMS.
Comment by Dave Reisner (falconindy) - Thursday, 02 August 2012, 13:46 GMT
Yeah... I did want feedback from someone with a radeon before I actually went through with it.

Loading...