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

Memory leaks in svn

Tags: None
(comma "," separated)
lucke
Registered Member
Posts
205
Karma
0

Memory leaks in svn

Fri Sep 15, 2006 10:53 am
It seems that latest svn introduces memory leaks, as confirmed by leak-analyze.
George
Moderator
Posts
5421
Karma
1

Fri Sep 15, 2006 4:56 pm
Can you post the output of leak-analyze ?
lucke
Registered Member
Posts
205
Karma
0

Fri Sep 15, 2006 8:00 pm
I didn't word myself quite accurately. Actually, leak-analyze shows only some not quite meaningful output (with --enable-memleak-check --enable-debug-full).

---
Gathered 49 (29 unique) points of data.
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb)
#-- 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: 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: 12
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 1x / total Size: 32
No symbol table is loaded. Use the "file" command.

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

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

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

#-- Leak: counted 1x / total Size: 68
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: 20
No symbol table is loaded. Use the "file" command.

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

#-- Leak: counted 1x / total Size: 16
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: 28
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: 28
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: 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: 32
No symbol table is loaded. Use the "file" command.

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

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

It's actually similar with ktorrent 2.0.2. However, ktorrent stable and earlier svn revisions used to have a memory footprint in range between 15 and 30 (according to exmap), while latest svn revisions quickly reach 90 mb. That caught my attention.
George
Moderator
Posts
5421
Karma
1

Sat Sep 16, 2006 8:28 am
The leak-analyze output is normal, if you see code with those leaks then KT has a leak. Those leaks are in libraries and most of them are probably one time 'leaks' with stuff which needs to be in memory the whole time KT is running.

You have to compare with the same set of torrents, you might have a torrent with huge chunks of 4 MB and if you are downloading 10 of those at the same time, you are using 40 MB.
lucke
Registered Member
Posts
205
Karma
0

Sat Sep 16, 2006 8:35 am
I confirm that with the same set of torrents, ktorrent 2.0.2 and previous svn revisions were 30 mb upmost, while latest svn reached 150 mb.

It is something to think about ;-)
George
Moderator
Posts
5421
Karma
1

Sat Sep 16, 2006 10:52 am
From which svn revision did you see this ?
lucke
Registered Member
Posts
205
Karma
0

Sat Sep 16, 2006 11:10 am
585074, 584884, 584405 and some earlier. I can't really say which was the revision I first noticed that problem in.
George
Moderator
Posts
5421
Karma
1

Sun Sep 17, 2006 8:39 am
I will see what changed around that time, btw what plugins do you have loaded ?
lucke
Registered Member
Posts
205
Karma
0

Sun Sep 17, 2006 9:32 am
Infowidget, ipfilter, scanfolder, search.
lucke
Registered Member
Posts
205
Karma
0

Mon Oct 30, 2006 9:52 am
Just to let you know - svn version still grows to around 100MB, while ktorrent 2.0.3 seems to stay between 15-30MB.
George
Moderator
Posts
5421
Karma
1

Mon Oct 30, 2006 5:37 pm
We know, I have not yet found the cause of this.
lucke
Registered Member
Posts
205
Karma
0

Mon Oct 30, 2006 10:08 pm
Have you tried using valgrind?

I'll try to get some decent output myself.
lucke
Registered Member
Posts
205
Karma
0

Tue Oct 31, 2006 8:49 am
I made a bit of valgrind testing. Results are here.

It seems like the last part is the culprit (828,080 bytes in 1 blocks are possibly lost in loss record 1,220 of 1,220). At least that doesn't seem to happen with ktorrent stable.

Hope that helps.
George
Moderator
Posts
5421
Karma
1

Tue Oct 31, 2006 6:08 pm
Strange, the KIO::StoredTransferJob should get rid of the data. I will replace the StoredTransferJob by an own implementation and see if that gets rid of the problem.
George
Moderator
Posts
5421
Karma
1

Sat Dec 02, 2006 10:35 am
I think I found the culprit, it turned out to be the log viewer.


Bookmarks



Who is online

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