[cubox-i] transmission memory leak?

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

[cubox-i] transmission memory leak?

Postby pippo87 » Sat Jun 06, 2015 4:54 pm

Hi,

I am facing most probably a memleak issue.
Any time I start downloading anything in transmission, my memory cache starts increasing rapidly till transmission eats up all the memory and my system freezes.
Transmission cache size is set to the default 4MB.

OS:
Linux arch 3.14.42-1-ARCH #1 SMP Thu May 14 01:28:44 MDT 2015 armv7l GNU/Linux

Version:
transmission-daemon 2.84 (14307)

Let me know if I can help with any further info, my config is below.

Thanks in advance!
Viktor

$this->bbcode_second_pass_code('', '# cat /var/lib/transmission/.config/transmission-daemon/settings.json
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/srv/transmission/download-dir",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/srv/transmission/download-dir",
"incomplete-dir-enabled": false,
"lpd-enabled": false,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 56554,
"peer-port-random-high": 56555,
"peer-port-random-low": 56545,
"peer-port-random-on-start": true,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 1,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 2,
"ratio-limit-enabled": false,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{4a57acbe89087e6738fbcbd252812552320c8321XTSlI/kd",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 10000,
"speed-limit-down-enabled": true,
"speed-limit-up": 1000,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 14,
"utp-enabled": true,
"watch-dir": "/srv/transmission/watch-dir",
"watch-dir-enabled": true
}')
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby WarheadsSE » Mon Jun 08, 2015 1:31 pm

Do you have any swap?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Fri Jun 12, 2015 3:21 pm

No, I have not. I have 2 GB RAM, but no swap.
I can create a swap file tomorrow and try with it.

Thanks for your reply!
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Sat Jun 13, 2015 12:40 pm

Thanks for the hint, it looks like it works now. RAM is filled up till it has 7-8MB free memory, but it does not freeze, always writes out the data and the free memory increases to 15-30MB. So far it's good. What is strange for me that the SWAP looks untouched (used swap = 0B)

Is there any way to configure Arch to keep more RAM free? I have Kodi and when I start to play a bigger video, it takes quite long time to get it loaded when transmission is downloading.

Thanks!
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Sat Jun 13, 2015 12:50 pm

Unfortunately it broke again. I assume that it couldn't write data out as fast as transmission wrote in.
My storage is currently attached via USB. (later I plan to get another connected via esata)
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Sat Jun 13, 2015 1:27 pm

I caught something. It freezed when it started to swap:

$this->bbcode_second_pass_code('', '
total used free shared buff/cache available
Mem: 2.0G 334M 11M 444K 1.6G 1.6G
Swap: 2.0G 16K 2.0G')

Till this occassion I haven't seen any swap used..
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Sat Jun 13, 2015 6:04 pm

I think I got one cause: the USB connected storage is too slow. So far I set transmission to download on max 1MB/s speed, and it started to fill the swap as well. Not significantly, but continuosly increasing.

Why does transmission fill up the cache if it's set to use 4MB? I still think it's memleak. Previously I had deluge and it ran without issues for months.

As a workaround: is there any chance to configure arch to keep more RAM free?

Thanks!
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby moonman » Sun Jun 14, 2015 10:15 am

If i am not mistaken it is 4MB per peer. So if you are connected to 50 peers it will eat up 200MB of ram.

You may not be running out of ram. Check free or htop. Cache and buffer can be freed up if required by applications.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Sun Jun 14, 2015 1:46 pm

$this->bbcode_second_pass_quote('', 'i')t is 4MB per peer

Thanks for this info, it is not written in the manual. I checked and I do not have that many peers.

$this->bbcode_second_pass_quote('', 'C')ache and buffer can be freed up if required by applications

That's what I'd expect too, the problem is that it's not freed up. When I start transmission, it eats up all the cache, never frees it up, and I run out of ram. See the above quoted free output.
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Re: [cubox-i] transmission memory leak?

Postby pippo87 » Fri Jun 19, 2015 3:16 pm

Guys, thanks for all the comments!
Finally I switched back to deluged, which worked previously perfectly however now I have the same symptoms.
The only component that changed since the last time I sued deluge is connected storage. Maybe it is responsible for the problem.
Though I don't understand yet why can it happen. It's a USB storage but I run out of free memory regardless of how low download rate do I set. I cannot imagine that arch could not write out the data from the buffer to the disk with 1 MB/s rate.
Now I have swap, and sometimes it is used for a while till getting frozen, sometimes not.

Do you have any idea of what could be the problem?

Thanks!
Viktor
pippo87
 
Posts: 9
Joined: Sat Jun 06, 2015 4:46 pm

Next

Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 12 guests