qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.62k stars 4.01k forks source link

All DHT/torrents stall. Only relauching the app fixes. [Linux] #18292

Open pixelnull opened 1 year ago

pixelnull commented 1 year ago

qBittorrent & operating system versions

qBittorrent: 4.5.0 x64 Operating system: Manjaro 5.15.84-1-MANJARO KDE/Plasma (all packages have been updated) Qt: qt5-base 5.15.7+kde+r177-1 & qt6-base 6.4.1-1 libtorrent-rasterbar: libtorrent-rasterbar 1:2.0.8-2

What is the problem?

All DHT and Torrents connections stall after a few hours. This is regardless of VPN state and # of seeders in the torrent. I don't know exactly when it started, but QBT has started silently stalling on all running torrents after a certain amount of time. DHT nodes connected stat also drops to 0.

As it fails silently, I don't know about how long it takes to happen, too long to troubleshoot effectively though, 3-8 hours.

The only thing that seems to fix the issue with QBT is restarting the application.

Steps to reproduce

Start QBT, wait. Nothing else is needed. Once stalled, restarting QBT, and only QBT, fixes it temporarily but immediately. DHT nodes start to connect again within seconds, and pause/unpause of torrents will immediately start downloading again.

Additional context

It's a VM with KVM/QEMU. 4 vCores, 8Gb Ram, 10Tb of free space on a 20Tb array. It has it's own dedicated physical NIC.

Troubleshooting I've done so far:

I have not been able to figure this out for weeks. I'd use a different client but this box is supposed to be a set and forget for radarr and sonarr and QBT has worked well so far so I'd prefer to use it.

Log(s) & preferences file(s)

qBitorrent.conf

[AddNewTorrentDialog]
DialogSize=@Size(900 696)
DownloadPathHistory=
Enabled=true
RememberLastSavePath=false
SavePathHistory=/mnt/scratch
TopLevel=true

[Application]
FileLogger\Age=1
FileLogger\AgeType=1
FileLogger\Backup=true
FileLogger\DeleteOld=true
FileLogger\Enabled=true
FileLogger\MaxSizeBytes=66560
FileLogger\Path=/home/pixelnull/.local/share/qBittorrent/logs
GUI\Notifications\TorrentAdded=false
MemoryWorkingSetLimit=2048

[AutoRun]
OnTorrentAdded\Enabled=false
OnTorrentAdded\Program=
enabled=false
program=

[BitTorrent]
Session\BTProtocol=TCP
Session\DefaultSavePath=/mnt/scratch
Session\GlobalMaxRatio=1
Session\GlobalMaxSeedingMinutes=1440
Session\GlobalUPSpeedLimit=500
Session\IgnoreSlowTorrentsForQueueing=true
Session\MaxActiveDownloads=4
Session\MaxActiveTorrents=4
Session\MaxActiveUploads=0
Session\MaxConnections=200
Session\MaxConnectionsPerTorrent=50
Session\PerformanceWarning=true
Session\Port=10425
Session\QueueingSystemEnabled=true
Session\SlowTorrentsDownloadRate=50
Session\SlowTorrentsUploadRate=1000
Session\TempPath=/mnt/scratch

[Core]
AutoDeleteAddedTorrentFile=Never

[GUI]
DownloadTrackerFavicon=false
Log\Enabled=false
MainWindow\FiltersSidebarWidth=120
Notifications\Enabled=true
Notifications\Timeout=-1
Notifications\TorrentAdded=false
Qt6\AddNewTorrentDialog\SplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1]\0\0\x1\0\0\xff\xff\xff\xff\x1\0\0\0\x1\0)
Qt6\AddNewTorrentDialog\TreeHeaderState="@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x6\x34\0\0\0\x3\0\0\0\x4\0\0\0\x64\0\0\0\x5\0\0\0\x64\0\0\0\x2\0\0\0\x64\0\0\x1,\0\0\0\x6\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff\0\0\0\0)"
Qt6\MainWindow\VSplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0x\0\0\x2\x4\x1\xff\xff\x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0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64\0\0\0\0)

[LegalNotice]
Accepted=true

[MainWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x4\xff\0\0\x2\xf3\0\0\x1M\0\0\0^\0\0\x4\xa1\0\0\x2\x38\0\0\0\0\x2\0\0\0\x5\0\0\0\0\0\0\0\0\x1d\0\0\x4\xff\0\0\x2\xf3)

[Meta]
MigrationVersion=4

[Network]
PortForwardingEnabled=false
Proxy\OnlyForTorrents=false

[OptionsDialog]
HorizontalSplitterSizes=123, 630
LastViewedPage=2
Size=@Size(779 591)

[Preferences]
Advanced\DisableRecursiveDownload=false
Advanced\EnableIconsInMenus=true
Advanced\RecheckOnCompletion=false
Advanced\TrayIconStyle=Normal
Advanced\confirmRemoveAllTags=true
Advanced\confirmTorrentDeletion=true
Advanced\confirmTorrentRecheck=true
Advanced\trackerPort=9000
Advanced\trackerPortForwarding=false
Advanced\useSystemIconTheme=true
Connection\ResolvePeerCountries=true
Connection\ResolvePeerHostNames=false
Downloads\DblClOnTorDl=0
Downloads\DblClOnTorFn=1
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=DynDNS
DynDNS\Username=
General\AlternatingRowColors=true
General\CloseToTray=true
General\CloseToTrayNotified=true
General\CustomUIThemePath=
General\ExitConfirm=false
General\HideZeroComboValues=0
General\HideZeroValues=false
General\Locale=en
General\MinimizeToTray=false
General\NoSplashScreen=true
General\PreventFromSuspendWhenDownloading=false
General\PreventFromSuspendWhenSeeding=false
General\StartMinimized=false
General\SystrayEnabled=true
General\UseCustomUITheme=false
MailNotification\email=
MailNotification\enabled=false
MailNotification\password=
MailNotification\req_auth=true
MailNotification\req_ssl=false
MailNotification\sender=qBittorrent_notification@example.com
MailNotification\smtp_server=smtp.changeme.com
MailNotification\username=
Scheduler\days=EveryDay
Scheduler\end_time=@Variant(\0\0\0\xf\x4J\xa2\0)
Scheduler\start_time=@Variant(\0\0\0\xf\x1\xb7t\0)
WebUI\Address=*
WebUI\AlternativeUIEnabled=true
WebUI\AuthSubnetWhitelistEnabled=false
WebUI\BanDuration=3600
WebUI\CSRFProtection=true
WebUI\ClickjackingProtection=true
WebUI\CustomHTTPHeaders=
WebUI\CustomHTTPHeadersEnabled=false
WebUI\Enabled=true
WebUI\HTTPS\CertificatePath=
WebUI\HTTPS\Enabled=false
WebUI\HTTPS\KeyPath=
WebUI\HostHeaderValidation=true
WebUI\LocalHostAuth=true
WebUI\MaxAuthenticationFailCount=5
WebUI\Password_PBKDF2=[redacted]
WebUI\Port=9666
WebUI\ReverseProxySupportEnabled=false
WebUI\RootFolder=/mnt/Plex/Extra/qbt/vuetorrent
WebUI\SecureCookie=true
WebUI\ServerDomains=*
WebUI\SessionTimeout=3600
WebUI\TrustedReverseProxiesList=
WebUI\UseUPnP=false
WebUI\Username=admin

[RSS]
AutoDownloader\DownloadRepacks=true
AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})"

[ShutdownConfirmDlg]
DontConfirmAutoExit=false

[SpeedLimitDialog]
Size=@Size(481 272)

[SpeedWidget]
Enabled=true
graph_enable_0=true
graph_enable_1=true
graph_enable_2=false
graph_enable_3=false
graph_enable_4=false
graph_enable_5=false
graph_enable_6=false
graph_enable_7=false
graph_enable_8=false
graph_enable_9=false
period=1

[StatisticsDialog]
Size=@Size(286 432)

[TorrentOptionsDialog]
Size=@Size(450 626)

[TorrentProperties]
CurrentTab=1
SplitterSizes="211,162"
Visible=true

[TransferList]
SubSortColumn=0
SubSortOrder=0

[TransferListFilters]
selectedFilterIndex=3
statusFilterState=false

most recent qbittorrent.log

(N) 2022-12-25T13:37:07 - qBittorrent v4.5.0 started
(N) 2022-12-25T13:37:07 - Using config directory: /home/pixelnull/.config/qBittorrent
(N) 2022-12-25T13:37:07 - Trying to listen on the following list of IP addresses: "0.0.0.0:10425,[::]:10425"
(I) 2022-12-25T13:37:07 - Peer ID: "-qB4500-"
(I) 2022-12-25T13:37:07 - HTTP User-Agent: "qBittorrent/4.5.0"
(I) 2022-12-25T13:37:07 - Distributed Hash Table (DHT) support: ON
(I) 2022-12-25T13:37:07 - Local Peer Discovery support: ON
(I) 2022-12-25T13:37:07 - Peer Exchange (PeX) support: ON
(I) 2022-12-25T13:37:07 - Anonymous mode: OFF
(I) 2022-12-25T13:37:07 - Encryption support: ON
(N) 2022-12-25T13:37:07 - Restored torrent. Torrent: "[redacted]"
(N) 2022-12-25T13:37:07 - Restored torrent. Torrent: "[redacted]"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "127.0.0.1". Port: "TCP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "127.0.0.1". Port: "UTP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "10.10.10.3". Port: "TCP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "10.10.10.3". Port: "UTP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "[correct external IP redacted]". Port: "TCP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "[correct external IP redacted]". Port: "UTP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "::1". Port: "TCP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "::1". Port: "UTP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "fe80::e7ba:36cb:261:5f76%enp8s0". Port: "TCP/10425"
(I) 2022-12-25T13:37:07 - Successfully listening on IP. IP: "fe80::e7ba:36cb:261:5f76%enp8s0". Port: "UTP/10425"
(N) 2022-12-25T13:37:07 - Restored torrent. Torrent: "[redacted]"
(I) 2022-12-25T13:37:07 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Wed Nov 30 20:29:19 2022.
(N) 2022-12-25T13:37:07 - Using custom Web UI. Location: "/mnt/Plex/Extra/qbt/vuetorrent".
(W) 2022-12-25T13:37:07 - Couldn't load Web UI translation for selected locale (en).
(N) 2022-12-25T13:37:07 - Web UI: Now listening on IP: *, port: 9666
(I) 2022-12-25T13:37:08 - Detected external IP. IP: "[correct external IP redacted]"
(N) 2022-12-25T13:37:25 - Torrent paused. Torrent: "[redacted]"
(N) 2022-12-25T13:37:26 - Torrent resumed. Torrent: "[redacted]"
(N) 2022-12-25T13:37:53 - WebAPI login success. IP: ::ffff:127.0.0.1
(N) 2022-12-25T13:38:20 - WebAPI login success. IP: ::1
(N) 2022-12-25T16:03:15 - qBittorrent termination initiated
(I) 2022-12-25T16:03:15 - UPnP/NAT-PMP support: OFF
(N) 2022-12-25T16:03:16 - qBittorrent is now ready to exit

^^^ This log ends at me closing QBT in a stalled state, I did not remove any lines. Adding torrents, removing torrents, changing settings, etc all work. It's just stalled.

thalieht commented 1 year ago

Peer ID: "-qB5300-"

? Official is -qB4500- for this version.

pixelnull commented 1 year ago

Peer ID: "-qB5300-"

? Official is -qB4500- for this version.

Ah, it's a mispaste or a typo of some kind. It's -qB4500- in the logs.

rrrevin commented 1 year ago

Don't run it as a background daemon if you are. Run it in the foreground and see if there is an error displayed. Not all errors go to the log file. See here : https://github.com/qbittorrent/qBittorrent/issues/18182

pixelnull commented 1 year ago

Don't run it as a background daemon if you are. Run it in the foreground and see if there is an error displayed. Not all errors go to the log file. See here : #18182

Thanks for that, but it's not running as a daemon only. Additionally it's actually stalled with downloads saying "stalled" with no transfer speed. The issue that they have with the UI not updating doesn't seem to be happening with my issue. That bug also looks like it from an odd piece size on a single torrent. The stalling happens after a set amount of time regardless of what torrents it's got.

Also, a general addition for this is that I am now using cron to killall and then reopening QBT every 3 hours. So, if any logs/testing needs the stalled state, please let me know as I would need to stop the cronjob and allow it time to get to the state.

dronepwn commented 1 year ago

I am having the exact same issue. Loads of problems and having to manually restart, change ports, and do whatever it takes for the downloads to start.

pixelnull commented 1 year ago

Looking for any kind of update on this. This is still an issue.

josh-h commented 11 months ago

I see similar symptoms with the no-x version 4.6.2 running on Debian with a 6.1 kernel on ARM. While transfers are not entirely stalled, they move at tens of kb/s rather than my normal rates.

Inspecting virtual memory (using htop) or:

cat /proc/$qBittorrentPID/status | grep VmSize

I've observed that the problem manifests when qbittorrent-nox's virtual memory is around 450 GB on a machine with 4 GB RAM. Currently, virtual memory use is 250 GB, and speeds are fine. Every time I've had an issue, it's when virtual memory has been sitting much higher. I suspect qbittorrent is memory mapping all its torrents, and this exhausts the kernel's memory which impacts download/upload throughput. qBittorrent itself, through all of this, is only using about 10% of available RAM.

I've tried to drop caches, following instructions from https://linuxconfig.org/clear-cache-on-linux. That frees some kernel memory but does not help with slow transfers.

LIMUNADE commented 11 months ago

For me it's just showing that dht nodes are 0 and downloading doesn't start. The issue is only for qbittorrent v4.6.2 because I tested another app and it's downloaded files just fine.

josh-h commented 11 months ago

I did more digging, and what I reported is the same as #19914.