Bug 415246 - ktorrent stalls after time until reboot
Summary: ktorrent stalls after time until reboot
Status: REPORTED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 5.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-16 14:51 UTC by Tom B
Modified: 2019-12-16 14:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom B 2019-12-16 14:51:17 UTC
SUMMARY

When using ktorrent, after some time (days) connection speeds drop and it seems unable to connect to peers/seeds. Rebooting the PC fixes it. 

I just had one torrent that had been stalled for 12 hours though it was showing several seeders. Occasionally I'd get 20kbps for a short period (30 seconds or so) I rebooted and immediately saw 1.8mb/s downloads 

This seems to be a fairly common issue: 

https://forums.linuxmint.com/viewtopic.php?t=29631

The author there says: 

"I also have to restart it every other day, it seems to 'clog' up (don't know how to explain it) and a lot of the torrents start 'stalling' - a restart fixes it"

Here's another mention of it: https://forum.kde.org/viewtopic.php?t=105632

and a similar bug: https://bugs.kde.org/show_bug.cgi?id=275889


Which is also exactly what I'm seeing 10 years later. 

Restarting ktorrent doesn't help, only a reboot.

STEPS TO REPRODUCE
1. Start a torrent
2. Leave it going for several days

OBSERVED RESULT

The torrent stops downloading until reboot. 

EXPECTED RESULT

The torrent should maintain speed/connections regardless of how many hours it has been running.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Linux 5.4.3, ktorrent 5.1, plasma 5.17


ADDITIONAL INFORMATION

It's as if there is some kind of system limit being hit which prevents ktorrent creating any more connections. I've tried increasing the connection limit in ktorrent and it doesn't seem to help. 

Whatever it's doing behind the scenes, it doesn't seem to free the resources when closed, only when rebooted. Whether it's ports, mutexes, semaphore message queue limits,  or some other system wide restriction, whatever it is, it uses it up and doesn't ever free the resources until the system is rebooted.