Opened 13 years ago

Closed 13 years ago

#1237 closed Bug (duplicate)

disastrous RAM usage

Reported by: kiddo Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 1.34
Severity: Critical Keywords:
Cc:

Description

something disastrous happened sometime between 1.22 and 1.32, because if I start 1.32 with two simple torrents, my 512 MB ram laptop begins swapping to death. In a few seconds after starting transmission, the process eats more than 300 MiB of RAM.

I just reverted to transmission 1.22, and it now uses 11.5 MiB of RAM (with the same torrents, fully loaded). Startup was near instantaneous too, whereas with 1.32 it would take a minute of disk trashing.

This is on ubuntu linux 8.04.1 with the packages provided by getdeb.net.

Change History (40)

comment:1 Changed 13 years ago by livings124

  • Resolution set to worksforme
  • Status changed from new to closed

This is the first I've heard of this, and 1.33 is the current version. Can you verify this on 1.33?

comment:2 Changed 13 years ago by theCrank

Can you give proof, that transmission is the process that's causing your problems?

comment:3 Changed 13 years ago by theCrank

Sorry, i left out a line when reading the post. forget it.

I had 1.30, 1.31 and 1.32 running on a slug with 32MBs of RAM. No Problems either.

comment:4 Changed 13 years ago by kiddo

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I don't have access to 1.33 yet, anyway here is comparing what happens with 1.22 and 1.32:

http://jeff.ecchi.ca/public/transmission%20issue%201237%201.22%20mem%20usage.ogv http://jeff.ecchi.ca/public/transmission%20issue%201237%201.32%20mem%20usage.ogv

In the second video (1.32) you can see my memory usage jumping over 130 mb in a few seconds, and I end up killing it (very painfully) with gnome-system-monitor.

comment:5 Changed 13 years ago by livings124

  • Resolution set to worksforme
  • Status changed from reopened to closed

Again, can you verify this on 1.33? Any sort of memory trace such as a shark profile would be useful. Right now we can't replicate this, we don't have enough info, and the report is based off of a no-longer supported version.

comment:6 Changed 13 years ago by kiddo

  • Resolution worksforme deleted
  • Status changed from closed to reopened

well I did try with the 1.33 transmission-gtk provided by getdeb, same problem. Tell me how to provide said trace and I'd be glad to (if it doesn't involve compiling a kernel ;).

comment:7 Changed 13 years ago by charles

kiddo: thanks for the videos. They do a good job of showing that there is a problem here. As livings124 said, the next step is to get some kind of a memory profiler on your installation of 1.32 to try to figure out what the problem is.

does getdeb have a debug version of Transmission that you can install, and run inside valgrind?

comment:8 Changed 13 years ago by charles

kiddo: The the Ubuntu wiki has information on how to get debug packages for 8.04. The page is about debugging program crashes, but the information should apply to this issue too IMO.

comment:9 Changed 13 years ago by charles

  • Resolution set to invalid
  • Status changed from reopened to closed

kiddo: I need more information before I can proceed with this ticket, since it seems to be a bug that's triggered by something in your configuration -- I can't reproduce it.

Please attach the information described in the above two comments and reopen this ticket.

comment:10 Changed 13 years ago by charles

  • Version changed from 1.32+ to 1.33

comment:11 Changed 13 years ago by kiddo

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Version changed from 1.33 to 1.34

I cannot provide such info at the moment. Did you try starting torrents with transmissio 1.22 in ubuntu 8.04, and then exiting transmission, upgrading to 1.34, then launching transmission? It's that simple for me.

And I found proof that I am not the only one: http://forum.transmissionbt.com/viewtopic.php?f=9&t=5738

I am not subscribed to the forums, maybe you could try private-messaging (or public messaging, or both) that person and ask if he can provide the required debugging information?

comment:12 Changed 13 years ago by kiddo

For the record, that guy in the forums was saying that transmission would eat 62% of 2 gb of RAM. I have a 512 mb of ram machine, it is *impossible* for me to provide this information anyway; my machine is way too underpowered to run that, even without the valgrind stuff on top. When the problem occurs (when I start transmission), I "cannot afford" to let transmission run for more than a few seconds before I kill it, otherwise my machine will be kernel panicking/death swapping.

comment:13 Changed 13 years ago by kiddo

I just remembered that I had an account in the forums, sent Jayrome a message asking to provide info for this ticket.

comment:14 Changed 13 years ago by charles

Kiddo... well, for one thing I don't have Ubuntu 8.04, and I'm not running the same torrents that you are. I did try switching from 1.22 to 1.34, but everything worked.

If you or the user in the threads can supply some more information I'd like to get this cleared up.

comment:15 Changed 13 years ago by kiddo

FWIW, it seemed to me as if it was not torrent-specific, as the torrents that were active when I tried yesterday were not the same from the ones a month ago, I think. Just wanted to specify that. The bugbuddy trace that the forum guy provided doesn't help, by any chance? http://pastebin.com/m7a956fc9

comment:16 Changed 13 years ago by charles

kiddo: that pastebin is empty.

comment:17 Changed 13 years ago by kiddo

damnit, must have expired. it worked yesterday.

comment:18 Changed 13 years ago by Jayrome

I _confirm_ there is a total performance degradation starting 1.32. Go visit the forum by the link provided.

The pestebin is empty because it has been up there for one month and purged while you were closing and reopening this bug instead of telling the guy what info you want him to provide in order to find the fault.

comment:19 Changed 13 years ago by Jayrome

There _must_ be something broken, - so many unwanted features added since 1.22. =)

comment:20 Changed 13 years ago by Jayrome

http://pastebin.com/f5ff3213

Ran 1.33 in valgrind (I don't have 1.34 in my stable or testing repo in Mandriva 2008.1, and I have checked the Cooker).

comment:21 Changed 13 years ago by Jayrome

GUI never appears, 95% at dual-core 2.21 GHz, memory eaten gradually up to 80% then falls out.

$ valgrind --leak-check=full transmission

http://pastebin.com/f2f03faff

comment:22 Changed 13 years ago by docker

I see the same problem on FreeBSD-7.1 (amd64 system).

1.32-1.34 can run for hours and work correctly, but at some point it begins to use a lot of memory, up to 2G of memory. I saw this problem only when somebody (even 1 client) begins to download something from my server. 1.34 gets more and more memory very quickly, it can get 300M in only few seconds (I saw this in the 'top' output).

I use 1.34 in LAN, no proxy, no web interface, gtk interface. All installation I made from the FreeBSD ports.

comment:23 Changed 13 years ago by charles

==6806== definitely lost: 2,221 bytes in 5 blocks. ==6806== possibly lost: 28,521 bytes in 46 blocks. ==6806== still reachable: 880,836,680 bytes in 1,498 blocks.

That's a lot of still-reachable bytes.

Jayrome: could you run valgrind with the flag to show reachable memory upon exit, so that I can see where these 800,836,680 bytes were allocated from?

Thanks very much.

comment:24 Changed 13 years ago by charles

docker: I appreciate the feedback, but a valgrind log would be more helpful ;)

comment:25 Changed 13 years ago by docker

charles: looks like valgrind cannot be used on FreeBSD/amd64, I will install cli version of transmission on FreeBSD/i386 and will try to reproduce this problem under valgrind. At least it will be know whether this problem has something common with gui interface. But on FreeBSD/amd64 this problem happens every day. Can I use another memory debugging library with transmission to catch this problem? What do you suggest?

comment:27 Changed 13 years ago by charles

Jayrome: thanks very much. At first glance that looks like it'll be very helpful.

Money quote:

#
#
==2583== 420,902,857 bytes in 1 blocks are still reachable in loss record 106 of 107
#
==2583==    at 0x4021828: malloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
#
==2583==    by 0x8093DE3: tr_loadFile (in /usr/bin/transmission)
#
==2583==    by 0x807AF62: tr_bencLoadJSONFile (in /usr/bin/transmission)
#
==2583==    by 0x805EB0A: pref_string_set_default (in /usr/bin/transmission)
#
==2583==    by 0x80763CE: tr_prefs_init_global (in /usr/bin/transmission)
#
==2583==    by 0x80678CB: main (in /usr/bin/transmission)
#
==2583==
#
==2583==
#
==2583== 458,752,000 bytes in 1 blocks are still reachable in loss record 107 of 107
#
==2583==    at 0x40218FE: realloc (in /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so)
#
==2583==    by 0x8082AD2: JSON_parser_char (in /usr/bin/transmission)
#
==2583==    by 0x808234A: tr_jsonParse (in /usr/bin/transmission)
#
==2583==    by 0x807AF86: tr_bencLoadJSONFile (in /usr/bin/transmission)
#
==2583==    by 0x805EB0A: pref_string_set_default (in /usr/bin/transmission)
#
==2583==    by 0x80763CE: tr_prefs_init_global (in /usr/bin/transmission)
#
==2583==    by 0x80678CB: main (in /usr/bin/transmission)

comment:28 Changed 13 years ago by charles

Jayrome: is your ~/.config/transmission/settings.json file corrupt? How large is it? Could you attach a compressed copy of it to this ticket?

comment:29 Changed 13 years ago by Jayrome

http://slil.ru/26182643

400+ Mb uncompressed

When I revert back to 1.22, everything works just fine.

comment:30 Changed 13 years ago by Jayrome

When I revert back to 1.22, everything works just fine.

Oh, it's not used there... Modification date one month ago. Well, you will see.

comment:31 Changed 13 years ago by charles

Jayrome: this config file is definitely the problem, as you probably already guessed from its insane size. :)

In your /home/jayrome, there's a directory in which you last opened a .torrent file. Transmission seems to have corrupted this name to an insane extent, and I'd like to try to reproduce the corruption. What is the name of that directory?

Also, could you please try the following steps in the gtk version of 1.34: (1) delete your ~/.config/transmission/settings.json file, then (2) add to transmission a torrent from that directory, so that the open-dialog-dir' key in settings.json gets set again, then (3) exit Transmission, and finally (4) take a look at the new settings.json file that was saved when you exited in step (3). Is it insanely huge again? If not, what is the value of the open-dialog-dir' key that got saved?

comment:32 Changed 13 years ago by charles

Hm, that's interesting. Silly trac. Let's try that again:

Also, could you please try the following steps in the gtk version of 1.34:

1. delete your ~/.config/transmission/settings.json file, then
2. add to transmission a torrent from that directory, so that the
open-dialog-dir key in settings.json gets set again,then
3. exit Transmission, and finally
4. take a look at the new settings.json file that was saved when
you exited in step 3. Is it insanely huge again? If not, what is
the value of the open-dialog-dir key that got saved?

comment:33 Changed 13 years ago by Jayrome

I have deleted the file, installed 1.33 and it seems like working. The program starts normally, and it downloads/seeds for now. I have added another torrent file and it went fine. Here's what the config file looks like now:

    "download-dir": "\/home\/jayrome\/\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0438",

"Загрузки", i.e. "Downloads"

    "open-dialog-dir": "\/home\/jayrome\/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b", 

"Рабочий стол", i.e. "Desktop"

I think another bug I wrote about earlier at the forum is related: http://forum.transmissionbt.com/viewtopic.php?f=9&t=5662

comment:34 Changed 13 years ago by Jayrome

I have installed 1.34 from source, and adding a new torrent file didn't brake it. It is using ~20 Mb of memory and 1-2% CPU running 20 jobs.

comment:35 Changed 13 years ago by Jayrome

Crash.

transmission-bugreport.txt http://pastebin.com/f2a723f5c

comment:36 Changed 13 years ago by Jayrome

Another one.

http://pastebin.com/f3835775f

Reverting back to 1.33.

comment:37 Changed 13 years ago by Jayrome

Aaand once again. http://pastebin.com/f1f0ddcae

No obvious lags in memory, files or CPU usage. =)

comment:38 Changed 13 years ago by charles

  • Resolution set to fixed
  • Status changed from reopened to closed

The crashes are a separate issue, and this ticket is already crowded enough.

So, the problem here is that 1.32 corrupted the config file due to bug #1190, which was fixed in 1.33. Thanks for helping track this down. :)

comment:39 Changed 13 years ago by charles

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:40 Changed 13 years ago by charles

  • Resolution set to duplicate
  • Status changed from reopened to closed

marking as a duplicate of #1190

Note: See TracTickets for help on using tickets.