[Bugs] #4889 Sugar NORM: virtual memory leak in background control panel

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Oct 6 04:57:27 EDT 2015


#4889: virtual memory leak in background control panel
---------------------+-------------------------------
  Reporter:  quozl   |            Owner:
      Type:  defect  |           Status:  new
  Priority:  Normal  |        Milestone:  Unspecified
 Component:  Sugar   |          Version:  Unspecified
  Severity:  Minor   |       Resolution:
  Keywords:          |  Distribution/OS:  OLPC
Bug Status:  New     |
---------------------+-------------------------------

Comment (by quozl):

 The VmSize leak rate for background control panel show and hide is of the
 order of 151 kB per second.

 A leak occurs with all GTK+ drawing operations done by Sugar.  It even
 reproduces when scrolling the Journal, at a rate of 24 kB per second.


 Automated reproducers:
 {{{
 sudo yum install xdotool

 # journal scrolling
 # prepare by adding journal entries until scroll bar is present
 function test {
   xdotool \
   mousemove 1191 801 click 1 sleep 0.2 \
   mousemove 1191 200 click 1 sleep 0.2
 }

 # background control panel
 # prepare by using f3 then position cursor in search box
 function test {
   xdotool \
   mousemove 600 450 click 3 sleep 0.7 \
   mousemove 700 660 click 1 sleep 0.7 \
   mousemove 935 270 click 1 sleep 7 \
   key Escape sleep 0.1 \
   key Escape sleep 1
 }

 # test runner and vmsize logger
 while true; do
   echo $(date +%s.%N) \
     $(awk '/VmSize/ { print $2; }' /proc/$(pgrep -f jarabe)/status)
   test
 done | tee memory.log
 }}}

 Log file analysis tool:
 {{{
 #!/usr/bin/python
 import glob

 for name in glob.glob('memory*.log'):
     lines = file(name, 'r').readlines()
     t0 = float(lines[0].split()[0])
     t1 = float(lines[-1].split()[0])
     v0 = float(lines[0].split()[1])
     v1 = float(lines[-1].split()[1])
     print '%.0f | %s' % (((v1 - v0) / (t1 - t0)), name)
 }}}

--
Ticket URL: <https://bugs.sugarlabs.org/ticket/4889#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list