Bug 75906 - Udisks-daemon random 100% CPU usage
Summary: Udisks-daemon random 100% CPU usage
Status: NEW
Alias: None
Product: udisks
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-08 08:23 UTC by mkkot
Modified: 2014-12-27 01:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
requested diagnostics for a bug report (16.03 KB, text/plain)
2014-03-08 08:23 UTC, mkkot
Details
udisks --dump (26.99 KB, text/plain)
2014-05-26 18:12 UTC, Michael Vorburger
Details

Description mkkot 2014-03-08 08:23:20 UTC
Created attachment 95344 [details]
requested diagnostics for a bug report

I'm dealing with problem that in some cases, randomly, udisks-daemon can take 100% of one CPU core and stops only when I kill it. I must admit also that my system battery is below 3V and I haven't changed it yet so there can be some connection.

I also found here: https://forums.gentoo.org/viewtopic-p-6472936.html#6472936
that it can be a problem with locale.

There is a post which suggests that the problem occurs when user is not having quote mark at the first line of the locale:

[root@linux mk]# locale
LANG=pl_PL.UTF-8 << missing "quote" mark
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
[...]


Messages which appeared in journalctl when udisks-daemon hanged up:

lut 18 09:30:51 linux udisks-daemon[301]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:08.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
lut 18 09:30:52 linux udisks-daemon[301]: helper(pid 1868): launched job udisks-helper-ata-smart-collect on /dev/sda
lut 18 09:30:52 linux udisks-daemon[301]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb
lut 18 09:30:52 linux udisks-daemon[301]: helper(pid 1869): launched job udisks-helper-ata-smart-collect on /dev/sdb
lut 18 09:30:52 linux udisks-daemon[301]: helper(pid 1868): completed with exit code 0
lut 18 09:30:52 linux udisks-daemon[301]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:08.0/ata1/host0/target0:0:0/0:0:0:0/block/sda

I mounted and unmnounted /dev/sdb thinking this could cause the problem:

lut 18 09:35:14 linux su[2030]: (to root) mk on pts/0
lut 18 09:35:14 linux su[2030]: pam_unix(su:session): session opened for user root by mk(uid=1000)
lut 18 09:35:20 linux kernel: XFS (sdb5): Mounting Filesystem
lut 18 09:35:20 linux udisks-daemon[301]: **** /proc/self/mountinfo changed
lut 18 09:35:20 linux udisks-daemon[301]: **** MOUNTED /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:20 linux udisks-daemon[301]: **** CHANGING /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:20 linux udisks-daemon[301]: **** UPDATING /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:20 linux udisks-daemon[301]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:20 linux udisks-daemon[301]: **** CHANGED /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:20 linux kernel: XFS (sdb5): Ending clean mount

Then I killed udisks-daemon:

lut 18 09:35:27 linux udisks-daemon[301]: **** /proc/self/mountinfo changed
lut 18 09:35:27 linux udisks-daemon[301]: **** UNMOUNTED /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:27 linux udisks-daemon[301]: **** CHANGING /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:27 linux udisks-daemon[301]: **** UPDATING /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:27 linux udisks-daemon[301]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:27 linux udisks-daemon[301]: **** CHANGED /sys/devices/pci0000:00/0000:00:08.1/ata3/host2/target2:0:0/2:0:0:0/block/sdb/sdb5
lut 18 09:35:27 linux org.gtk.Private.UDisks2VolumeMonitor[407]: ### debug: emit_signal: 0x1447470
lut 18 09:35:27 linux org.gtk.Private.UDisks2VolumeMonitor[407]: ### debug: emit_signal: 0x149b0f0
lut 18 09:35:27 linux org.gtk.Private.UDisks2VolumeMonitor[407]: ### debug: emit_signal: 0x149b0f0


Steps to reproduce:

Unknown. It happens even if PC is playing music and nothing is done on it.

Here's more or less the same report for Archlinux: https://bugs.archlinux.org/task/38952
Comment 1 David Zeuthen (not reading bugmail) 2014-03-08 15:51:35 UTC
It's unfortunate you are experiencing this problem. However, you are running an old unmaintained version of udisks. Please update to the udisks 2.x series.
Comment 2 mkkot 2014-03-10 10:46:30 UTC
Thanks for your answer. It seems that I had both udisks(1.0.4-8) and udisks2 on my system. When removing udisks it tells me that xfce4-power-manager requires it. I removed both but I'd like to use xfce power manager so my question is why this is happening? I guess xfce doesn't have support for udisks2 yet and my distro still provides the old version as well?
Comment 3 Michael Vorburger 2014-05-26 18:11:07 UTC
I've just hit a 100% udisks-daemon as well.. but it did stop by itself, after a LONG time (like 20-30'-ish, which surely isn't "normal" ?) - without me doing anything (I did NOT kill it; but maybe some... watcher process did?).  It seems to have started about when I did a VirtualBox update - not sure if that could have anything to do with it?

https://bugs.launchpad.net/ubuntu/+source/udisks/+bug/1282119 has others hitting this.  Similar reports on https://bugzilla.redhat.com/show_bug.cgi?id=1049928

> running an old unmaintained version of udisks. Please update to the udisks 2.x series.

I'm on what I think is a fairly standard out of the box Ubuntu 13.10, here is some info:

$ uname -a
Linux yoko 3.11.0-20-generic #35-Ubuntu SMP Fri May 2 21:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 13.10
Release:	13.10
Codename:	saucy

$ dpkg -l | grep udisks
ii  libudisks2-0:amd64                        2.1.0-4ubuntu0.1                        amd64        GObject based library to access udisks2
ii  udisks                                    1.0.4-8ubuntu1.1                        amd64        storage media interface
ii  udisks2                                   2.1.0-4ubuntu0.1                        amd64        D-BUS service to access and manipulate storage devices

I've tried to look into "Messages which appeared in journalctl" to help with this (when the problem was still going on), but I don't seem to have a command named 'journalctl' in Ubuntu 13.10 - what information would help you to understand the root cause of this better - should it happen again? (There was nothing in 'dmesg | grep udisks', which is probably normal; just say'n.) -- Attached vorburger_udisks_dump.txt is the result of having run 'udisks --dump' while it was spinning - though I doubt that there could be anything useful in that?

I don't know much science there is in the "not having quote mark at the first line of the locale" conspiracy theory, but just in case, here's mine (standard Ubuntu) :

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_GB.UTF-8
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_GB.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_ADDRESS=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_IDENTIFICATION=en_GB.UTF-8
LC_ALL=

https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/381063 is an older (closed) but with something about "multiuser system with many desktop users, the system dbus-daemon process can easily exceed the 1024 open file..." - I thought it may be worthwhile to mention that in my case I did indeed have two completely separate desktop user sessions open and running.
Comment 4 Michael Vorburger 2014-05-26 18:12:50 UTC
Created attachment 99882 [details]
udisks --dump


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.