This forum has been archived. All content is frozen. Please use KDE Discuss instead.

--enable-memleak-check ?

Tags: None
(comma "," separated)
imported4-blujay
Registered Member
Posts
60
Karma
0

--enable-memleak-check ?

Sun Jan 21, 2007 5:33 am
What does this flag do, and should I use it when compiling KTorrent?
imported4-Ivan
Registered Member
Posts
819
Karma
0

Sun Jan 21, 2007 12:24 pm
It's used for providing memory leak check. You shouldn't use it unless you are experiencing some high memory usage with KTorrent and you want to help us detect the problem.
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Sat Jan 27, 2007 1:39 am
You shouldn't use it unless you are experiencing some high memory usage with KTorrent and you want to help us detect the problem.


But there is nothing wrong using it? How can I help you if I experiency memory leaks (I do it, but rarely with recent svn)?
imported4-Ivan
Registered Member
Posts
819
Karma
0

Sun Jan 28, 2007 10:16 pm
If you use it, KT should produce a file named leak.out which needs to be analyzed with a script called leak-analyze. Now, I cannot remember where did I find this script (George probably sent me a link) but you can try googling it.
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Sun Jan 28, 2007 10:40 pm
imported4-Ivan
Registered Member
Posts
819
Karma
0

Mon Jan 29, 2007 12:38 am
Yep. Didn't even know it was on our website :)
imported4-blujay
Registered Member
Posts
60
Karma
0

Thu Feb 01, 2007 1:16 am
Where is leak.out created? I just experienced a huge KT memory leak, using 662MB of RES and 2432M VIRT, using up all my physical memory and all of my swap, and I'd be very keen on finding that file and letting you guys analyze it. :)
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Thu Feb 01, 2007 1:19 am
In your home dir.
You must run leak analize before submitting (read in other topic) like this:
leak-analyze /opt/kde3/bin/ktorrent /home/kriko/leak.out
imported4-blujay
Registered Member
Posts
60
Karma
0

Thu Feb 01, 2007 6:56 am
You mean like this?

Code: Select all
$ ./leak-analyze.sh /usr/bin/ktorrent ~/leak.out
Gathered 42 (27 unique) points of data.
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb)
#-- Leak: counted 1x / total Size: 28
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 36
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 3x / total Size: 84
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 32
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 3x / total Size: 24
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 28
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 4
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 4
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 32
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 8
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 32
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 5x / total Size: 125
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 3x / total Size: 36
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 2x / total Size: 96
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 3x / total Size: 36
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 3x / total Size: 36
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 21
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 20
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 40
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 20
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.

#-- Leak: counted 1x / total Size: 12
No symbol table is loaded.  Use the "file" command.
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Thu Feb 01, 2007 11:53 am
Yes, from this thread:
http://ktorrent.org/forum/viewtopic.php ... 24805c5416

but I think you should upload here leak.out too, otherwise I don't know how you can see where leak happened.
imported4-blujay
Registered Member
Posts
60
Karma
0

Thu Feb 01, 2007 11:58 am
Oh, I already deleted the leak.out file. Well, next time I'll upload both.

BTW, am I doing something wrong, or is it supposed to give that "no symbol table" message?
User avatar
kriko
Registered Member
Posts
164
Karma
0
OS

Thu Feb 01, 2007 12:20 pm
I don't know, it gives me same messages as you have :D

Let's wait for a developer to reply.
George
Moderator
Posts
5421
Karma
1

Thu Feb 01, 2007 7:44 pm
Well, if you want a symbol table, you need to build it with debugging turned on (configure --enable-debug=full)

But we already know what it's gonna give, a bunch of leaks in libraries other then ktorrent, which are probably not real memory leaks.
imported4-blujay
Registered Member
Posts
60
Karma
0

Fri Feb 02, 2007 5:49 am
Respectfully, the current SVN r628945 of KTorrent seems to leak memory very badly compared to 2.0.3. I used to let 2.0.3 run for days with no problems, but the current builds (including 2.1rc1) consistently leak memory badly. After 24 hours or so it sucks up all my system's memory and swap, resulting in OOM kills of other apps.
imported4-Ivan
Registered Member
Posts
819
Karma
0

Fri Feb 02, 2007 1:08 pm
Ok. Recompile with debugging symbols and run the same test.

If you're right, we should see some leaks in our code.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]