Closed Bug 879770 Opened 11 years ago Closed 11 years ago

Each time mobile data is enabled, usage statistics increase more than expected for controlled reasons, surpassing statistics reported by Gonk.

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, firefox22 wontfix, firefox23 wontfix, firefox24 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed, b2g-v1.1hd fixed)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
firefox22 --- wontfix
firefox23 --- wontfix
firefox24 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: salva, Assigned: albert)

Details

(Whiteboard: [fixed-in-birch])

Attachments

(1 file)

STR:

It is easy if you try from a fresh flashed device, after rebooting. In an unique SIM environment.

1- Pass the FTE of Cost Control
2- Open the utility tray and observe data usage
3- Enter in the device and show contents for /proc/net/dev:
adb shell
cat /proc/net/dev

Data usage is normally split in transmitted and received bytes and the name of the mobile interface is rmnet0 on Unagui devices.

Expected:
Value observed in Usage application coincides or is near (but never greater) than the value reported by Gonk.

Actual:
Value observed in Usage application is greater than those reported by Gonk.
The problem occurs when the interface is down (shutdown WIFI or 3G) and, in someway, a request to the API is done for that interface. When the API receives a request for interface 'x' it update the stats for the iface and then get stats from the DB.

When updating the stats, as the interface is down, the network manager returns that the iface is not available, so the networkstats update the stats hardcoding txTotalBytes and rxTotalBytes to 0. As a result the real counter of rx and tx is lost, updated to 0 and the computed rx / tx is rx - 0 instead of rx - rx.
Attachment #758592 - Flags: review?(gene.lian)
blocking-b2g: tef? → tef+
I'm looking into this patch and will directly land them if it's OK. Please stay tuned.
Comment on attachment 758592 [details] [diff] [review]
Fix update stats error when iface is down

Since it's a super urgent issue, I'm directly landing them to all the needed branches. Give me 30 minutes. Thanks!
Attachment #758592 - Flags: review?(gene.lian) → review+
https://hg.mozilla.org/mozilla-central/rev/953b1e4c5c17
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
verified fixed on 
Unagi Build ID: 20130620230208
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/a34f6d62cb05
Gaia: de211a86e1df621415942e8b02acea77efafd864
Platform Version: 18.0

Value observed in Usage application of cost control coincides or is near than the value reported by Gonk.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: