<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5332</bug_id>
          
          <creation_ts>2013-10-10 08:00:18 +0000</creation_ts>
          <short_desc>CPU Overloaded after USB Stick Unmount using File Manager</short_desc>
          <delta_ts>2014-09-12 12:52:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.5</version>
          <rep_platform>Other</rep_platform>
          <op_sys>x86</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Razvan Ionescu">razvanx.ionescu</reporter>
          <assigned_to name="Marius Avram">marius.avram</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>corneliux.stoicescu</cc>
    
    <cc>cristian.iorga</cc>
    
    <cc>laurentiu.palcu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>tom.zanussi</cc>
          
          <qa_contact name="Lucian Musat">georgex.l.musat</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>37791</commentid>
    <comment_count>0</comment_count>
    <who name="Razvan Ionescu">razvanx.ionescu</who>
    <bug_when>2013-10-10 08:00:18 +0000</bug_when>
    <thetext>Generic x86 - AtomPC

TEST - CPU overload
1. Open terminal and issue top -&gt; Nothing unusual
2. Insert USB stick and open FileManager. Create a folder on the stick. (optional)
3. Open terminal and issue top -&gt; Nothing unusual
4. Unmount the USB stick.
5. Open terminal and issue top -&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37794</commentid>
    <comment_count>1</comment_count>
    <who name="Razvan Ionescu">razvanx.ionescu</who>
    <bug_when>2013-10-10 09:10:00 +0000</bug_when>
    <thetext>Tested with:
poky 102bf5e0f640fe85068452a42b85077f1c81e0c9
meta-intel a1138af21f6ba85e79d1422a3f0a3e0c4f658a90</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37796</commentid>
    <comment_count>2</comment_count>
    <who name="Razvan Ionescu">razvanx.ionescu</who>
    <bug_when>2013-10-10 10:29:09 +0000</bug_when>
    <thetext>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 &lt;   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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37800</commentid>
    <comment_count>3</comment_count>
    <who name="Razvan Ionescu">razvanx.ionescu</who>
    <bug_when>2013-10-10 11:08:05 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37846</commentid>
    <comment_count>4</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-10-11 14:31:04 +0000</bug_when>
    <thetext>NOTE: Does not happen with generic86-64 image on Sugarbay platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37847</commentid>
    <comment_count>5</comment_count>
    <who name="Stoicescu Cornel">corneliux.stoicescu</who>
    <bug_when>2013-10-11 14:50:47 +0000</bug_when>
    <thetext>NOTE: Actually, it does. See below for more information:

If the user unmounts using the file manager&apos;s &quot;Unmount Volume&quot; option (right click on the sdb drive) the issue will appear.

If the user unmounts the volume using the &apos;umount /dev/sdb&apos; command, the issue will not happen. 

This seems like an issue with the file manager.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38136</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-10-23 08:15:41 +0000</bug_when>
    <thetext>Happens with n450 images as well on a AtomPC(Lenovo S10-3 HW).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39543</commentid>
    <comment_count>7</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2013-12-20 23:55:08 +0000</bug_when>
    <thetext>Yes, an issue with the file manager. Saul?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40007</commentid>
    <comment_count>8</comment_count>
    <who name="Marius Avram">marius.avram</who>
    <bug_when>2014-01-23 13:53:32 +0000</bug_when>
    <thetext>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 &apos;source-&gt;context == NULL&apos; failed. 

There must be a synchronization problem somewhere because the file managers work well when is ran using: pcmanfm --sync (Does X calls synchronous).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40081</commentid>
    <comment_count>9</comment_count>
    <who name="Marius Avram">marius.avram</who>
    <bug_when>2014-01-29 15:18:13 +0000</bug_when>
    <thetext>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&apos;t break pcmanfm in the same way. But i wasn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45167</commentid>
    <comment_count>10</comment_count>
    <who name="Marius Avram">marius.avram</who>
    <bug_when>2014-08-19 11:15:38 +0000</bug_when>
    <thetext>I&apos;ve took another look into this and it seems that when you insert an USB stick the File Manager doesn&apos;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 &quot;mount&quot; command and its content can be accessed by navigating to its mounted path.

This implies the bug doesn&apos;t happen anymore, but not for the right reasons. Possibly the fact that the File Manager doesn&apos;t receive the mounting and unmounting events/signals prevents the bug from showing up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45169</commentid>
    <comment_count>11</comment_count>
    <who name="Lucian Musat">georgex.l.musat</who>
    <bug_when>2014-08-19 11:31:08 +0000</bug_when>
    <thetext>Hy Marius,

There is a bug opened for that:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=6492</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>45571</commentid>
    <comment_count>12</comment_count>
    <who name="Marius Avram">marius.avram</who>
    <bug_when>2014-09-12 12:52:41 +0000</bug_when>
    <thetext>From what I tested this bug doesn&apos;t happen any more.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>