Am 11.04.2015 um 15:17 schrieb Bernhard Übelacker:
> Package: udev
> Version: 215-14
> Severity: normal
> 
> Dear Maintainer,
> when I insert a specific USB-stick I see following symptoms:
> - cpu usage rises (/lib/systemd/systemd-udevd, /usr/lib/udisks2/udisksd,
> /usr/bin/plasma-desktop)
> - it takes up to a minute until the device notifier popups.
> 
> Took then a closer look by calling "(udevadm monitor | ts & journalctl -f) >
> systemd-udevd-008-hama.txt"
> when doing following actions (see attached file systemd-udevd-006.txt):
> 
> - 14:50:00 physically attached USB-stick
> - 14:50:01 kernel: sd 12:0:0:0: [sdd] Attached SCSI removable disk
> - 14:50:02 KERNEL[99837.550175] change
> /devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host15/target15:0:0/15:0:0:0/block/sde
> (block)
> -          this "KERNEL.*change.*block" message is received another 741 times
> - 14:50:05 rechner kernel: sd 15:0:0:0: [sde] 2004991 512-byte logical blocks:
> (1.02 GB/978 MiB)
> - 14:50:05 KERNEL[99840.590862] add
> /devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host15/target15:0:0/15:0:0:0/block/sde/sde1
> (block)
> - 14:50:59 UDEV  [99894.356135] add
> /devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/host15/target15:0:0/15:0:0:0/block/sde/sde1
> (block)
> - 14:50:59 now the device notifier was opened
> 
> It seems that for this USB-stick the kernel sends too early/too many
> of these "change block" events.
> Unfortunately receiving this events is much cheaper than processing
> them, so in these 3 seconds there are 9 times more received than processed.
> 
> As all events are put into a queue the final "add block" event is only
> processed when all "change block" before were finished. In this case
> this took from 14:50:02 to 14:50:59.
> 
> I am unsure if this is strictly a problem with systemd-udev, which should
> be prepared for such a "event storm", or if it should be assigned to the
> kernel, where I assume these events are originating from.
> 
> Kind regards,
> Bernhard
> 
> 
> 
> root@rechner:~# uname -a
> Linux rechner 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64
> GNU/Linux


Processing 1000 udev add events can be costly, because udev will likely
spawn lots of (external) helpers, like blkid.
Depending on how fast your system is, that can take a while.

Smells like a kernel (or hardware bug), if it generates almost 1000 add
events for the same device.

Ben, what do you think?



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to