Bug 396142 - crash after vm.max_map_count limit reached on gigabit connection
Summary: crash after vm.max_map_count limit reached on gigabit connection
Status: REPORTED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 22.08.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-03 21:45 UTC by avi9526
Modified: 2022-11-03 02:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description avi9526 2018-07-03 21:45:14 UTC
When downloading torrent on gigabit connection, speed reach 100MiB/s and number of peers goes > 100 ktorrent interface lags (like 12309) and ktorrent often crashes. Seems that it is related to reaching limit vm.max_map_count, which is by default ~65e3. Console output contain "mmap failed : Cannot allocate memory". Crashes seem to stop after setting "vm.max_map_count = 200000". See links with graphed output of "cat /proc/$(pidof ktorrent)/maps | wc -l" before setting vm.max_map_count to 200e3 and after.
1) default vm.max_map_count, crash in the end: https://0x0.st/spEO.png
2) vm.max_map_count is set 200000, no crash: https://0x0.st/spEg.png
Comment 1 avi9526 2018-07-04 08:29:23 UTC
Link to Arch forum topic
https://bbs.archlinux.org/viewtopic.php?id=238475
Comment 2 Justin Zobel 2020-12-02 05:28:51 UTC
So it seems this was related to virtual memory? 

Can this now be closed?
Comment 3 avi9526 2020-12-02 05:33:24 UTC
KTorrent carshes with default vm.max_map_count
this is not ok
When vm.max_map_count increased KTorrent not crashing, but it has random freezes - speed goes up to 100MB/s, then freeze for few seconds, then unfreeze and speeds drop, repeat. Also this freeze cause system to lag - video player lag on HD videos
Comment 4 Justin Zobel 2020-12-02 05:34:43 UTC
Forgive me if I'm wrong but the OS sets this value right?
Comment 5 avi9526 2020-12-02 05:38:36 UTC
(In reply to Justin Zobel from comment #4)
> Forgive me if I'm wrong but the OS sets this value right?

https://www.kernel.org/doc/Documentation/sysctl/vm.txt
The default value is 65536.
Comment 6 Justin Zobel 2020-12-02 05:40:36 UTC
Thanks for the information, setting back to reported for investigation.
Comment 7 Justin Zobel 2022-11-03 01:39:14 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 8 avi9526 2022-11-03 02:05:03 UTC
ktorrent 22.08.2
still crashing when vm.max_map_count limit reached