Generic x86 - AtomPC TEST - CPU overload 1. Open terminal and issue top -> Nothing unusual 2. Insert USB stick and open FileManager. Create a folder on the stick. (optional) 3. Open terminal and issue top -> Nothing unusual 4. Unmount the USB stick. 5. Open terminal and issue top -> pcmanfm (File Manager) - 50% CPU !!! Even if you close the File Manager, the pcmanfm PID will remain hanged up. top snapshot after stick was unmounted and file manager closed: PID PPID USER STAT VSZ %VSZ %CPU COMMAND 704 1 root R 67412 7% 50% pcmanfm 698 546 root S 4932 0% 0% sshd: root@pts/1 701 700 root R 2644 0% 0% top 693 1 root S 27996 3% 0% matchbox-terminal
Tested with: poky 102bf5e0f640fe85068452a42b85077f1c81e0c9 meta-intel a1138af21f6ba85e79d1422a3f0a3e0c4f658a90
Tested with Generic x86_64 on Sugarbay the percentage is around 12-13%. PID PPID USER STAT VSZ %VSZ %CPU COMMAND 1545 1 root R 484m 13% 13% pcmanfm 769 1 root S 187m 5% 0% matchbox-terminal 760 703 root S 132m 3% 0% matchbox-panel --titlebar --start-applets showdesktop,windowselector --end-applets cloc 634 617 root S < 120m 3% 0% /usr/bin/Xorg :0 -br -pn When the user unmounts the sdb, the file manager windows is closing (both on genericx86 and x86_64). Each time the process remains hanged and consumes CPU.
Testing the bug on Sugarbay, using a Sugarbay image (not generic), the bug reproduces with 12-13% CPU Usage after unmount. Same problem with the hanging PID. PID PPID USER STAT VSZ %VSZ %CPU COMMAND 836 1 root R 420m 11% 13% pcmanfm 788 1 root S 187m 5% 0% matchbox-terminal 776 721 root S 132m 3% 0% matchbox-panel --titlebar --start-applets showdesktop,windowselector --end-applets cloc
NOTE: Does not happen with generic86-64 image on Sugarbay platform.
NOTE: Actually, it does. See below for more information: If the user unmounts using the file manager's "Unmount Volume" option (right click on the sdb drive) the issue will appear. If the user unmounts the volume using the 'umount /dev/sdb' command, the issue will not happen. This seems like an issue with the file manager.
Happens with n450 images as well on a AtomPC(Lenovo S10-3 HW).
Yes, an issue with the file manager. Saul?
I believe this is more of a libfm problem. It looks like the function on_mount_action_finished from libfm/src/gtk is never called and the thread on which the USB stick was running is looping to infinity. The on_mount_action_finished is passed as a callback to g_mount_unmount_with_operation, but for some reason the callback is never called. I also noticed that there is warning when unmounting and USB stick: (pcmanfm:960): GLib-CRITICAL **: g_source_attach: assertion 'source->context == NULL' failed. There must be a synchronization problem somewhere because the file managers work well when is ran using: pcmanfm --sync (Does X calls synchronous).
In the libfm source code there is a FIXME comment: file libfm/src/gtk/fm-places-view.c, function on_unmount(). The libfm library creates a mount(FM_PLACES_ITEM_MOUNT) in my test case (genericx86). It could be possible that a volume(FM_PLACES_ITEM_VOLUME) won't break pcmanfm in the same way. But i wasn't able to discover the differences between the two (a mount vs a volume) or the place where they are assigned. A fix could be to try to force the mounting as a VOLUME and not as a simple MOUNT.
I've took another look into this and it seems that when you insert an USB stick the File Manager doesn't show it into the Places sidebar like it usually did. However the stick is successfully mounted and information about it can be viewed by typing the "mount" command and its content can be accessed by navigating to its mounted path. This implies the bug doesn't happen anymore, but not for the right reasons. Possibly the fact that the File Manager doesn't receive the mounting and unmounting events/signals prevents the bug from showing up.
Hy Marius, There is a bug opened for that: https://bugzilla.yoctoproject.org/show_bug.cgi?id=6492
From what I tested this bug doesn't happen any more.