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

Open
opened 2026-02-22 02:34:44 -05:00 by deekerman · 1 comment
Owner

Originally created by @HanabishiRecca on GitHub (Jun 27, 2024).

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.

github.com/qbittorrent/qBittorrent@610d5ef5ff/src/base/bittorrent/torrentimpl.cpp (L1514-L1524)

Originally created by @HanabishiRecca on GitHub (Jun 27, 2024). ### 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](https://github.com/arvidn/libtorrent/assets/13597663/258188b6-45c7-4170-acf0-24aecefb56b0) And even weirder on a seeding side. Along with `Unknown` upload values, I'm actually able to achieve **negative** share ratio. 🙃 ![screenshot](https://github.com/arvidn/libtorrent/assets/13597663/ca10a0af-bbfa-49d8-86a2-28c9706f31df) 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
Author
Owner

@xavier2k6 commented on GitHub (Jun 28, 2024):

May be related/relevant.

@xavier2k6 commented on GitHub (Jun 28, 2024): May be related/relevant. - #13003 - #5851
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/qBittorrent#15871
No description provided.