Impossible speed in Speed graphs #10206

Closed
opened 2026-02-21 20:37:38 -05:00 by deekerman · 10 comments
Owner

Originally created by @jagannatharjun on GitHub (Apr 20, 2020).

Please provide the following information

qBittorrent version and Operating System

4.2.3 Windows 10

If on linux, libtorrent-rasterbar and Qt version

(type here)

What is the problem

Incorrect speed in Speed graphs, see the attached image
110 120 PiB/s is so not possible
image

What is the expected behavior

Correct speed

Steps to reproduce

Just wait and download

Originally created by @jagannatharjun on GitHub (Apr 20, 2020). **Please provide the following information** ### qBittorrent version and Operating System 4.2.3 Windows 10 ### If on linux, libtorrent-rasterbar and Qt version (type here) ### What is the problem Incorrect speed in Speed graphs, see the attached image 110 120 PiB/s is so not possible ![image](https://user-images.githubusercontent.com/34717789/79743868-fd4c8a80-8322-11ea-8acd-ed182211751a.png) ### What is the expected behavior Correct speed ### Steps to reproduce Just wait and download
deekerman 2026-02-21 20:37:38 -05:00
  • closed this issue
  • added the
    GUI
    label
Author
Owner

@thalieht commented on GitHub (Apr 20, 2020):

Duplicate of #7920

@thalieht commented on GitHub (Apr 20, 2020): Duplicate of #7920
Author
Owner

@jagannatharjun commented on GitHub (Apr 20, 2020):

hmm reported speed is very close to averager overflow limit
github.com/qbittorrent/qBittorrent@48c1ad8059/src/gui/properties/speedplotview.cpp (L131)

PS: I think this is different from the issue you guys linked

@jagannatharjun commented on GitHub (Apr 20, 2020): hmm reported speed is very close to averager overflow limit https://github.com/qbittorrent/qBittorrent/blob/48c1ad8059373ed982aa2adbe3257b8e3d292b93/src/gui/properties/speedplotview.cpp#L131 PS: I think this is different from the issue you guys linked
Author
Owner

@thalieht commented on GitHub (Apr 20, 2020):

PS: I think this is different from the issue you guys linked

Maybe but definitely dupe of #9946

@thalieht commented on GitHub (Apr 20, 2020): >PS: I think this is different from the issue you guys linked Maybe but definitely dupe of #9946
Author
Owner

@jagannatharjun commented on GitHub (Apr 22, 2020):

hmm reported speed is very close to averager overflow limit
github.com/qbittorrent/qBittorrent@48c1ad8059/src/gui/properties/speedplotview.cpp (L131)

I let qbittorrent(build on master) run with the following patch for two days.

@@ -140,6 +141,19 @@ void SpeedPlotView::Averager::push(const PointData &pointData)
     for (int id = UP; id < NB_GRAPHS; ++id)
         m_accumulator.y[id] /= m_divider;
     m_accumulator.x /= m_divider;
+
+    const int invalidSpeed = std::pow<quint64>(2, 64) / 144;
+    if (std::find(std::begin(m_accumulator.y), std::end(m_accumulator.y), invalidSpeed) != std::end(m_accumulator.y)) {
+        LogMsg(tr("Invalid Speed detected in averager."), Log::CRITICAL);
+        if (m_sink.empty()) {
+            m_accumulator = {};
+            return;
+        }
+        const PointData &previousData = m_sink.back();
+        std::copy(std::begin(previousData.y), std::end(previousData.y), std::begin(m_accumulator.y));
+    }
+
     // now flush out averaged data
     m_sink.push_back(m_accumulator);
     m_accumulator = {};

now It chooses to do it on a totally different speed value.🤦‍♂️ and I didn't get any log messages either.
image

@Chocobo1 @glassez any idea where I can look further?

EDIT: I see I choose the incorrect type for invalidSpeed, but still this time a different invalid speed value is reported,

@jagannatharjun commented on GitHub (Apr 22, 2020): > hmm reported speed is very close to averager overflow limit > https://github.com/qbittorrent/qBittorrent/blob/48c1ad8059373ed982aa2adbe3257b8e3d292b93/src/gui/properties/speedplotview.cpp#L131 > I let qbittorrent(build on master) run with the following patch for two days. ```diff @@ -140,6 +141,19 @@ void SpeedPlotView::Averager::push(const PointData &pointData) for (int id = UP; id < NB_GRAPHS; ++id) m_accumulator.y[id] /= m_divider; m_accumulator.x /= m_divider; + + const int invalidSpeed = std::pow<quint64>(2, 64) / 144; + if (std::find(std::begin(m_accumulator.y), std::end(m_accumulator.y), invalidSpeed) != std::end(m_accumulator.y)) { + LogMsg(tr("Invalid Speed detected in averager."), Log::CRITICAL); + if (m_sink.empty()) { + m_accumulator = {}; + return; + } + const PointData &previousData = m_sink.back(); + std::copy(std::begin(previousData.y), std::end(previousData.y), std::begin(m_accumulator.y)); + } + // now flush out averaged data m_sink.push_back(m_accumulator); m_accumulator = {}; ``` now It chooses to do it on a totally different speed value.🤦‍♂️ and I didn't get any log messages either. ![image](https://user-images.githubusercontent.com/34717789/79977360-c8c00680-84bb-11ea-99c5-57b97ebac0b3.png) @Chocobo1 @glassez any idea where I can look further? EDIT: I see I choose the incorrect type for `invalidSpeed`, but still this time a different invalid speed value is reported,
Author
Owner

@jagannatharjun commented on GitHub (May 2, 2020):

Today I stared the code for an hour or two, couldn't get anything 😥, and It's happening to me, again and again, Image of today
image

@glassez @Chocobo1 Please help🙇‍♂️! anywhere I can look for?

@jagannatharjun commented on GitHub (May 2, 2020): Today I stared the code for an hour or two, couldn't get anything 😥, and It's happening to me, again and again, Image of today ![image](https://user-images.githubusercontent.com/34717789/80866557-fd4a7400-8cac-11ea-8f85-092c0e8e9211.png) @glassez @Chocobo1 Please help🙇‍♂️! anywhere I can look for?
Author
Owner

@jagannatharjun commented on GitHub (May 2, 2020):

maximum speed is different for 12 hours even though the peeks for 24 hours should contain 12 hours data and 120 is definitely greater than 60
image

@jagannatharjun commented on GitHub (May 2, 2020): maximum speed is different for 12 hours even though the peeks for 24 hours should contain 12 hours data and 120 is definitely greater than 60 ![image](https://user-images.githubusercontent.com/34717789/80866943-17855180-8caf-11ea-88f4-a6e675fb2f4c.png)
Author
Owner

@glassez commented on GitHub (May 2, 2020):

It seems that to catch it, you will need to analyze all the participating values.
In fact, you do not need to catch some extreme value, it is enough to catch some unreal (just, for example, exceeding the speed of your connection). E.g. you store all appropriate variables in some arrays and if they produces "errored" point you should store and analize the collected data (otherwise drop it and start collecting the new one for the next point).

@glassez commented on GitHub (May 2, 2020): It seems that to catch it, you will need to analyze all the participating values. In fact, you do not need to catch some extreme value, it is enough to catch some unreal (just, for example, exceeding the speed of your connection). E.g. you store all appropriate variables in some arrays and if they produces "errored" point you should store and analize the collected data (otherwise drop it and start collecting the new one for the next point).
Author
Owner

@jagannatharjun commented on GitHub (May 3, 2020):

unknowingly I had my release build set with libtorrent-l.2.2 and was running for 24 hours with the debugger attached, didn't get the weird spike.

@jagannatharjun commented on GitHub (May 3, 2020): unknowingly I had my release build set with libtorrent-l.2.2 and was running for 24 hours with the debugger attached, didn't get the weird spike.
Author
Owner

@gothicserpent commented on GitHub (Jul 12, 2020):

This happens to me too -- fairly infrequently but it is an occurence.

I'm using qBittorrent 4.2.5 on Win10 Pro 10.0.19041

Here are the current log files from my machine's %localappdata%/qbittorrent/logs/qbittorrent.log.bak, %appdata%/qBittorrent/qBittorrent.ini and %appdata%/qBittorrent/qBittorrent-data.ini with sensitive data hidden: https://pastebin.com/xJv3jXPk

Overall censored qBittorrent UI with spikes on bottom graph

image

24 hour plot ( i am using a dark mode theme hence the graph looks dark )

image

30 minute plot (shows normal graph - the issue can occur in 30 minute spans too, just didn't catch it in time)

image

The bug is strictly visual. It does not affect download or upload transfers for me at all, and all files are being processed as normal. It's just the spike in the graph. Since this is an intermittency issue that only affects single data points, I would say a possible solution would be limiting the graph to intentionally hiding data that is an outlier:

If the averages of last several network plots are about 2 MB/s, and there is a data point that is more than 1000% deviation than that in the graph range, it should not be plotted unless it has at least 3-5 or more similar more points, in which case there would be a change in bandwidth that should be plotted. Also, instead of plotting these "outlier" points, they can be interpolated using the average of the points before and after them to preserve visual fidelity of the graph. This way, outliers are not plotted, but general, sustained changes in speed are plotted.

That is a possible solution I would say.

@gothicserpent commented on GitHub (Jul 12, 2020): This happens to me too -- fairly infrequently but it is an occurence. I'm using qBittorrent 4.2.5 on Win10 Pro 10.0.19041 Here are the current log files from my machine's %localappdata%/qbittorrent/logs/qbittorrent.log.bak, %appdata%/qBittorrent/qBittorrent.ini and %appdata%/qBittorrent/qBittorrent-data.ini with sensitive data hidden: https://pastebin.com/xJv3jXPk **Overall censored qBittorrent UI with spikes on bottom graph** ![image](https://user-images.githubusercontent.com/36061843/87254465-c5437800-c437-11ea-9c49-62c94fdfb89b.png) **24 hour plot ( i am using a dark mode theme hence the graph looks dark )** ![image](https://user-images.githubusercontent.com/36061843/87253684-f91b9f00-c431-11ea-970a-1d88d943e72e.png) **30 minute plot (shows normal graph - the issue can occur in 30 minute spans too, just didn't catch it in time)** ![image](https://user-images.githubusercontent.com/36061843/87253860-71cf2b00-c433-11ea-94c4-1d090591899a.png) The bug is strictly visual. It does not affect download or upload transfers for me at all, and all files are being processed as normal. It's just the spike in the graph. Since this is an intermittency issue that only affects single data points, I would say a possible solution would be limiting the graph to intentionally hiding data that is an outlier: If the averages of last several network plots are about 2 MB/s, and there is a data point that is more than 1000% deviation than that in the graph range, it should not be plotted unless it has at least 3-5 or more similar more points, in which case there would be a change in bandwidth that should be plotted. Also, instead of plotting these "outlier" points, they can be interpolated using the average of the points before and after them to preserve visual fidelity of the graph. This way, outliers are not plotted, but general, sustained changes in speed are plotted. That is a possible solution I would say.
Author
Owner

@jagannatharjun commented on GitHub (Jul 13, 2020):

I find this usually happens in situations where there is high I/O usage for example
image
during this spike, I was doing something weird that required high I/O usage and this is what I get but it doesn't happen all the time, also this only happens with SSDs, I had an old computer with HDD, this never happens on that computer.

@jagannatharjun commented on GitHub (Jul 13, 2020): I find this usually happens in situations where there is high I/O usage for example ![image](https://user-images.githubusercontent.com/34717789/87281182-964d0500-c510-11ea-93ae-07eac5b528d4.png) during this spike, I was doing something weird that required high I/O usage and this is what I get but it doesn't happen all the time, also this only happens with SSDs, I had an old computer with HDD, this never happens on that computer.
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#10206
No description provided.