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

Impossible speed in Speed graphs #12560

Closed
jagannatharjun opened this issue Apr 20, 2020 · 10 comments · Fixed by #13188
Closed

Impossible speed in Speed graphs #12560

jagannatharjun opened this issue Apr 20, 2020 · 10 comments · Fixed by #13188
Labels
GUI GUI-related issues/changes

Comments

@jagannatharjun
Copy link
Member

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

@thalieht
Copy link
Contributor

Duplicate of #7920

@thalieht thalieht marked this as a duplicate of #7920 Apr 20, 2020
@jagannatharjun
Copy link
Member Author

jagannatharjun commented Apr 20, 2020

hmm reported speed is very close to averager overflow limit

// With quint64 this speed limit is 2^64/144 ~~ 114 PBytes/s.

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

@thalieht
Copy link
Contributor

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

Maybe but definitely dupe of #9946

@jagannatharjun
Copy link
Member Author

jagannatharjun commented Apr 22, 2020

hmm reported speed is very close to averager overflow limit

// With quint64 this speed limit is 2^64/144 ~~ 114 PBytes/s.

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
Copy link
Member Author

jagannatharjun commented 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
Copy link
Member Author

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

@glassez
Copy link
Member

glassez commented 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).

@jagannatharjun
Copy link
Member Author

jagannatharjun commented May 4, 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.

@gothicserpent
Copy link

gothicserpent commented 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.

@jagannatharjun
Copy link
Member Author

jagannatharjun commented 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.

@qbittorrent qbittorrent locked as resolved and limited conversation to collaborators Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GUI GUI-related issues/changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants