Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HanabishiRecca opened this issue Jun 27, 2024 · 1 comment
Open

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

HanabishiRecca opened this issue Jun 27, 2024 · 1 comment
Labels
Libtorrent Waiting upstream Waiting for changes in dependent libraries

Comments

@HanabishiRecca
Copy link
Contributor

HanabishiRecca commented 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 (arvidn/libtorrent#7693).
But qBittorrent itself also has related code parts that should be tweaked. E.g.

int TorrentImpl::uploadPayloadRate() const
{
// workaround: suppress the speed for Stopped state
return isStopped() ? 0 : m_nativeStatus.upload_payload_rate;
}
int TorrentImpl::downloadPayloadRate() const
{
// workaround: suppress the speed for Stopped state
return isStopped() ? 0 : m_nativeStatus.download_payload_rate;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Libtorrent Waiting upstream Waiting for changes in dependent libraries
Projects
None yet
Development

No branches or pull requests

3 participants