Alan Hargreaves' Blog

The ramblings of an Australian SaND TSC* Principal Field Technologist

Finding memory leaks in application space

A colleague has just written a troubleshooting document (that should be on sunsolve in the next week or so as troubleshooting document 76774) about how to find memory leaks with libumem and mdb.

Now, I’ve always had to restart mozilla every couple of days on the Ultra 10 at home, as I’ve only got 192 mb of memory in it, and it just seems to keep growing.

Now on my work desktop (an ultra 80 with substantially more memory) I run two instances of mozilla in two different profiles. One for my mail and normal browsing (run on my right screen) and one for working in Apollo (the ticketing system that PTS ans RPE are now using). Just for laughs I thought, why not start up those two with libumem and see what we find.

The interesting numbers come from the mozilla I use for general browsing and email.

Total   17858 buffers, 818536 bytes

That’s a lot of leaks to happen in 10 hours. So where were the big ones?

CACHE     LEAKED   BUFCTL CALLER
00078208    8510 06819260 libCrun.so.1`__1c2n6FI_pv_+0x28
00078208    2150 0819f480 libCrun.so.1`__1c2n6FI_pv_+0x28
00073c08    2976 02dc4168 libplc4.so`PL_strdup+0x3c

And the stacks for these callers show that they come from:

8510,2150 /tmp/mozilla/components/libmailnews.so
2976      /tmp/mozilla/components/libmsgimap.so

Unfortunately, those libraries have been stripped, so I can’t get any closer to those leaks yet. I’ll have to have a chat with the folks who do the Sun SPARC build.

Once I get a little more information we might be able to start hitting bugzilla. Wouldn’t it be nice if we closed down some of those leaks?

Advertisements

Written by Alan

June 11, 2004 at 2:15 am

Posted in General

2 Responses

Subscribe to comments with RSS.

  1. Alan, It would be beneficial if Sun sent a pre-configured Solaris 10 box over to the Mozilla foundation office which would allow the foundation employees to use libumem and DTrace to make a more robust application.

    Yusuf Goolamabbas

    June 11, 2004 at 9:15 pm

  2. The newest mozilla 1.4 which can be downloaded at sun.com has full symbol information (we disabled the strip feature in makefile). You can start from that build.

    Kyle Yuan

    June 15, 2004 at 2:43 pm


Comments are closed.

%d bloggers like this: