qbittorrent / qBittorrent

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

Stuck / Stalled at 0%. Tracker: Updating #14453

Open reyaz006 opened 3 years ago

reyaz006 commented 3 years ago

qBittorrent version and Operating System

4.3.3 / Windows 8.1 6.3.9600 x64

What is the problem

Right after adding most of (actually, I think all of them) torrents from private trackers, they are stuck at 0% for several hours. Status: Stalled Tracker status: Updating... I can input the tracker URL in browser and get the "Tracker is running" text. Sometimes it solves by itself without my input, but it still takes at least 1-2 hours. Sometimes pausing/resuming it solves the problem.

What is the expected behavior

Tracker should be contacted properly as soon as the torrent is added and started.

Steps to reproduce

Add a new torrent from a private tracker and wait.

Extra info(if any)

I'm that guy with >40k torrents total on list.

sakkamade commented 3 years ago

You may attempt to turn on the Always announce to all trackers in Advanced options. However, if I were to have so much a torrents in list, I would have think twice before doing it.

So, the quick question, does each of these private torrents having more than one tracker?

reyaz006 commented 3 years ago

That was already enabled.

image

sakkamade commented 3 years ago

Sometimes it solves by itself without my input, but it still takes at least 1-2 hours. Sometimes pausing/resuming it solves the problem.

May be related https://github.com/qbittorrent/qBittorrent/issues/14306

reyaz006 commented 3 years ago

4.3.4.1 and this still happens. I noticed with several torrents from another tracker now:

This means the tracker might have never been contacted at all. I can't understand why. It responds fine in browser ("No info hash provided"), and there are no lines in Execution Log regarding this tracker.

reyaz006 commented 3 years ago

Eventually, after a few hours, these torrents were downloaded, and I can see positive numbers in Peers column. But tracker status is still "Updating" for some reason.

sakkamade commented 3 years ago

Try to test affected torrents with default settings (How to use portable mode)

reyaz006 commented 3 years ago

Tried portable mode and fiddled around with it. Here are the results:

ArcticGems commented 3 years ago

Tried portable mode and fiddled around with it. Here are the results:

  • The problem seems to be the port for incoming connections. Changing it solves the problem. But I changed it several times before seeing an effect.

Are you using tracker-only proxy? This is from libtorrent 1.2.13 changelog that the new qBittorrent v4.3.5 uses:

fix incoming TCP connections when using tracker-only proxy

Full libtorrent 1.2.13 changelog:

Use /etc/ssl/cert.pem to validate HTTPS connections on MacOS
allow no-interest timeouts of peer connections before all connections slots are full
fix issue where a DHT message would count as an incoming connection
fix issue when failing to parse outgoing_interfaces setting
fix super-seeding issue that could cause a segfault
fix data race in python binding of session::get_torrent_status()
fix need_save_resume_data() for renaming files, share-mode, upload-mode,
disable- pex, lsd, and dht.
fix incoming TCP connections when using tracker-only proxy
fix issue with paths starting with ./
fix integer overflow when setting a high DHT upload rate limit
improve Path MTU discovery logic in uTP
fix overflow issue when rlimit_nofile is set to infinity
fix issue in python binding interpreting int settings > INT_MAX
Fix cxxflags and linkflags injection via environment variables
reyaz006 commented 3 years ago

It's still using 100% CPU after 24h so I'm restarting it. Upgrading to 4.3.5 at the same time.

Are you using tracker-only proxy?

image

I don't know. Would it be useful if I tell that I can reproduce the issue on a fresh portable installation while I got main application instance running? I just set the port to the same value, then restart portable one, feed it with the same torrent from a private tracker and it's stuck too.

reyaz006 commented 3 years ago

Something changed.

Not sure what caused such a change. But I was trying to play with various connection settings. Found that changing any "max connection" settings or enabling proxy don't solve the issue.

reyaz006 commented 3 years ago

Noticed now that also while such torrents may occasionally get unstuck by themselves, it may be not for long. 2 latest affected torrents got 100% downloaded after a day but remain at 0.00 and 0.02 ratio, with their tracker status still "Updating" and peers "0" at Trackers tab, but with non-zero numbers in Seeds and Peers columns in the main list.

yudshj commented 3 years ago

Same issue here. But what the weird thing is that it could start downloading automaticlly after many hours. I tried proxy but not working. When I change the incoming port to a random number, it shows out going socked was closed in the Message.

Chalanxe commented 3 years ago

Exiting the client and reopening seems to fix it for mine

reyaz006 commented 3 years ago

Exiting the client and reopening seems to fix it for mine

Same here, but I'd like to avoid this because opening the client takes around 20-30 minutes for me.

reyaz006 commented 3 years ago

Is there anything that can be done to track the issue? Debug builds with specific logging options? We only need to see what happens when qbt tries to fetch the tracker from http/https to understand why it can't unstuck from "Updating" for hours.

Also, noticed that many other torrents have tracker status stuck at "Updating". I have around 80 lines in "automatically add these trackers to new downloads" field. Could it be that they are stuck because of the huge amount of trackers in almost every torrent?

dyseg commented 2 years ago

Same issue for me currently with 4.4.0rc1(lbitorrent 2.0.5), but it is present since i use qBittorrent(around 4.1.x...). I would also be glad for some debug build with additional logging to be able to track what is happening.

note: this issue has the OS: Windows tag, but in my case we are talking about Linux(with qbittorrent-nox btw).

dyseg commented 2 years ago

For me it seems that the problem is that I have "too many" network interface and IP addresses. Meaning every announce is multiplied by the number of IP addresses my machine has. If I use Any interface and Any addresses with this many interfaces(which is the default): image image

then I have a massive announce overload after a startup with 850+ torrents, most of them with multiple trackers: image

If I restrict the interface and IP address: image then I barely have queued announces compared to the previous state: image

Since I made this settings change, all of my newly added downloads start in a few seconds, I don't have the "Stalled at 0%" behavior.

If anyone is interested in how to get useful statistics out from the underlying libtorrent lib, check this commit. This will print the stats alerts of libtorrent to the default qbittorrent log file. After that, you can generate the pretty graphs by the parse_session_stats.py. It is recommended to raise the log rotation size from 65KiB.

Question to the qBittorrent developers: why don't qBittorrent detects such a case and gives at least a warning to the log file?

reyaz006 commented 2 years ago

At some point qbt stopped downloading such torrents at all. I have torrents added 1 month ago and they are still not getting downloaded. Updating to 4.4.1 did not help, and actually introduced much higher CPU usage. Recently, due to GUI being frozen, it even went and shut itself down after I pressed the cross button, instead of hiding into tray as usual. It takes more than 1 hour to start now.

reyaz006 commented 2 years ago

Since I made this settings change, all of my newly added downloads start in a few seconds, I don't have the "Stalled at 0%" behavior.

Did the same. Didn't help.

dyseg commented 2 years ago

You could have a different problem, but to rule out that you do not have the same as I had, please grab the build which will print the libtorrent stats messages to the log file from here: https://github.com/dyseg/qBittorrent/actions/runs/1831065368 https://github.com/dyseg/qBittorrent/suites/5271594981/artifacts/162960456

Then I suggest that you turn of log rotating, and delete the existing log file before you start qBittorrent: kép

Let it run for half a day, then you can use the mentioned python file to generate the plots (I think it will only work on linux, since it requires gnuplot, but if you share the log file here I can do it for you, or you could do it in a VM or something...)

idontlikecreatingaccounts commented 2 years ago

I have this exact issue. New torrents stay "stalled" for hours, trackers are "updating..." forever. Trackers say I am "connectable" and I can see peers in qbit, but my torrents don't count as actively seeding on the tracker website.

What's strange is that it just started suddenly happening while I was using 4.4.1 that I had used for months. Updating to the latest 4.4.5 did not help.

Restarting the program does not help either. Changing the port triggers the downloads to start, but does nothing as far as the "updating..." or not being seen as a seeder goes. I can upload and accumulate upload credit, but I am in danger of "hit and runs" if I download anything as I do not show up as actively seeding despite having the torrents open in my client.

I have 3750 active torrents.

e. I also noticed this problem seems to only affect private trackers. The few public torrents I have are the only ones with a "Working" status for their tracker.

e2. Pausing all torrents, quitting the software, opening it back up with everything still paused, then resuming them seems to be a temporary workaround. Not a real fix, but if someone is desperate to just get their torrents running this might help.

reyaz006 commented 1 year ago

In case someone is still having such issues. I'm now running the latest version of qbt and it works fine (except where it takes long to do stuff due to the amount of torrents). Was working fine for quite some time even before that.

Network issues. Set the interface to the one you always use, like shown by https://github.com/qbittorrent/qBittorrent/issues/14453#issuecomment-1036563746

Private trackers don't seem to work. You may be behind a NAT. Ask your ISP to explain how it works, what the limitations are and how to deal with them. Maybe they can provide you with a static IP that would allow incoming connections without issues (what I went with). That's what some private trackers don't like - if they can't see you being online, which would be the case with NAT. Alternatively, you can try enabling the Anonymous mode in qbt settings. Strangely, some of those private trackers start being happy about you with this mode. But then you may make other trackers unhappy. You may then need to switch this option on/off in order to use different trackers, or maybe you can run 2 instances of qbt to deal with this.

It may help if qbt could allow setting Anonymous mode by-tracker or by-torrent.

idontlikecreatingaccounts commented 1 year ago

In case someone is still having such issues. I'm now running the latest version of qbt and it works fine (except where it takes long to do stuff due to the amount of torrents). Was working fine for quite some time even before that.

I am not having this issue anymore, although so many things happened at once I don't know what fixed it, and I have to admit I'm scared of it returning.

In my case, one of the private trackers I was using went permanently down. That took off about 1,500 torrents from my seeding list. That coincided with qBittorrent starting work again properly. Did I have too many torrents? Was the dying tracker sending inconsistent signals that confused the software? I don't know. Another tracker I am on was also struggling around this time, with its announcing being inconsistent. Maybe it was all just too much to handle, because the issue hasn't returned, and I don't think it had anything to do with qBittorrent client version.

I have a basic understanding of networking and have been torrenting since 2005, so I know it's not NAT or any of the usual problems. But when stuff gets to "the software is not doing what it says it's supposed to" is when I run out of knowledge.

dyseg commented 1 year ago

I still think that qBittorrent could detect if the tracker announces are queued for too long time, and at least log a warning. It could be switchable by this already existing option: kép The limit for "too long" could be fine tuned after the feature is implemented on the master branch, and enthusiast users start to use it.

idontlikecreatingaccounts commented 1 year ago

I went over 4000 active torrents again, and just like that the problem reappeared like it never went away.