You are not logged in.

#1 2011-04-11 21:10:40

linuxxnutt
Member
Registered: 2011-04-11
Posts: 14

udev usb leads to high cpu

When i plug in a usb and run udev --debug a crazy amount of output comes out and i have no idea how to fix it. I recently upgraded to 2.6.38 and this may be causing the problem because nothing else changed.

srry for my noobness

Offline

#2 2011-04-11 22:37:42

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: udev usb leads to high cpu

There's nothing to be sorry -- I don't believe any 'noobness' has anything to do with your problem. However, it could help someone potentially to try and figure out what may go wrong if you provided some more relevant data, e.g. what applications you run when you plug in a device, and what usb device(s) you mean? What's your desktop environment (if any)? What do your logs say (especially the kernel.log and error.log), and what output does dmesg give?


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2011-04-11 22:57:36

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: udev usb leads to high cpu

I am having the same problem. Since the 2.6.38 update, any time I plug in a usb drive, my CPU usage goes through the roof. In htop /sbin/udev shows appr. 6% CPU usage, but the graph at the top shows that CPU usage is approximately 50%. This happens even if I haven't mounted the USB drive.

Running udev --debug produces endless, repeating output, so it seems there is some sort of loop.

I think the problem is that the new kernel was released before most recent udev, which is still in testing.

http://www.archlinux.org/packages/core/x86_64/udev/

Offline

#4 2011-04-12 00:47:39

linuxxnutt
Member
Registered: 2011-04-11
Posts: 14

Re: udev usb leads to high cpu

okay thanks for the response.

desktop : openbox
file manager: pcmanfm

nothing else was running besides file manager

the most relevant output is from udev --debug

1302569024.166731 [2873] util_run_program: '/sbin/blkid' (stderr) 'error: /dev/sdb: No medium found'
1302569024.170056 [2873] util_run_program: '/sbin/blkid -o udev -p /dev/sdb' returned with exitcode 2
1302569024.170162 [2873] udev_rules_apply_to_event: IMPORT 'edd_id --export /dev/sdb' /lib/udev/rules.d/61-persistent-storage-edd.rules:8
1302569024.170198 [2873] util_run_program: 'edd_id --export /dev/sdb' started
1302569024.179833 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR=Kingston'
1302569024.179885 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ENC=Kingston'
1302569024.179908 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_VENDOR_ID=08ec'
1302569024.179930 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL=DataTraveler_U3'
1302569024.179953 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ENC=DataTraveler\x20U3\x20'
1302569024.179977 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_MODEL_ID=0016'
1302569024.180000 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_REVISION=6.16'
1302569024.180024 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL=Kingston_DataTraveler_U3_0721756122B15970-0:1'
1302569024.180048 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_SERIAL_SHORT=0721756122B15970'
1302569024.180070 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_TYPE=cd'
1302569024.180091 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_INSTANCE=0:1'
1302569024.180111 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_BUS=usb'
1302569024.180134 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACES=:080650:'
1302569024.180155 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_INTERFACE_NUM=00'
1302569024.180176 [2878] util_run_program: '/lib/udev/usb_id' (stdout) 'ID_USB_DRIVER=usb-storage'
1302569024.180602 [2878] util_run_program: 'usb_id --export /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:1/block/sr0' returned with exitcode 0
1302569024.180780 [2878] udev_rules_apply_to_event: LINK 'disk/by-id/usb-Kingston_DataTraveler_U3_0721756122B15970-0:1' /lib/udev/rules.d/60-persistent-storage.rules:36
1302569024.181126 [2878] udev_device_new_from_syspath: device 0x91223a8 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-6'
1302569024.181237 [2878] udev_device_new_from_syspath: device 0x912b6c0 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1'
1302569024.181337 [2878] udev_device_new_from_syspath: device 0x912bae8 has devpath '/devices/pci0000:00/0000:00:1d.7'
1302569024.181424 [2878] udev_device_new_from_syspath: device 0x9129f98 has devpath '/devices/pci0000:00'
1302569024.181501 [2878] udev_rules_apply_to_event: IMPORT 'path_id /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:1/block/sr0' /lib/udev/rules.d/60-persistent-storage.rules:53
1302569024.181571 [2878] util_run_program: 'path_id /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:1/block/sr0' started
1302569024.182560 [2873] util_run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
1302569024.183111 [2873] util_run_program: 'edd_id --export /dev/sdb' returned with exitcode 2
1302569024.183292 [2873] udev_rules_apply_to_event: IMPORT 'udisks-part-id /dev/sdb' /lib/udev/rules.d/80-udisks.rules:88
1302569024.183368 [2873] util_run_program: 'udisks-part-id /dev/sdb' started
1302569024.191745 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'libudev: udev_device_new_from_syspath: '
1302569024.198368 [2878] util_run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:1'
1302569024.198767 [2878] util_run_program: 'path_id /devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:1/block/sr0' returned with exitcode 0
1302569024.198858 [2878] udev_rules_apply_to_event: LINK 'disk/by-path/pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:1' /lib/udev/rules.d/60-persistent-storage.rules:54
1302569024.199011 [2878] udev_rules_apply_to_event: RUN 'udev-acl --action=$env{ACTION} --device=$env{DEVNAME}' /lib/udev/rules.d/70-acl.rules:68
1302569024.199769 [2878] udev_rules_apply_to_event: IMPORT 'cdrom_id --export /dev/sr0' /lib/udev/rules.d/81-arch.rules:56
1302569024.199841 [2878] util_run_program: 'cdrom_id --export /dev/sr0' started
1302569024.200222 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'device 0x9c31118 has devpath '/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:0/block/sdb''
1302569024.216702 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'libudev: udev_device_read_db: '
1302569024.216785 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'device 0x9c31118 filled with db file data'
1302569024.218789 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'using device_file=/dev/sdb syspath=/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:0/block/sdb, offset=0 ao=0 and number=0 for /dev/sdb'
1302569024.227143 [2873] util_run_program: '/lib/udev/udisks-part-id' (stderr) 'Error opening /dev/sdb: No medium found'
1302569024.229991 [2873] util_run_program: 'udisks-part-id /dev/sdb' returned with exitcode 0
1302569024.231346 [2873] udev_event_execute_rules: no node name set, will use kernel supplied name 'sdb'
1302569024.231401 [2873] udev_node_add: creating device node '/dev/sdb', devnum=8:16, mode=0660, uid=0, gid=6
1302569024.231438 [2873] udev_node_mknod: preserve file '/dev/sdb', because it has correct dev_t
1302569024.231475 [2873] udev_node_mknod: preserve permissions /dev/sdb, 060660, uid=0, gid=6
1302569024.231542 [2873] node_symlink: preserve already existing symlink '/dev/block/8:16' to '../sdb'
1302569024.231631 [2873] link_find_prioritized: found 'b8:16' claiming '/dev/.udev/links/disk\x2fby-id\x2fusb-Kingston_DataTraveler_U3_0721756122B15970-0:0'
1302569024.231668 [2873] link_update: creating link '/dev/disk/by-id/usb-Kingston_DataTraveler_U3_0721756122B15970-0:0' to '/dev/sdb'
1302569024.231715 [2873] node_symlink: preserve already existing symlink '/dev/disk/by-id/usb-Kingston_DataTraveler_U3_0721756122B15970-0:0' to '../../sdb'
1302569024.231808 [2873] link_find_prioritized: found 'b8:16' claiming '/dev/.udev/links/disk\x2fby-path\x2fpci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:0'
1302569024.231843 [2873] link_update: creating link '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:0' to '/dev/sdb'
1302569024.231887 [2873] node_symlink: preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:0' to '../../sdb'
1302569024.232154 [2873] udev_device_update_db: created db file '/dev/.udev/db/b8:16' for '/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:0/block/sdb'
1302569024.232228 [2873] udev_watch_begin: adding watch on '/dev/sdb'
1302569024.232508 [2873] udev_device_update_db: created db file '/dev/.udev/db/b8:16' for '/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:0/block/sdb'
1302569024.236017 [2873] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x9121d10
1302569024.236237 [2873] worker_new: seq 1605 processed with 0
1302569024.241251 [2878] util_run_program: '/lib/udev/cdrom_id' (stdout) 'ID_CDROM=1'
1302569024.241306 [2878] util_run_program: '/lib/udev/cdrom_id' (stdout) 'ID_CDROM_CD_R=1'
1302569024.241331 [2878] util_run_program: '/lib/udev/cdrom_id' (stdout) 'ID_CDROM_MRW=1'
1302569024.241353 [2878] util_run_program: '/lib/udev/cdrom_id' (stdout) 'ID_CDROM_MRW_W=1'
1302569024.241376 [2878] util_run_program: '/lib/udev/cdrom_id' (stdout) 'ID_CDROM_MEDIA=1'
1302569024.241835 [2878] util_run_program: 'cdrom_id --export /dev/sr0' returned with exitcode 0
1302569024.241942 [2878] udev_rules_apply_to_event: LINK 'cd/cdrom-4:0:0:1' /lib/udev/rules.d/81-arch.rules:58
1302569024.242184 [2878] udev_rules_apply_to_event: RUN 'cdsymlinks.sh' /lib/udev/rules.d/81-arch.rules:63
1302569024.242226 [2878] udev_rules_apply_to_event: GROUP 93 /lib/udev/rules.d/81-arch.rules:84
1302569024.242253 [2878] udev_rules_apply_to_event: LINK 'scd0' /lib/udev/rules.d/81-arch.rules:84
1302569024.242302 [2878] udev_event_execute_rules: no node name set, will use kernel supplied name 'sr0'
1302569024.242357 [2878] udev_node_add: creating device node '/dev/sr0', devnum=11:0, mode=0660, uid=0, gid=93
1302569024.242398 [2878] udev_node_mknod: preserve file '/dev/sr0', because it has correct dev_t
1302569024.242434 [2878] udev_node_mknod: preserve permissions /dev/sr0, 060660, uid=0, gid=93
1302569024.242506 [2878] node_symlink: preserve already existing symlink '/dev/block/11:0' to '../sr0'
1302569024.242604 [2878] link_find_prioritized: found 'b11:0' claiming '/dev/.udev/links/scd0'
1302569024.242643 [2878] link_update: creating link '/dev/scd0' to '/dev/sr0'
1302569024.242682 [2878] node_symlink: preserve already existing symlink '/dev/scd0' to 'sr0'
1302569024.242775 [2878] link_find_prioritized: found 'b11:0' claiming '/dev/.udev/links/disk\x2fby-id\x2fusb-Kingston_DataTraveler_U3_0721756122B15970-0:1'
1302569024.242809 [2878] link_update: creating link '/dev/disk/by-id/usb-Kingston_DataTraveler_U3_0721756122B15970-0:1' to '/dev/sr0'
1302569024.242858 [2878] node_symlink: preserve already existing symlink '/dev/disk/by-id/usb-Kingston_DataTraveler_U3_0721756122B15970-0:1' to '../../sr0'
1302569024.243054 [2878] link_find_prioritized: found 'b11:0' claiming '/dev/.udev/links/disk\x2fby-path\x2fpci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:1'
1302569024.243100 [2878] link_update: creating link '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:1' to '/dev/sr0'
1302569024.243148 [2878] node_symlink: preserve already existing symlink '/dev/disk/by-path/pci-0000:00:1d.7-usb-0:6:1.0-scsi-0:0:0:1' to '../../sr0'
1302569024.243241 [2878] link_find_prioritized: found 'b11:0' claiming '/dev/.udev/links/cd\x2fcdrom-4:0:0:1'
1302569024.243276 [2878] link_update: creating link '/dev/cd/cdrom-4:0:0:1' to '/dev/sr0'
1302569024.243317 [2878] node_symlink: preserve already existing symlink '/dev/cd/cdrom-4:0:0:1' to '../sr0'
1302569024.243653 [2878] udev_device_update_db: created db file '/dev/.udev/db/b11:0' for '/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6:1.0/host4/target4:0:0/4:0:0:1/block/sr0'
1302569024.243824 [2878] util_run_program: 'udev-acl --action=change --device=/dev/sr0' started
1302569024.249661 [2878] util_run_program: 'udev-acl --action=change --device=/dev/sr0' returned with exitcode 0
1302569024.249711 [2878] util_run_program: 'cdsymlinks.sh' started
1302569024.260256 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) 'rm: cannot remove `/dev/cdrw*''
1302569024.260320 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) ': No such file or directory'
1302569024.262828 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) 'rm: cannot remove `/dev/dvd*': No such file or directory'
1302569024.262881 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) ''
1302569024.265475 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) 'rm: cannot remove `/dev/dvdrw*''
1302569024.265531 [2878] util_run_program: '/lib/udev/cdsymlinks.sh' (stderr) ': No such file or directory'
1302569024.276754 [2878] util_run_program: 'cdsymlinks.sh' returned with exitcode 0
1302569024.284632 [2878] udev_monitor_send_device: passed -1 bytes to netlink monitor 0x9121f08
1302569024.284734 [2878] worker_new: seq 1612 processed with 0

it keeps going on and on

i agree with madalu and a update to udev will probably help

btw kernel.log  does not show any errors


[Moderator Edit- ewaller ] Added code tags around program output

Last edited by linuxxnutt (2011-04-13 00:45:34)

Offline

#5 2011-04-12 02:46:39

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: udev usb leads to high cpu

Thanks for posting the debug output.

Unfortunately, I upgraded to the udev from testing (167-1), and the problem persists.

I uninstalled udisks, rebooted the computer, and plugged in a USB drive before launching x. I encountered the same problem.

messages.log is filled with an endless loop of output similar to the output you posted above.

Last edited by madalu (2011-04-12 03:19:54)

Offline

#6 2011-04-12 04:05:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,769

Re: udev usb leads to high cpu

linuxxnutt,

Welcome to the forums.  When posting long sections of program output, please use BBCode Code tags (See how I did it by editing your post) 
It makes it much easier for those offering help to read by using a mono spaced font, setting it apart from the dialog, and providing scroll bars.

Sorry for the edit, we try to leave posts alone.

ewaller


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#7 2011-04-13 00:50:28

linuxxnutt
Member
Registered: 2011-04-11
Posts: 14

Re: udev usb leads to high cpu

Thanks for the tip. i was trying to figure out how to do that

(i have been using arch for a year or so and just never joined the forums)

still have no idea how to solve the problem

i wonder if its because of one of the rules i added to udev for usb auto mounting

i tried deleting them but it still automounts i think i may to a reinstall over the weekend see if it helps.

this is not a big deal i can wait to fix it. if anyones finds a fix i appreciate it 

thnks

side note: im using a netbook with out a cd drive dont know if that matters

Last edited by linuxxnutt (2011-04-13 01:00:04)

Offline

#8 2011-04-13 13:46:03

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: udev usb leads to high cpu

Are you using a USB device with a U3 virtual CD, such as a SanDisk Cruzer?

My logs were being flooded with the following line:

VFS: busy inodes on changed media or resized disk sr1

I solved the problem by installing u3-tool from aur, getting rid of the U3 partition, and reformatting the drive.

Offline

#9 2011-04-13 19:46:18

linuxxnutt
Member
Registered: 2011-04-11
Posts: 14

Re: udev usb leads to high cpu

Thanks for the reply

yes i am using a kingston with that i will try to delete the partition and get back to you

it was working fine before 2.6.38 same usb and everything

update:

i deleted the software partition and it helped  the problem it uses slightly less cpu now
but i would like to not have to do that to the other usbs i have because like i said it worked before the upgrade.

Last edited by linuxxnutt (2011-04-13 23:25:08)

Offline

#10 2011-04-14 12:17:08

madalu
Member
Registered: 2009-05-05
Posts: 217

Re: udev usb leads to high cpu

I'd agree it is a bug. Would you want to submit a bug report?

Offline

#11 2011-04-14 19:58:37

linuxxnutt
Member
Registered: 2011-04-11
Posts: 14

Re: udev usb leads to high cpu

sure but now i have 4 instances of udev running and 1 is zombie i am starting to think i messed something up

i cant submit bug because that package is out of date

i did a reinstall and did not help the problem

Last edited by linuxxnutt (2011-04-15 22:28:28)

Offline

Board footer

Powered by FluxBB