I believe there's a memory leak; how can I test?

Asked by Adam Buchbinder

I'm running Ubuntu Gutsy.

Recently, I noticed that pidgin was using around 600MB of memory (according to the VIRT column in top); I killed it, and about that much disappeared from swap--I think this means that pidgin had actually used that memory for something; it wasn't like the way a Java process will list the max allocation in its VIRT column. As I'm running a relatively low-memory system (0.5G), this is a significant problem. It had been running for at least a week, probably several; I use it for plain-vanilla instant messaging over Jabber and AIM.

I'd like to know how I can diagnose the memory leak, to file a more helpful bug report. Is there a trace tool? Some particular incantation to create a useful debug log?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pidgin Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Buchbinder
Solved:
Last query:
Last reply:
Revision history for this message
dave.com (dwmac) said :
#1

Ruled out your PSU?

Revision history for this message
Phil Hannent (phil-hannent-deactivatedaccount) said :
#2

Adam Buchbinder wrote:
> New question #39213 on pidgin in ubuntu:
> https://answers.launchpad.net/ubuntu/+source/pidgin/+question/39213
>
> I'm running Ubuntu Gutsy.
>
> Recently, I noticed that pidgin was using around 600MB of memory (according to the VIRT column in top); I killed it, and about that much disappeared from swap--I think this means that pidgin had actually used that memory for something; it wasn't like the way a Java process will list the max allocation in its VIRT column. As I'm running a relatively low-memory system (0.5G), this is a significant problem. It had been running for at least a week, probably several; I use it for plain-vanilla instant messaging over Jabber and AIM.
>
> I'd like to know how I can diagnose the memory leak, to file a more helpful bug report. Is there a trace tool? Some particular incantation to create a useful debug log?
A memory leak of such magnitude would probably been found already. I know for a
fact that when I run Pidgin for that length of time it does not even come close
to the size you are seeing.

Could you provide more details:
1, Which version of Pidgin are you using?
2, What plugins are being used? OTR? Skype? Guifications? Music
3, How many buddies do you have roughly?
4, Are you in any chat rooms for that whole time?

There was a bug reported on the windows version that relates to GTK to do with
the wallpaper changing:
http://developer.pidgin.im/ticket/4722

There is a page on how to report bugs, however it is more targeted at crashes or
something failing:
http://developer.pidgin.im/wiki/TipsForBugReports

As a developer you can run the software within a tool that highlights memory
leaks, however that is probably too complex for a support situation.

Sorry I cannot be more specific but with more information we might be able to
get to the bottom of this.

Regards
Phil Hannent

Revision history for this message
Adam Buchbinder (adam-buchbinder) said :
#3

I don't think my power supply is capable of causing memory leaks, unless there's something else that 'PSU' might stand for.

I'm running pidgin 1:2.2.1-1ubuntu4.2 on Gutsy. The only plugin I have is OTR, but I didn't have any OTR conversations open. I have about ten online buddies. I don't use the chatroom functionality.

I'm okay with going through nontrivial diagnostic procedures, if it'll help. If it's not worth it to go to this trouble with version 2.2, since 2.4 has already been release, let me know and I'll just deal with it until I can upgrade to Hardy, and I'll come back and complain more if it's still going on.

Revision history for this message
Ethan Blanton (eblanton) said :
#4

There have been major memory leaks in versions of OTR in the past; the fact that you're running such an old version of Pidgin leads me to believe that you might also be running an older OTR. Try unloading it, and see if the problem goes away.

Revision history for this message
Adam Buchbinder (adam-buchbinder) said :
#5

I'm running Hardy now, and I haven't had memory-leakage problems with Pidgin. I don't know what was causing it with the old version, and I suppose it's not relevant at this point anyway.