Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.78k stars 443 forks source link

Swarm activity indicators goes to 0 upon completion of download despite seeding state #5617

Open da2x opened 3 years ago

da2x commented 3 years ago
Tribler version/branch+revision:

7.5.2

Operating system and version:
Steps to reproduce the behavior:
  1. Start downloading something fun from an active swarm with lots of participants (e.g. Arch Linux.
  2. Notice up and download activity and high numbers of active peers and seeders while the download happens.
  3. Wait for it to complete.
Expected behavior:

The peers and seeder columns on the Downloads screen should shown the number of seeders and peers even when the torrent enters seeding state at the end of the download.

Actual behavior:

It drops from thousands to 0 (0) seeders and 0 (0) peers immediately after the download has completed. I’ve tested six different Tribler instances under different network conditions with two dozen transfers each. They all exhibit the same behaviour.

You’ll see this also applies to anonymous seeders e.g. when following the test steps in #5615. The steps in that issue also demonstrates that seeding seem to work despite the swarm being shown with zero activity.

Notes:

This might be a duplicate of or the underlying issue for #5616?

Other torrent clients still show the swarm health/activity numbers while seeding.

devos50 commented 3 years ago

Thanks for your report. I think we are displaying the numbers that libtorrent reports to us, but it might be a bug on our side.

da2x commented 3 years ago

the numbers that libtorrent reports to us

Deluge and qBitTorrent (two other libtorrent clients) display the expected (and constantly changing) numbers even after completing the download for as long as the transfers are in a seeding state. If I stop the transfer in these clients, they also drop to 0 (0) / 0 (0).

egbertbouman commented 3 years ago

Once an anonymous download has completed, it will seed only through end-to-end encrypted circuits. This means that there will be no normal BitTorrent traffic, and the seeders/leechers will drop to 0.

To verify that this is indeed what's happening, you can try and change the hop count to 0, and see if the seeders/leechers will go back up.

da2x commented 3 years ago

Shouldn't it still show how many anonymous seeders and peers there are? It still shows 0 (0) for test torrents where I know there are other anonymous seeders online. Or can't those numbers be known?

It looks distinctly broken/dead when it just says 0 (0) / 0 (0).

egbertbouman commented 3 years ago

You're right, seeder/leechers should be that of the hidden swarm. Unfortunately, Tribler currently doesn't monitor the hidden swarm while uploading. It just waits for incoming connections. What we could do is show the number of peers that are downloading from you. Right now it's just always 0.

Note that hidden seeders compete with regular BitTorrent peers, which are often much faster. Therefore, the download engine will prefer regular BitTorrent peers. So, even with the abovementioned change, it's likely that the peer count will remain (close to) 0.

drew2a commented 1 year ago

As an idea. We can show something more user-friendly in the columns Seeds/Peers for completed anonymous downloads. Like "hidden" or "waiting for incoming connections" or "anon seeding"?