Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#775 PCManFM 99% CPU when ejecting SD mounted using udisks

open
None
7
2014-06-27
2013-08-27
Camden Lindsay
No

– version of pcmanfm you are using (you can see it in "About" dialog)
PCManFM 1.1.2

– version of your operating system
[dylan@zenbook ~]$ uname -a
Linux zenbook 3.10.7-1-ARCH #1 SMP PREEMPT Thu Aug 15 11:55:34 CEST 2013 x86_64 GNU/Linux

[dylan@zenbook ~]$ cat /etc/lsb-release
LSB_VERSION=1.4
DISTRIB_ID=arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"

[dylan@zenbook ~]$ fluxbox --version
Fluxbox 1.3.5 : (c) 2001-2011 Fluxbox Team

[dylan@zenbook ~]$ sudo pacman -S udisks
warning: udisks-1.0.4-8 is up to date -- reinstalling

– steps how we can reproduce your problem
Udisks automounts SD card
Use 'eject' button in PCManFM to eject device
CPU hangs at 99%
11079 dylan 20 0 445664 15808 10664 R 99.8 0.4 0:09.32 pcmanfm

Manually umounting device does not cause this, only using eject button

Bug report FS#36686 with Arch
https://bugs.archlinux.org/task/36686

Discussion

<< < 1 2 3 4 > >> (Page 3 of 4)
  • Camden Lindsay
    Camden Lindsay
    2013-12-05

    When running and ejecting disk in foreground, this is printed to stderr
    [dylan@zenbook ~]$ pcmanfm --desktop

    (pcmanfm:9719): GLib-CRITICAL **: g_source_attach: assertion 'source->context == NULL' failed

    For the information you requested:
    glib2 and gtk2 package versions:
    [dylan@zenbook glib2]$ pacman -Qip glib2-2.38.2-1-x86_64.pkg.tar.xz
    Name : glib2
    Version : 2.38.2-1
    Description : Common C routines used by GTK+ and other libs
    Architecture : x86_64
    URL : http://www.gtk.org/
    Licenses : LGPL
    Groups : None
    Provides : None
    Depends On : pcre libffi
    Optional Deps : python2: for gdbus-codegen and gtester-report
    elfutils: gresource inspection tool
    Conflicts With : None
    Replaces : None
    Compressed Size: 2027.54 KiB
    Installed Size : 12992.00 KiB
    Packager : Unknown Packager
    Build Date : Fri Nov 22 19:40:52 2013
    Install Script : No
    Validated By : None
    Signatures : None

    [dylan@zenbook glib2]$

    [dylan@zenbook gtk2]$ pacman -Qip gtk2-2.24.22-1-x86_64.pkg.tar.xz
    Name : gtk2
    Version : 2.24.22-1
    Description : GTK+ is a multi-platform toolkit (v2)
    Architecture : x86_64
    URL : http://www.gtk.org/
    Licenses : LGPL
    Groups : None
    Provides : None
    Depends On : atk pango libxcursor libxinerama libxrandr libxi libxcomposite libxdamage shared-mime-info cairo libcups
    gtk-update-icon-cache
    Optional Deps : gnome-themes-standard: Default widget theme
    gnome-icon-theme: Default icon theme
    Conflicts With : None
    Replaces : gtk2-docs
    Compressed Size: 6885.45 KiB
    Installed Size : 56882.00 KiB
    Packager : Unknown Packager
    Build Date : Fri Nov 22 19:51:34 2013
    Install Script : Yes
    Validated By : None
    Signatures : None

    [dylan@zenbook gtk2]$

    eject disk, bt full output:
    (gdb) bt full
    #0 0x00007f38302b8d7b in recv () from /usr/lib/libpthread.so.0
    No symbol table info available.
    #1 0x00007f382fcec06f in ?? () from /usr/lib/libxcb.so.1
    No symbol table info available.
    #2 0x00007f382fcec568 in ?? () from /usr/lib/libxcb.so.1
    No symbol table info available.
    #3 0x00007f383270e828 in ?? () from /usr/lib/libX11.so.6
    No symbol table info available.
    #4 0x00007f383270e96e in ?? () from /usr/lib/libX11.so.6
    No symbol table info available.
    #5 0x00007f383270ec4d in _XEventsQueued () from /usr/lib/libX11.so.6
    No symbol table info available.
    #6 0x00007f3832700d8d in XPending () from /usr/lib/libX11.so.6
    No symbol table info available.
    #7 0x00007f3831bce086 in gdk_event_prepare () from /usr/lib/libgdk-x11-2.0.so.0
    No symbol table info available.
    #8 0x00007f383050fc2d in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #9 0x00007f38305104a3 in g_main_context_iterate.isra.24 () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #10 0x00007f38305109ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #11 0x00007f38324a95f2 in ?? () from /usr/lib/libfm-gtk.so.4
    No symbol table info available.
    #12 0x00007f38324b02d6 in ?? () from /usr/lib/libfm-gtk.so.4
    No symbol table info available.
    #13 0x00007f3831f56d85 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #14 0x00007f38307d86a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #15 0x00007f38307e9dfb in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #16 0x00007f38307f1a19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #17 0x00007f38307f2002 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #18 0x00007f3832066ab4 in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #19 0x00007f3831f55534 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #20 0x00007f3831f558eb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #21 0x00007f3831bd0c3c in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0
    No symbol table info available.
    #22 0x00007f3830510296 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #23 0x00007f38305105e8 in g_main_context_iterate.isra.24 () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #24 0x00007f38305109ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #25 0x00007f3831f549d7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #26 0x000000000040f2d0 in ?? ()
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #27 0x00007f382ff20bc5 in __libc_start_main () from /usr/lib/libc.so.6
    No symbol table info available.
    #28 0x000000000040f32d in ?? ()
    No symbol table info available.

    info threads
    (gdb) info threads
    Id Target Id Frame
    2 Thread 0x7f3828bc5700 (LWP 9757) "gmain" 0x00007f382ffdb9dd in poll () from /usr/lib/libc.so.6
    * 1 Thread 0x7f3832eed8c0 (LWP 9756) "pcmanfm" 0x00007f38302b8d7b in recv () from /usr/lib/libpthread.so.0

    Continue
    (gdb) continue
    Continuing.
    ^C
    Program received signal SIGINT, Interrupt.
    0x00007f38302b8d7b in recv () from /usr/lib/libpthread.so.0

    bt full after continue
    (gdb) bt full
    #0 0x00007f38302b8d7b in recv () from /usr/lib/libpthread.so.0
    No symbol table info available.
    #1 0x00007f382fcec06f in ?? () from /usr/lib/libxcb.so.1
    No symbol table info available.
    #2 0x00007f382fcec568 in ?? () from /usr/lib/libxcb.so.1
    No symbol table info available.
    #3 0x00007f383270e828 in ?? () from /usr/lib/libX11.so.6
    No symbol table info available.
    #4 0x00007f383270e96e in ?? () from /usr/lib/libX11.so.6
    No symbol table info available.
    #5 0x00007f383270ec4d in _XEventsQueued () from /usr/lib/libX11.so.6
    No symbol table info available.
    #6 0x00007f3832700d8d in XPending () from /usr/lib/libX11.so.6
    No symbol table info available.
    #7 0x00007f3831bce086 in gdk_event_prepare () from /usr/lib/libgdk-x11-2.0.so.0
    No symbol table info available.
    #8 0x00007f383050fc2d in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #9 0x00007f38305104a3 in g_main_context_iterate.isra.24 () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #10 0x00007f38305109ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #11 0x00007f38324a95f2 in ?? () from /usr/lib/libfm-gtk.so.4
    No symbol table info available.
    #12 0x00007f38324b02d6 in ?? () from /usr/lib/libfm-gtk.so.4
    No symbol table info available.
    #13 0x00007f3831f56d85 in _gtk_marshal_BOOLEAN__BOXED () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #14 0x00007f38307d86a8 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #15 0x00007f38307e9dfb in signal_emit_unlocked_R () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #16 0x00007f38307f1a19 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    #17 0x00007f38307f2002 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #18 0x00007f3832066ab4 in gtk_widget_event_internal () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #19 0x00007f3831f55534 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #20 0x00007f3831f558eb in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #21 0x00007f3831bd0c3c in gdk_event_dispatch () from /usr/lib/libgdk-x11-2.0.so.0
    No symbol table info available.
    #22 0x00007f3830510296 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #23 0x00007f38305105e8 in g_main_context_iterate.isra.24 () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #24 0x00007f38305109ea in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
    No symbol table info available.
    #25 0x00007f3831f549d7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
    No symbol table info available.
    #26 0x000000000040f2d0 in ?? ()
    No symbol table info available.
    ---Type <return> to continue, or q <return> to quit---
    #27 0x00007f382ff20bc5 in __libc_start_main () from /usr/lib/libc.so.6
    No symbol table info available.
    #28 0x000000000040f32d in ?? ()
    No symbol table info available.
    (gdb)

    info threads after continue
    (gdb) info threads
    Id Target Id Frame
    2 Thread 0x7f3828bc5700 (LWP 9757) "gmain" 0x00007f382ffdb9dd in poll () from /usr/lib/libc.so.6
    * 1 Thread 0x7f3832eed8c0 (LWP 9756) "pcmanfm" 0x00007f38302b8d7b in recv () from /usr/lib/libpthread.so.0

     
  • Camden Lindsay
    Camden Lindsay
    2013-12-05

    Looks like it is udisks, i think? not sure how to know for sure...

    Dec 05 11:40:15 zenbook kernel: sd 6:0:0:0: [sdc] 4099072 512-byte logical blocks: (2.09 GB/1.95 GiB)
    Dec 05 11:40:15 zenbook kernel: sd 6:0:0:0: [sdc] Cache data unavailable
    Dec 05 11:40:15 zenbook kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
    Dec 05 11:40:15 zenbook kernel: sd 6:0:0:0: [sdc] Cache data unavailable
    Dec 05 11:40:15 zenbook kernel: sd 6:0:0:0: [sdc] Assuming drive cache: write through
    Dec 05 11:40:15 zenbook kernel: sdc: sdc1
    Dec 05 11:40:15 zenbook udisks-daemon[986]: **** CHANGING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...lock/sdc
    Dec 05 11:40:15 zenbook udisks-daemon[986]: **** UPDATING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...lock/sdc
    Dec 05 11:40:16 zenbook udisks-daemon[986]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/...lock/sdc
    Dec 05 11:40:16 zenbook udisks-daemon[986]: **** CHANGED /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6...lock/sdc
    Dec 05 11:40:16 zenbook udisks-daemon[986]: **** CHANGING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...lock/sdc
    Dec 05 11:40:16 zenbook udisks-daemon[986]: **** UPDATING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...lock/sdc
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/...lock/sdc
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** CHANGED /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6...lock/sdc
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** ADDING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:...sdc/sdc1
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** UPDATING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...sdc/sdc1
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** ADDED /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6:0...sdc/sdc1
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** EMITTING ADDED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/ta...sdc/sdc1
    Dec 05 11:40:17 zenbook slim[994]: attempting to mount device /org/freedesktop/UDisks/devices/sdc1 (vfat:[])
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** USING MOUNT OPTIONS 'uhelper=udisks,nodev,nosuid,uid=1000,gid=1000,shortname=mixed,dmask=...dev/sdc1
    Dec 05 11:40:17 zenbook udisks-daemon[986]: **** EMITTING JOB-CHANGED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/ho...sdc/sdc1
    Dec 05 11:40:17 zenbook udisks-daemon[986]: helper(pid 10371): launched job mount on /dev/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** /proc/self/mountinfo changed
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** MOUNTED /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** CHANGING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** UPDATING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** CHANGED /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/6...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: helper(pid 10371): completed with exit code 0
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** UPDATING /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/target6:0:0/...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/host6/...sdc/sdc1
    Dec 05 11:40:18 zenbook udisks-daemon[986]: **** EMITTING JOB-CHANGED for /sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.4/3-1.4:1.0/ho...sdc/sdc1
    Dec 05 11:40:18 zenbook slim[994]: mounted device /org/freedesktop/UDisks/devices/sdc1
    Dec 05 11:40:20 zenbook NetworkManager[981]: <info> (wlan0): IP6 addrconf timed out or failed.
    Dec 05 11:40:20 zenbook NetworkManager[981]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) scheduled...
    Dec 05 11:40:20 zenbook NetworkManager[981]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) started...
    Dec 05 11:40:20 zenbook NetworkManager[981]: <info> Activation (wlan0) Stage 4 of 5 (IPv6 Configure Timeout) complete.
    Dec 05 11:40:42 zenbook udisks-daemon[986]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0...lock/sda
    Dec 05 11:40:42 zenbook udisks-daemon[986]: helper(pid 10372): launched job udisks-helper-ata-smart-collect on /dev/sda
    Dec 05 11:40:42 zenbook udisks-daemon[986]: **** Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0...lock/sdb
    Dec 05 11:40:42 zenbook udisks-daemon[986]: helper(pid 10373): launched job udisks-helper-ata-smart-collect on /dev/sdb
    Dec 05 11:40:43 zenbook udisks-daemon[986]: helper(pid 10373): completed with exit code 0
    Dec 05 11:40:43 zenbook udisks-daemon[986]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0/block/sdb
    Dec 05 11:40:43 zenbook udisks-daemon[986]: helper(pid 10372): completed with exit code 0
    Dec 05 11:40:43 zenbook udisks-daemon[986]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda

     
  • Camden Lindsay
    Camden Lindsay
    2013-12-05

    To note; the disk does umount properly before the system hangs.

     
  • First. Backtrace lines with "No symbol table info available" are useless. I've asked you few times to install debug info for the glib.

    Second. Find which thread consumes CPU (top or whatever can display threads, not only process summary) and do backtrace only on it, please. If need to switch to thread 2 then enter 'thread 2' in gdb.

    Thank you very much.

     
  • Camden Lindsay
    Camden Lindsay
    2013-12-05

    Interesting - i have installed the debug info for glib as far as I know. (built and installed a separate package called glib-debug) Perhaps I am doing it wrong?

    I will find how to display threads in top and switch to thread that has high cpu utilization. I then provide bt full on that thread, correct?

    I will check again tomorrow and provide output. Sorry for any confusion.

     
  • I don't know what is the glib-debug but debug info should be enabled at build time as I wrote you below, you should rebuild package glib2 for that.

    How to show threads in top is told in its manual - just press 'H'. :)

     
    • milestone: 2334032 -->
    • labels: 805537 -->
     
  • Thank you very much for the testing and feedback provided!

     
  • To view all threads backtrace you can use command in gdb:

    thread apply all backtrace

    Also sometimes it may help to run pcmanfm under strace utility.

     
  • Camden Lindsay
    Camden Lindsay
    2014-03-13

    I came to something here... by accident

    I had the following packages installed from the repositories:
    glib2
    glib2-debug

    I re-read all of the comments and saw that you wanted be to build glib2 from AUR glib2-aur with debug enabled.

    I did that, removed the glib2 and glib2-debug, and the problem no longer exists.

    to recreate, i uninstalled glib2-aur, reinstalled only glib2 from repository.

    Using the repository version of glib2, the problem will occur every time (with or without package glib2-debug installed).

    There must be some changelist between the repository version and the aur version of glib2 that has fixed the problem! :)

     
<< < 1 2 3 4 > >> (Page 3 of 4)