https://bugs.kde.org/show_bug.cgi?id=479230

--- Comment #3 from madc...@atlas.cz ---
My guess is that the problem lies in integer overflow. As far as I could
deduce, the transmission speeds are calculated continuously by a timer in
ConnectionItem QML component. This is done by subtracting the current value of
rxBytes reported by the model from prevRxBytes stored as a property of the
timer. The model uses qulonglong for the values of transmitted bytes but the
QML component uses 32bit ints. I don't know how exactly Qt handles 64 -> 32 bit
conversions when it passes data to QML but I suspect that if the actual number
of rxBytes is greater than 2^31, then RxBytes - prevRxBytes exceeds the integer
range and gets clamped to 2^31.

When I reproduced the problem today, value reported from "cat
/sys/class/net/wlan0/statistics/rx_bytes" was 3560443876 which is greater than
what a signed 32 bit integer can represent. It also explains why the issue is
difficult to reproduce; the NIC must receive over 2 GiB of data for the problem
to occur.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to