[Sugar-devel] Storage leak in sugar-session

James Cameron quozl at laptop.org
Thu Jun 3 21:50:30 EDT 2010


On Thu, Jun 03, 2010 at 03:00:09AM -0700, Hal Murray wrote:
> [murray at xo-0d-57-33 ~]$ uptime
>  00:07:23 up 17 days,  1:08,  1 user,  load average: 3.55, 2.47, 1.10
> olpc     1940 1876  0 48409 164468  0 May13 ?        00:31:41 python 
> /usr/bin/sugar-session
> 
> Note the load average.  I could login using ssh to collect that info, but it 
> took a long long time.

I would look for other causes of high load average.  Check for other
processes running.

> Is this an interesting problem?  Do you want a bug report so it
> doesn't get lost?

Yes, and yes.  bugs.sugarlabs.org for the sugar-session VSZ growth case.

> I don't know my way around sugar and I've never chased a storage leak in 
> Python.  Is there something I should do to collect more info?

Yes, regularly capture "/proc/${PID}/smaps" of the sugar-session
process, where ${PID} is the process ID.  ${PID} may be trivially
obtained with pgrep.

So run this script for a few days:

#!/bin/sh
DIR=/home/olpc/sugar-session-smaps
mkdir -p ${DIR}
while true; do
    PID=$(pgrep -f sugar-session)
    if [ -n "${PID}" ]; then
        STAMP=$(date +%s)
        cat /proc/${PID}/smaps > ${DIR}/${STAMP}
    fi
    sleep 60
done

That will tell us which segments of the process virtual memory are
growing.  It's likely to be one particular segment, but this will verify
it, and give us an idea of when it is growing, and how rapidly.

p.s. don't use the phrase sugar-session in the name of the script.

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Sugar-devel mailing list