FS#48302 - boot crashes often because of udev rule

Attached to Project: Arch Linux
Opened by alex (kabolt) - Monday, 22 February 2016, 19:09 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 24 February 2016, 12:35 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I experience boot crashes (crashes often but not always when udev kernel hook is called) with an ata (CRC) error because of this line in the udev rule 60-persistent-storage.rules (/usr/lib/udev/rules):
# ATAPI devices (SPC-3 or later)
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode"

Commenting out the second line in (/usr/lib/udev...( and then recompiling the kernel (with mkinitcpio) helps. I found this fix on:
https://paulphilippov.com/articles/how-to-fix-slow-boot-with-ata-errors

Additional info:
system:
- systemd-229-3
- linux-grsec 4.4.2.201602182048-1
- Mainboard: QC5000-ITX/PH
- Processor: A4-5000 (AMD)
- Disk: HGST HTS545050A7
- CDROM: HL-DT-ST BD-RE BH16NS40

This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 24 February 2016, 12:35 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Removing udev rules is no way to work around buggy hardware.
Comment by Dave Reisner (falconindy) - Monday, 22 February 2016, 21:04 GMT
The blog post you point to is hardly advertising a fix. It's just avoiding the behavior rather than addressing the real problem. As a result, your disks are missing out on udev properties which could cause other programs to misbehave. Your screenshot is useless due to the wobble and glare, so it's extremely difficult to know what is happening. Sometimes, ATA command failures are caused by something as simple as a poorly seated or broken ATA cable.

Please understand that mkinitcpio doesn't compile a kernel, it just builds an initramfs image. "udev" is an initramfs hook, not a kernel hook (which isn't a thing that exists).
Comment by Doug Newgard (Scimmia) - Tuesday, 23 February 2016, 13:45 GMT
Sure sounds like you're just trying to get around bad hardware.
Comment by alex (kabolt) - Tuesday, 23 February 2016, 21:58 GMT
Sorry for the bad quality screenshot, it just appears for a short time before rebooting.
But what it says is that there is some ata crc error (this is also shown in the smart properties).
The same configuration worked with an older mainboard (and cpu).

I think there are two factors: I still use the old way to boot and by this detection is a higher ata mode requested as what my disk can offer.
The cables are not to blame: I tested some cables and sataports, also this problem disappeared by commenting out that line.
Comment by Dave Reisner (falconindy) - Tuesday, 23 February 2016, 22:04 GMT
Then please file a bug against the kernel for your buggy hardware.
Comment by alex (kabolt) - Wednesday, 24 February 2016, 12:33 GMT
I think I found the problem: it is a faulty rule in the compatibility module of the mainboard (launches only if legacy boot is activated).
Deactivating it seems to help.

Loading...