qbittorrent / qBittorrent

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

qBittorrent stuck on exit #19666

Open Hikari-no-Tenshi opened 11 months ago

Hikari-no-Tenshi commented 11 months ago

qBittorrent & operating system versions

qBittorrent: 4.6.0 x64 Operating system: Windows 11 22H2 (10.0.22621) x64 Qt: 6.4.3 libtorrent-rasterbar: 2.0.9.0

What is the problem?

I have 600+ torrents. All torrents are on internal HDDs. Currently using 4.6.0 x64, but same issue had on 4.5.5 x64.

When closing qBittorrent it will stuck on exit forever (waited for it to exit for more than 10 hours). Need to restart PC to be able to use qBittorrent again.

Tried to switch from fastresume to SQLite database - same issue. Tried to switch stop_tracker_timeout to 0 - same issue.

Never had such issue on µTorrent.

Steps to reproduce

  1. Start qBittorrent
  2. Exit qBittorrent
  3. See it stuck on exit (icon in tray and process in manager)

Additional context

No response

Log(s) & preferences file(s)

No response

glassez commented 11 months ago

Log(s) & preferences file(s)

No response

👎

Hikari-no-Tenshi commented 11 months ago

qBittorrent settings file qBittorrent.zip

Hikari-no-Tenshi commented 11 months ago

Same issue on: qBittorrent: 4.6.0RC2 x64 Qt: 6.4.3 libtorrent-rasterbar: 2.0.9.0

qBittorrent holds on exit and can't be used until system reboot.

glassez commented 11 months ago

I have 600+ torrents.

Could you provide more details? How much of the torrent are really running (i.e. not stopped/paused)? How much of the tracker entries do you have in total? How many of them are working/errored etc.? You could just provide a couple of screenshots of the main window, which would display statistical data (I mean the left panel with Status, Trackers).

Hikari-no-Tenshi commented 11 months ago

status trackers

bandit8623 commented 11 months ago

have you played with advanced settings? image

file_pool_size is one to keep an eye on

Hikari-no-Tenshi commented 11 months ago

Never touched file_pool_size. Only tried to change stop_tracker_timeout from 2 to 0 (then changed back to 2). Changed fastresume to SQLite database (currently still using SQLite database). Changed save_resume_data_interval from 60 to 30. All that was done in hope to fix my issue.

bandit8623 commented 11 months ago

@bandit8623

You're not using v4.6.0RC2 default settings and your options interface looks different than what Windows desktop client has. Preferences file was also provided in #19666 (comment), so you can look at that and compare with yours instead of guessing and to try using same settings to see if you can reproduce this issue.

Yes I know. Just trying to help as these settings have fixed issues I had in the past that sound the same as the op.

DarkVoyage commented 11 months ago

Changed save_resume_data_interval from 60 to 30.

Set to "0" and try to exit again after long work.

Hikari-no-Tenshi commented 10 months ago

Changed save_resume_data_interval from 60 to 30.

Set to "0" and try to exit again after long work.

Loks like setting "save_resume_data_interval" to "0" helped. Will test for more time, but currently it working.

Hikari-no-Tenshi commented 10 months ago

Well, i was happy too early. Few times app exited normally, but then again stuck.

Drybonz commented 10 months ago

Same problem here... has been going on for quite some time. I have tried to replicate various advanced settings people have suggested with no success.

Hikari-no-Tenshi commented 10 months ago

Updated to latest 4.6.0 version. Removed all files from C:\Users\\AppData\Roaming\qBittorrent to reset settings. Issue is still there.

Is there a way to enable more debugging in logs? In default log file there is almost nothing that can give a clue.

The5kull commented 10 months ago

I have 600+ torrents. All torrents are on internal HDDs

The HDDs cant't keep up thus closing qB takes a litte longer. This seems like qB is stuck but thats not the case, qB is doing a final torrent check, especially when qB was downloading. When closed premature through the task manager will result in rechecking of the torrents the next time qB is opened.

The solution is to invest in SSD's or wait for qB to close.

bandit8623 commented 10 months ago

If it doesn't do it on older versions your answer is not a good one.

On Wed, Oct 25, 2023, 8:33 AM The5kull @.***> wrote:

I have 600+ torrents. All torrents are on internal HDDs The HDDs cant't keep up thus closing qB takes a litte longer. This seems like qB is stuck but thats not the case, qB is doing a final torrent check, especially when qB was downloading. When closed premature through the task manager will result in rechecking of the torrents the next time qB is opened.

The solution is to invest in SSD's or wait for qB to close.

— Reply to this email directly, view it on GitHub https://github.com/qbittorrent/qBittorrent/issues/19666#issuecomment-1779287502, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG7APUUWUGFE4WM5YYKNR3YBEIJDAVCNFSM6AAAAAA5MZHSM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGI4DONJQGI . You are receiving this because you were mentioned.Message ID: @.***>

Hikari-no-Tenshi commented 10 months ago

The HDDs cant't keep up thus closing qB takes a litte longer. This seems like qB is stuck but thats not the case, qB is doing a final torrent check, especially when qB was downloading. When closed premature through the task manager will result in rechecking of the torrents the next time qB is opened.

The solution is to invest in SSD's or wait for qB to close.

Issue can't be in HDD because i never had such problem with µTorrent or BitTorrent. Also tried to wait for a very long time (more than 10 hours), but no luck.

Drybonz commented 10 months ago

Issue also does not happen with Tixati as well using the same exact HDD as with qBittorent, where this has been a long term issue. HDD is not the cause.

xavier2k6 commented 10 months ago

Are torrents still active when exiting?

Hikari-no-Tenshi commented 10 months ago

Torrents not paused, but active (seeding) only around 10 of them.

xavier2k6 commented 10 months ago

Torrents not paused, but active (seeding) only around 10 of them.

If you pause all activity before exiting it should close quicker.

Hikari-no-Tenshi commented 10 months ago

If you pause all activity before exiting it should close quicker.

Not helping. Paused all torrents, waited some time before exit - still stuck on exit.

Drybonz commented 10 months ago

Pausing does not help. At the point when qBit is going to get "stuck", pausing will not help at all.

Fixer-007 commented 8 months ago

I have the same problem on 4.6.2, windows 10. Downgrading back to 4.4.4

flyingfeather99 commented 8 months ago

same problem

101Dude commented 7 months ago

@glassez

Was seeing this on: macOS: 14.3 qBt: 4.6.2 Qt: 6.4.3 Libtorrent: 1.2.19.0 Boost: 1.83.0 OpenSSL: 1.1.1w zlib: 1.2.12

I occasionally have an exit issue as well. It appears related to saving files to /incomplete in that whenever qBittorrent is stuck it's still reading/writing to that directory only, and won't release the HDD. Sometimes for an extended period like 30 minutes or more. Most of the time when exiting I "Pause All" to disconnect all users first then I quit - that has usually provided me with a cleaner exit but not in these cases.

When this "slow exit" occurs I will run lsof +D /Volumes/SeedDrive and see every active file that is holding up qBt shut down. It's always qBittorrent accessing files inside the /incomplete directory on disk (except for the log file which is elsewhere). When this has happened recently it's been torrent directories filled with many .rar parts.

I used guesswork on the settings... so if there are adjustments needed I'd be happy to know. I just updated today to v4.6.3 before posting this, so the screenshot is for that version not 4.6.2

Screenshot 2024-01-17 at 1 55 33 PM

glassez commented 7 months ago

I still believe the problem is due to performing "graceful" trackers disconnect. Perhaps you have too many tracker announces, so it takes a long time for qBittorrent to close them all, especially if some trackers have a long delay.

101Dude commented 7 months ago

I still believe the problem is due to performing "graceful" trackers disconnect. Perhaps you have too many tracker announces, so it takes a long time for qBittorrent to close them all, especially if some trackers have a long delay.

In my case what's preventing qBt shutting down is clearly reads and writes to my HDD. I can see that as soon as the qBt process is done reading and writing to the HDD, it quits. I follow this running lsof +D in a loop. When no more files in /incomplete are being accessed it quits.

In the above situation I only had two trackers for about 130 torrents. Private trackers.

There is nothing Critical in the log files. I did find one recent exit attempt that took 48 minutes:

(N) 2024-01-14T14:50:41 - qBittorrent termination initiated
(N) 2024-01-14T15:38:21 - qBittorrent is now ready to exit

Is there another log level I can use to track what's happening better on exit?

Hikari-no-Tenshi commented 7 months ago

Made little changes in settings. Changed "Network interface" from "Any interface" to one that actually used for internet connection. Changed "Optional IP address to bind to" from "All addresses" to actual IP address of ethernet adapter. Before this changes, qBittorrent could get stuck with chance of 99,99%. Now it has little more chances for clean exit, but still may stuck any time.

smgsmagus commented 5 months ago

Made little changes in settings. Changed "Network interface" from "Any interface" to one that actually used for internet connection. Changed "Optional IP address to bind to" from "All addresses" to actual IP address of ethernet adapter. Before this changes, qBittorrent could get stuck with chance of 99,99%. Now it has little more chances for clean exit, but still may stuck any time.

I'm on 4.6.3 and this issue is from 4.3.9 or maybe even earlier. In 4.6.3 it was even worse, but I tried above and it works! I no longer need to reboot when I need to relaunch. Many thanks!

edit: well, issue still happens, but not so often - I was too quick. You can close the icon in tray, but background process stays which cannot be killed in any way and only wat to fix it is to reboot the system....

edit2: not able to reproduce with version 4.3.3