transmission-daemon high RAM usage

Bug #1973084 reported by aramaicus
72
This bug affects 13 people
Affects Status Importance Assigned to Milestone
transmission (Debian)
New
Unknown
transmission (Ubuntu)
Confirmed
Undecided
Unassigned
Jammy
New
Undecided
Unassigned
Lunar
New
Undecided
Unassigned

Bug Description

Transmission uses a lot of RAM in ubuntu 22.04 server (arm64) runnign on a Raspberry Pi 4.

It "eats" RAM and the RAM usage grows each hour until it crashes the system.

I sideloaded transmission-daemon and its dependancies from debian 11 (arm64) locked the packages so apt won't update them and, ever since, this issue hasn't happened.

Description: Ubuntu 22.04 LTS
Release: 22.04

Tags: patch
Revision history for this message
aramaicus (aramaicus) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Could you re-install the Ubuntu version, trigger the issue and then attach the 'journalctl -b 0' log from the session to the report? Is it triggering on a specific torrent?

Changed in transmission (Ubuntu):
status: New → Incomplete
Revision history for this message
aramaicus (aramaicus) wrote :

It's not triggered by any special torrent file. Right now I am seeding Ubuntu 22.04's files.

Here is the log you asked me.

Right now the whole system is using almost 1GB of RAM (normally it uses 200MB~300MB).

Its uptime is about 18 hours.

Changed in transmission (Ubuntu):
status: Incomplete → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in transmission (Ubuntu):
status: New → Confirmed
Revision history for this message
Sandor Fodor (alexander.curl) wrote :

This issue is still available in x86_64 build also.
Fixed in upstream, but consume more CPU now than it should.

https://github.com/transmission/transmission/issues/3536

https://github.com/transmission/transmission/issues/3494

Revision history for this message
Andrew (caeci11iusad1) wrote :

Confirmed happening in x86_64 build (and has been for at least six months, under both 22.04 and 22.10...though it was fine at some point in the past as I used it successfully for many years with no issue. Please, please, please fix (even if the solution is giving us some mechanism to upgrade to the 4.0 beta via PPA or something (as the commits mention several fixes to memory leaks)...this has been driving me nuts!

No specific torrent, reboot or restart fixes issue (temporarily).

Transmission 3.00 (bb6b5a062e).
51 files seeding (currently), though it doesn't seem sensitive to the number.
16MB disk cache. Max 240 peers.
Tried disabling PEX, DHT and LPD to see if that would help as I don't particularly need them anyway (but it doesn't help).

Revision history for this message
micsu (micsu-z) wrote :

There are many tickets about this memory leak:
https://github.com/transmission/transmission/issues/3055
https://github.com/transmission/transmission/issues/3494
https://github.com/transmission/transmission/issues/3536

The issue has been already fixed, but we have to wait for the next release,
or we can install the nightly builds as recommended by ckerr.
1) install prerequirements:
sudo apt-get update
sudo apt install build-essential cmake libcurl4-openssl-dev libssl-dev curl
2) download latest tarball from https://build.transmissionbt.com/job/trunk-linux/
3) build
tar xf transmission-4.0.0-beta.1.dev+rd381939267.tar.xz
cd transmission-4.0.0-beta.1.dev+rd381939267
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make
sudo make install

The "make" step took an hour on my ten yrs old laptop.
Official description at
https://github.com/transmission/transmission/blob/main/docs/Building-Transmission.md

Revision history for this message
Andrey Kudinov (elhana) wrote (last edit ):

I'm not comfortable with make install.

It seems to be caused by openssl3 patch. I reverted it and used gentoo openssl3 patch, transmission is under 122Mb now instead of 10s of gigabytes.

https://gitweb.gentoo.org/repo/gentoo.git/tree/net-p2p/transmission/files/transmission-3.00-openssl-3.patch

You can try this ppa: https://launchpad.net/~elhana/+archive/ubuntu/ppa-elhana
I've just enabled arm64 build on ppa (apparently you can now).

Revision history for this message
Andrew (caeci11iusad1) wrote :

Noting 4.0.1 stable has now been released, perhaps we could have an update to fix this issue now (if not in 22.10, perhaps in 23.04?).

Revision history for this message
lan (lan-libero) wrote :

Same problem, is possible to have an update to fix this problem?
Thx

Revision history for this message
aramaicus (aramaicus) wrote : Re: [Bug 1973084] Re: transmission-daemon high RAM usage

It's possible to sideload the debian package and its dependencies.

I did it before reporting this bug and it has been working flawlessly.

Not the perfect solution but the solution that is avaliable.

Don't forget to lock the package and dependencies using apt-mark,
otherwise, it will get upgraded and the bug will return.

On Sun, Mar 12, 2023, 15:15 lan <email address hidden> wrote:

> Same problem, is possible to have an update to fix this problem?
> Thx
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1973084
>
> Title:
> transmission-daemon high RAM usage
>
> Status in transmission package in Ubuntu:
> Confirmed
>
> Bug description:
> Transmission uses a lot of RAM in ubuntu 22.04 server (arm64) runnign
> on a Raspberry Pi 4.
>
> It "eats" RAM and the RAM usage grows each hour until it crashes the
> system.
>
> I sideloaded transmission-daemon and its dependancies from debian 11
> (arm64) locked the packages so apt won't update them and, ever since,
> this issue hasn't happened.
>
>
> Description: Ubuntu 22.04 LTS
> Release: 22.04
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/1973084/+subscriptions
>
>

Revision history for this message
Lem (lem-jjr) wrote :

I caught transmission-daemon using 12Gb (!) of RAM on my AMD64 system recently, and for what it's worth, the Transmission 4.0.2 packages from UbuntuHandbook PPA fix this issue. I'd noticed 3.0.0 using insane amounts of RAM many times before (workaround was to restart the daemon), but seeing it use 12Gb really made me look for a newer version. Version 4.0.2 uses <200mb with the same torrents.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

The memory leak makes transmission unusable, so this bug should qualify for a SRU. All we need is for someone to prepare a debdiff and request sponsorship for the upload, as described in https://wiki.ubuntu.com/StableReleaseUpdates

Revision history for this message
Marius Gedminas (mgedmin) wrote :

I backported Andrey Kudinov's suggested change (replacing Ubuntu's openssl3-compat.patch with gentoo's version) and built a transmission package in a PPA for jammy (Andrey's PPA only has packages for kinetic and lunar).

I've been testing the patched transmission-gtk for the last 24 hours and the memory leak is gone.

I'm attaching a debdiff.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff that replaces mem-leaky ubuntu openssl3 patch with the gentoo openssl3 patch" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in transmission (Debian):
status: Unknown → New
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Marius, Andrey

thanks for your contribution!

I uploaded jammy and lunar packages to this ppa[1], with amd64 and arm64 builds, with the gentoo patch replacing the one we had in the package.

Marius, I changed the d/changelog text a bit, I hope you don't mind, but please let me know if you have concerns. I want to make sure to give credit to everybody involved, and keep your name in the changelog entry so this upload goes to you when it's sponsored.

The PPAs are a bit slow, since we just opened the next ubuntu release (noble) for development, so give them some time.

Here are the branches from which I built these packages:

- jammy: https://code.launchpad.net/~ahasenack/ubuntu/+source/transmission/+git/transmission/+ref/jammy-transmission-memleak-1973084
- lunar: https://code.launchpad.net/~ahasenack/ubuntu/+source/transmission/+git/transmission/+ref/lunar-transmission-memleak-1973084

Mantic and later are at version 4.0.2, and focal and earlier are at 2.94, so I believe they are not affected. The problematic openssl3 patch is in neither.

If these work for you guys, then we can start preparing for an SRU, which would definitely be worth it.

1. https://launchpad.net/~ahasenack/+archive/ubuntu/transmission-memleak-1973084/

Revision history for this message
Paride Legovini (paride) wrote :

Hi Marius, Andrey, Lem and other affected users. Please consider testing the package from the PPA that Andreas prepared. This definitely looks like SRU material, but we need some kind of verification before proceeding. Thanks!

Revision history for this message
Lem (lem-jjr) wrote :

Hi Paride, after more than 24 hours running transmission-daemon from Andreas' PPA linked in #18, memory usage is only 300mb. More torrents than when my initial comment (#14) was posted, so I'd say it's fixed.
Thanks to everyone who put the effort in to sort this out.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers