qbittorrent / qBittorrent

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

Unable to handle transfer rates >2 GiB/s #21003

Open HanabishiRecca opened 3 months ago

HanabishiRecca commented 3 months ago

qBittorrent & operating system versions

qBittorrent: 4.6.5 OS: Arch Linux Qt: 6.7.2 libtorrent: 2.0.10

What is the problem?

I'm actually able to acheive transfers rates more than 2 GiB/s and exceed the max int32 value. This leads to weird results.

Notice the Unknown column value.

screenshot

And even weirder on a seeding side. Along with Unknown upload values, I'm actually able to achieve negative share ratio. 🙃

screenshot

There is obvious int wrap around happening here.

The root of the issue actually lies in libtorrent (https://github.com/arvidn/libtorrent/issues/7693). But qBittorrent itself also has related code parts that should be tweaked. E.g.

https://github.com/qbittorrent/qBittorrent/blob/610d5ef5ffa14366eddfdf0f74dd1d96198a1d13/src/base/bittorrent/torrentimpl.cpp#L1514-L1524

xavier2k6 commented 3 months ago

May be related/relevant.