qbittorrent / qBittorrent

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

nfs stack trace causes qbittorrent to lockup #21783

Closed paulo-erichsen closed 1 week ago

paulo-erichsen commented 2 weeks ago

qBittorrent & operating system versions

Host PC OS: Arch Linux - Linux 6.11.6-arch1-1 qbittorrent: linuxserver/qbittorrent:4.6.7 (docker)

NAS Server OS: TrueNAS-13.0-U5.3 (Core) has NFS shares for downloads and media

What is the problem?

I'm running into some issues with qbittorrent lately. qbittorrent runs on docker, but the SavePath and TempPath are located in an NFS mount point. After so many hours downloading lots of data, the kernel starts throwing exceptions / stack traces and qbit stops responding. Running docker stop qbittorrent won't work because it fails to stop the container. The only way to get it going again is to do a full reboot of the PC running qbittorrent.

Steps to reproduce

No response

Additional context

No response

Log(s) & preferences file(s)

qBittorrent.conf

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

[BitTorrent]
Session\AddTorrentStopped=false
Session\DefaultSavePath=/download/complete/
Session\Encryption=0
Session\ExcludedFileNames=
Session\GlobalMaxRatio=0
Session\GlobalUPSpeedLimit=512
Session\Interface=wg0
Session\InterfaceName=wg0
Session\MaxActiveDownloads=6
Session\MaxActiveTorrents=10
Session\MaxActiveUploads=4
Session\Port=54998
Session\Preallocation=false
Session\QueueingSystemEnabled=true
Session\SSL\Port=24201
Session\ShareLimitAction=Stop
Session\TempPath=/download/incomplete/
Session\TempPathEnabled=true
Session\UseAlternativeGlobalSpeedLimit=false

[Core]
AutoDeleteAddedTorrentFile=Never

[LegalNotice]
Accepted=true

[Meta]
MigrationVersion=6

[Network]
Cookies=@Invalid()
PortForwardingEnabled=false
Proxy\HostnameLookupEnabled=false
Proxy\Profiles\BitTorrent=true
Proxy\Profiles\Misc=true
Proxy\Profiles\RSS=true

[Preferences]
Advanced\RecheckOnCompletion=false
Advanced\trackerPort=9000
Advanced\trackerPortForwarding=false
Connection\ResolvePeerCountries=true
Connection\UPnP=false
Downloads\SavePath=/download/complete/
Downloads\TempPath=/download/incomplete/
Downloads\TempPathEnabled=true
DynDNS\DomainName=changeme.dyndns.org
DynDNS\Enabled=false
DynDNS\Password=
DynDNS\Service=DynDNS
DynDNS\Username=
General\Locale=en
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=
WebUI\Address=*
WebUI\AlternativeUIEnabled=false
WebUI\AuthSubnetWhitelist=10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
WebUI\AuthSubnetWhitelistEnabled=true
WebUI\BanDuration=3600
WebUI\CSRFProtection=false
WebUI\ClickjackingProtection=true
WebUI\CustomHTTPHeaders=
WebUI\CustomHTTPHeadersEnabled=false
WebUI\HTTPS\CertificatePath=
WebUI\HTTPS\Enabled=false
WebUI\HTTPS\KeyPath=
WebUI\HostHeaderValidation=true
WebUI\LocalHostAuth=true
WebUI\MaxAuthenticationFailCount=5
WebUI\Port=8112
WebUI\ReverseProxySupportEnabled=false
WebUI\RootFolder=
WebUI\SecureCookie=true
WebUI\ServerDomains=*
WebUI\SessionTimeout=3600
WebUI\TrustedReverseProxiesList=
WebUI\UseUPnP=true
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})"

journal logs

Nov 05 14:50:14 optiplex kernel: INFO: task qbittorrent-nox:34605 blocked for more than 122 seconds.
Nov 05 14:50:14 optiplex kernel:       Not tainted 6.11.6-arch1-1 #1
Nov 05 14:50:14 optiplex kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Nov 05 14:50:14 optiplex kernel: task:qbittorrent-nox state:D stack:0     pid:34605 tgid:34585 ppid:34484  flags:0x00004000
Nov 05 14:50:14 optiplex kernel: Call Trace:
Nov 05 14:50:14 optiplex kernel:  <TASK>
Nov 05 14:50:14 optiplex kernel:  __schedule+0x402/0x1440
Nov 05 14:50:14 optiplex kernel:  ? __schedule+0x40a/0x1440
Nov 05 14:50:14 optiplex kernel:  schedule+0x27/0xf0
Nov 05 14:50:14 optiplex kernel:  io_schedule+0x46/0x70
Nov 05 14:50:14 optiplex kernel:  folio_wait_bit_common+0x132/0x310
Nov 05 14:50:14 optiplex kernel:  ? __pfx_wake_page_function+0x10/0x10
Nov 05 14:50:14 optiplex kernel:  ? __pfx_nfs_writepages_callback+0x10/0x10 [nfs 1400000003000000474e55005b310652fd084401]
Nov 05 14:50:14 optiplex kernel:  writeback_iter+0x1e9/0x2d0
Nov 05 14:50:14 optiplex kernel:  write_cache_pages+0x51/0xc0
Nov 05 14:50:14 optiplex kernel:  nfs_writepages+0x12f/0x2b0 [nfs 1400000003000000474e55005b310652fd084401]
Nov 05 14:50:14 optiplex kernel:  ? folios_put_refs+0x12d/0x1f0
Nov 05 14:50:14 optiplex kernel:  do_writepages+0x7e/0x270
Nov 05 14:50:14 optiplex kernel:  filemap_fdatawrite_wbc+0x63/0x90
Nov 05 14:50:14 optiplex kernel:  __filemap_fdatawrite_range+0x60/0x90
Nov 05 14:50:14 optiplex kernel:  filemap_write_and_wait_range+0x40/0xb0
Nov 05 14:50:14 optiplex kernel:  nfs_wb_all+0x25/0x120 [nfs 1400000003000000474e55005b310652fd084401]
Nov 05 14:50:14 optiplex kernel:  nfs4_file_flush+0x73/0xa0 [nfsv4 1400000003000000474e5500cc71dbda7a6d491a]
Nov 05 14:50:14 optiplex kernel:  filp_flush+0x30/0x80
Nov 05 14:50:14 optiplex kernel:  __x64_sys_close+0x32/0x80
Nov 05 14:50:14 optiplex kernel:  do_syscall_64+0x82/0x190
Nov 05 14:50:14 optiplex kernel:  ? __vm_munmap+0xb9/0x170
Nov 05 14:50:14 optiplex kernel:  ? switch_fpu_return+0x4e/0xd0
Nov 05 14:50:14 optiplex kernel:  ? syscall_exit_to_user_mode+0x14d/0x200
Nov 05 14:50:14 optiplex kernel:  ? do_syscall_64+0x8e/0x190
Nov 05 14:50:14 optiplex kernel:  ? syscall_exit_to_user_mode+0x10/0x200
Nov 05 14:50:14 optiplex kernel:  ? do_syscall_64+0x8e/0x190
Nov 05 14:50:14 optiplex kernel:  ? do_futex+0x125/0x190
Nov 05 14:50:14 optiplex kernel:  ? __x64_sys_futex+0x127/0x1e0
Nov 05 14:50:14 optiplex kernel:  ? sched_clock+0x10/0x30
Nov 05 14:50:14 optiplex kernel:  ? sched_clock_cpu+0xf/0x1d0
Nov 05 14:50:14 optiplex kernel:  ? psi_group_change+0x13b/0x310
Nov 05 14:50:14 optiplex kernel:  ? psi_task_switch+0xb7/0x200
Nov 05 14:50:14 optiplex kernel:  ? finish_task_switch.isra.0+0x99/0x2e0
Nov 05 14:50:14 optiplex kernel:  ? __schedule+0x40a/0x1440
Nov 05 14:50:14 optiplex kernel:  ? syscall_exit_to_user_mode+0x10/0x200
Nov 05 14:50:14 optiplex kernel:  ? do_syscall_64+0x8e/0x190
Nov 05 14:50:14 optiplex kernel:  ? switch_fpu_return+0x4e/0xd0
Nov 05 14:50:14 optiplex kernel:  entry_SYSCALL_64_after_hwframe+0x76/0x7e
Nov 05 14:50:14 optiplex kernel: RIP: 0033:0x76acd9769347
Nov 05 14:50:14 optiplex kernel: RSP: 002b:000076acd708f6f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
Nov 05 14:50:14 optiplex kernel: RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000076acd9769347
Nov 05 14:50:14 optiplex kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000057
Nov 05 14:50:14 optiplex kernel: RBP: 000076acd7090b30 R08: 0000000000000000 R09: 0000000000000000
Nov 05 14:50:14 optiplex kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 000076acd708f868
Nov 05 14:50:14 optiplex kernel: R13: 000076aad47a28a0 R14: 0000000000000093 R15: 000076acd708fa20
Nov 05 14:50:14 optiplex kernel:  </TASK>

$ mount | grep download

systemd-1 on /mnt/download type autofs (rw,relatime,fd=44,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=26643)
10.10.40.3:/mnt/scratch/download on /mnt/download type nfs4 (rw,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.10.40.10,local_lock=none,addr=10.10.40.3,_netdev,x-systemd.automount)
paulo-erichsen commented 2 weeks ago

maybe related to

HanabishiRecca commented 2 weeks ago

qbittorrent:4.6.7

Outdated and not supported. Update to the latest version and try to reproduce it again.

Also better use the official docker image to be sure that no 3rd party modifications interfere.

paulo-erichsen commented 2 weeks ago

qbittorrent:4.6.7

Outdated and not supported. Update to the latest version and try to reproduce it again.

Also better use the official docker image to be sure that no 3rd party modifications interfere.

I'll upgrade to 5.x once these issues are resolved

paulo-erichsen commented 1 week ago

after reading the comments from #16080 I found out that using libtorrentv1 is a workaround. I've been using linuxserver/qbittorrent:4.6.7-libtorrentv1 for a few days now and haven't had another issue with qbittorrent downloading directly to an NFS share.

Closing this issue as it's a duplicate of #16080 and the workaround has been working