Ubuntu 10.04 32bit. Udev high cpu usage when it is started also on AMD64 debian testing

Bug #578180 reported by Andrius Jurkus
66
This bug affects 14 people
Affects Status Importance Assigned to Milestone
udev (Debian)
Fix Released
Unknown
udev (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: udev

Starting stopping udev dont help. This happened in a fresh install ubuntu 10.04 32bit same thing is in debian testing (amd64)

stoping udev cpu usage goes back to normal.

Top causes for wakeups:
   0.0% ( 0.0)D udevd
  41.2% (519.3) [ahci] <interrupt>
  35.0% (441.1) [kernel scheduler] Load balancing tick
   7.0% ( 88.6) [Rescheduling interrupts] <kernel IPI>
   1.6% ( 20.1)D firefox-bin
   2.1% ( 26.6) rhythmbox
   1.9% ( 24.5) USB device 1-2 : USB2.0-CRW (Generic)
   1.6% ( 20.2) wnck-applet
   1.5% ( 18.5) [ehci_hcd:usb1, uhci_hcd:usb5, uhci_hcd:usb7] <interrupt>
   1.2% ( 15.7) [eth0] <interrupt>
   1.0% ( 13.0) skype
   1.0% ( 12.0) pulseaudio
   0.9% ( 11.3) [extra timer interrupt]
   0.8% ( 10.0) ubuntuone-syncd
   0.6% ( 8.0) [kernel core] usb_hcd_poll_rh_status (rh_timer_func)
   0.5% ( 5.8) gkrellm
   0.4% ( 5.6) [TLB shootdowns] <kernel IPI>
   0.4% ( 5.0) syndaemon
   0.1% ( 1.6) [kernel core] timer_action (ehci_watchdog)
   0.1% ( 1.6) gnome-terminal
   0.1% ( 1.2) hald-addon-stor
   0.1% ( 1.0) [uhci_hcd:usb3, nvidia] <interrupt>

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
 1507 root 20 0 15684 3108 2484 R 16 0.1 4:22.30 udisks-daemon
25264 wolas 20 0 136m 46m 28m R 13 1.2 3:17.46 nautilus
  856 messageb 20 0 3460 1996 936 R 11 0.0 3:12.93 dbus-daemon
25290 wolas 20 0 33488 3700 2816 S 6 0.1 1:03.18 gvfs-gdu-volume

strace -t -p 1507 -o strace_output

attached below

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: udev 151-12
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic-pae 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Mon May 10 12:19:04 2010
ExecutablePath: /sbin/udevd
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
MachineType: Acer Aspire 6930G
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic-pae root=/dev/sda4
ProcEnviron: PATH=(custom, no user)
SourcePackage: udev
dmi.bios.date: 09/25/2008
dmi.bios.vendor: Acer
dmi.bios.version: v0.3204
dmi.board.name: Makalu
dmi.board.vendor: Acer
dmi.board.version: Not Applicable
dmi.chassis.type: 1
dmi.chassis.vendor: Acer
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnAcer:bvrv0.3204:bd09/25/2008:svnAcer:pnAspire6930G:pvrNotApplicable:rvnAcer:rnMakalu:rvrNotApplicable:cvnAcer:ct1:cvrN/A:
dmi.product.name: Aspire 6930G
dmi.product.version: Not Applicable
dmi.sys.vendor: Acer

Revision history for this message
Andrius Jurkus (wolas) wrote :
Revision history for this message
Andrius Jurkus (wolas) wrote :

forget to mention this is 32 bit ubuntu version

description: updated
Revision history for this message
Andrius Jurkus (wolas) wrote :

damn why here are not edit buton :/ i always first make 1000 mistakes then edit em :) sry for spam. And i didint saw that it automatically add version and etc... dah found it but header cant be changed?

summary: - Udev high cpu usage when it is started also on AMD64 debian testing
+ Ubuntu 10.04 32bit. Udev high cpu usage when it is started also on AMD64
+ debian testing
Revision history for this message
ariel (garcia) wrote :

Well, i have a similar problem with a completely different setup:

Ubuntu 10.04 64bit, but on server hardware: QLogic FibreChannel adapters, with one SAN volume over multiple paths. Multipathd used to rule their access.
Udev keeps "discovering" all those SAN devices... causing a load of 3 approx.!! :-(

Not happening before with Karmic.

Revision history for this message
Kim Yeung (kimyeung123) wrote :

I got the same problem too

my system is
64bit ubuntu
intel G41 chipset
E2140 1.6Ghz

I have to "service udev stop" to bring my system usable again.

How can I provide more log and information for developer to follow up? I am a newbie, please provide detailed command for getting necessary log, thanks.

Revision history for this message
Andrius Jurkus (wolas) wrote :

Here same bug on debian http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581791

BTW in 32bit ubuntu cpu usage is much bigger :)

Revision history for this message
ariel (garcia) wrote :

Ok, i could "work around" the problem in my case, by just disabling the "change" ACTION in
     /lib/udev/rules.d/95-multipath.rules
as discussed in https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/571093/comments/9

In my case, two FiberChannel adapters with access to a SAN device over 4 different paths which are then handled by multipathd, udev was constantly "discovering" the 4 multipath devices (sdb/sdc/sdd/sde) and causing a high CPU load of around 3 (8 CPU system). With "ps" i could see a process tree like this again and again:

  393 ? S<s 22:09 udevd --daemon
20696 ? S< 0:12 \_ udevd --daemon
 7171 ? S< 0:00 | \_ /sbin/multipath -v0 /dev/sdb
 7190 ? R< 0:00 | \_ /sbin/mpath_prio_emc /dev/sdd
20702 ? S< 0:10 \_ udevd --daemon
 7177 ? S< 0:00 | \_ /sbin/multipath -v0 /dev/sdc
 7189 ? R< 0:00 | \_ /lib/udev/scsi_id -g -u -d /dev/sdb
31869 ? S< 0:01 \_ udevd --daemon
 7179 ? S< 0:00 | \_ /sbin/multipath -v0 /dev/sdd
 7191 ? R< 0:00 | \_ /sbin/mpath_prio_emc /dev/sdb
31875 ? S< 0:01 \_ udevd --daemon

After having disabled the "change" ACTION in
     /lib/udev/rules.d/95-multipath.rules
the number of events got reduced from "tons per second" to one every 30 seconds in my hardware.
Thus I conclude that all the other events were spurious events generated by a udev/multipath feedback loop...

However, there is still some additional issue in the kernel/QLA-driver probably:
   the same hardware setup under Karmic doesn't trigger _any_ event in udev, not even that one every 30 seconds!

Revision history for this message
ariel (garcia) wrote :
Revision history for this message
Andrius Jurkus (wolas) wrote :

In my system there isint such file 95-multipath.rules tried to remove everything that look suspiciaus in udev rules or said anything about cd rom. And the cpu usage is till very big i guess if i disable cdrom it will be ok since i dont use it, only for OS installs of course this is lame workaround...)

Another question stop start udev laods all that rules.d directory? no need anything else?

KERNEL[1274446496.324864] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0 (scsi)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0
SUBSYSTEM=scsi
SDEV_MEDIA_CHANGE=1
DEVTYPE=scsi_device
DRIVER=sr
MODALIAS=scsi:t-0x05
SEQNUM=47783

UDEV [1274446496.333536] change /devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0 (block)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0
SUBSYSTEM=block
DEVNAME=/dev/sr0
DEVTYPE=disk
SEQNUM=47782
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RW=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_SCSI=1
ID_VENDOR=Optiarc
ID_VENDOR_ENC=Optiarc\x20
ID_MODEL=DVD_RW_AD-7560S
ID_MODEL_ENC=DVD\x20RW\x20AD-7560S\x20
ID_REVISION=SX07
ID_TYPE=cd
ID_BUS=scsi
ID_PATH=pci-0000:00:1f.2-scsi-1:0:0:0
ACL_MANAGE=1
GENERATED=1
UDISKS_PRESENTATION_NOPOLICY=0
MAJOR=11
MINOR=0
DEVLINKS=/dev/block/11:0 /dev/scd0 /dev/disk/by-path/pci-0000:00:1f.2-scsi-1:0:0:0 /dev/cdrom /dev/cdrw /dev/dvd /dev/dvdrw

Changed in udev (Debian):
status: Unknown → New
Revision history for this message
Trev Peterson (trev-advanced-reality) wrote :

I am experiencing the same problem on the AMD64 kernel. It seems udev is continuously discovering my CD/DVD drive. Stopping udev solves the problem but this is undesirable as a long term solution.

Output of "sudo udevadm monitor --property" shows the following repeating several times per second:

KERNEL[1274866057.958054] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0 (block)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0
SUBSYSTEM=block
DEVNAME=sr0
DEVTYPE=disk
SEQNUM=43253
MAJOR=11
MINOR=0

UDEV [1274866057.958095] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0
SUBSYSTEM=scsi
SDEV_MEDIA_CHANGE=1
DEVTYPE=scsi_device
DRIVER=sr
MODALIAS=scsi:t-0x05
SEQNUM=43252

KERNEL[1274866057.997645] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0
SUBSYSTEM=scsi
SDEV_MEDIA_CHANGE=1
DEVTYPE=scsi_device
DRIVER=sr
MODALIAS=scsi:t-0x05
SEQNUM=43254

UDEV [1274866058.035694] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0 (block)
UDEV_LOG=3
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sr0
SUBSYSTEM=block
DEVNAME=/dev/sr0
DEVTYPE=disk
SEQNUM=43253
ID_CDROM=1
ID_CDROM_CD_R=1
ID_CDROM_CD_RW=1
ID_CDROM_DVD=1
ID_CDROM_DVD_R=1
ID_CDROM_DVD_RW=1
ID_CDROM_DVD_RAM=1
ID_CDROM_DVD_PLUS_R=1
ID_CDROM_DVD_PLUS_RW=1
ID_CDROM_DVD_PLUS_R_DL=1
ID_CDROM_MRW=1
ID_CDROM_MRW_W=1
ID_SCSI=1
ID_VENDOR=Optiarc
ID_VENDOR_ENC=Optiarc\x20
ID_MODEL=DVD_RW_AD-7560S
ID_MODEL_ENC=DVD\x20RW\x20AD-7560S\x20
ID_REVISION=SX01
ID_TYPE=cd
ID_BUS=scsi
ID_PATH=pci-0000:00:1f.2-scsi-4:0:0:0
ACL_MANAGE=1
GENERATED=1
UDISKS_PRESENTATION_NOPOLICY=0
MAJOR=11
MINOR=0
DEVLINKS=/dev/block/11:0 /dev/scd0 /dev/disk/by-path/pci-0000:00:1f.2-scsi-4:0:0:0 /dev/cdrom /dev/cdrw /dev/dvd /dev/dvdrw

Changed in udev (Debian):
status: New → Fix Released
Revision history for this message
Phuah Yee Keat (ykphuah) wrote :

Affects me, running 10.04 64bit

Revision history for this message
taolab (marco-demichele-taolab) wrote :

It may be a DMA problem. In my case (Ubuntu 32bit 10.04 - Optiarc Dvd Rom) changing BIOS configuration for DVD Rom to MWDMA2 instead of AUTO (UDMA5) problem disappeared.

Revision history for this message
taolab (marco-demichele-taolab) wrote :

Nothing! The problem is still present, It disappeared using a DVD disc (I don't know why?) different from the others DVD discs used till now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.