Closed Bug 899545 Opened 11 years ago Closed 11 years ago

[Cost Control][Helix][V1.1.0 HD] Cannot measure 3G data usage

Categories

(Firefox OS Graveyard :: Gaia::Cost Control, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:hd+)

RESOLVED WORKSFORME
blocking-b2g hd+

People

(Reporter: whsu, Assigned: albert)

Details

(Whiteboard: [leo-triage][PVOB])

Attachments

(2 files)

* Description:
  This case happened on Helix V1.1.0 HD build.
  If you enabled the cost contorl and measure the 3G data usage, you will find that the usage is always "0.00"
  The following is the demo video. You can download it to get the clear version.
  -> https://dc1.safesync.com/LMmrVKPC/CS_001.mp4?a=b1vn5nfw8sQ

* Reproduction steps:
  1. Set up the cost control/Usage app
  2. Turn on 3G network
  3. Browser a webpage
  4. Pull down notification tray
  5. Tap data usage bar
  6. Verify that in the top part of the graph, 3G data usage is increased


* Expected result:
  3G data usage is increased

* Actual result:
  3G data usage isn't increased, always "Zero->0.00"

* Reproduction build:(Mozilla-b2g18_v1_1_0_hd-helix/2013-07-25-07-02-02)
  + Mercurial-Information
    - Gecko revision="2bb08f2878da"
  + Git-information
    - Gaia revision="f2bc4a004f592cd6dce4edda2b0533f4fd4f91f2"
blocking-b2g: --- → hd?
Group: mozilla-corporation-confidential
OOPS~ I found this issue is caused by System date.
If you adjust the system date to the future date then adjust the date back.
The behavior will cause this bug.
Could be a generic bug and not helix specific? Bumping to leo? with qawanted.

Given comment 2, do we need to block on this? The system has been tampered with and usage data is probably not meaningful anyway?
Group: mozilla-corporation-confidential
blocking-b2g: hd? → leo?
Keywords: qawanted
Whiteboard: [leo-triage]
William - Can you address the QA Wanted request here?
Flags: needinfo?(whsu)
Flags: needinfo?(salva)
Hi, Wayne,

I cannot reproduce this case on Leo device.
The Usage app still works as normal on V1.1.0(Leo)
So, we still mark it as Leo?
Attaching the video.
- https://dc1.safesync.com/LMmrVKPC/Usage_001.mp4?a=KsrYT1dX8GE
Flags: needinfo?(whsu)
Keywords: qawanted
Wayne, this looks like it might be helix device specific then. Moving to hd?
blocking-b2g: leo? → hd?
Whiteboard: [leo-triage] → [leo-triage][PVOB]
Hi guys. It should count despite the system date. I'm on vacations so assigning to Albert.
Assignee: nobody → acperez
Flags: needinfo?(salva)
I don't think it was duplicate of bug 899815.
Bug 899815 talks about 3G's problem.
This case talks about problem of usage app/cost control.
Thanks!
HD+ as seemingly HD only bug and should be corrected in that case.
blocking-b2g: hd? → hd+
In unagi is working as expected also.
We don't have the device you are using. Are you able to enable logs in costcontrol (gaia) and NetworkStats API (Gecko)?
Flags: needinfo?(whsu)
Hi, Albert,

Sure! If you only need specific logs or need to enable some perfs, please let me know.
Otherwise, I will dump all logs (adb logcat) by default perf.
Thanks!
Flags: needinfo?(whsu)
Hi, Albert,

Could you please provide the detailed information?
Please guide me to enable the costcontrol and NetworkStats API log.
Thanks!
Flags: needinfo?(acperez)
I attached two patches to enable logs in gaia and gecko.
Apply patches, make a build and reproduce the bug.
Flags: needinfo?(acperez)
Hi, Albert,

I am not sure whether we had any related change.
I cannot reproduce this bug on the latest PVT build.
* Test build:(Mozilla-b2g18_v1_1_0_hd-helix/2013-08-05-23-22-02)
  + Mercurial-Information
    - Gecko revision="f0e9fcb591c2"
  + Git-information
    - Gaia revision="1788602b9e6bfdd6c91f46e1d72b0ed134e05b41"


Could I confirm some behaviors of Usage app with you?
If the current date is "2013-08-07", the I adjust the system date to "2013-12-07".
(1) What will happen with usage app? Will FxOS reset the data usage?
If I adjust the system time back to "2013-08-07", will FxOS reset the data usage again?

Thanks!
(In reply to William Hsu [:whsu] from comment #17)
> Hi, Albert,
> 
> I am not sure whether we had any related change.
> I cannot reproduce this bug on the latest PVT build.
> * Test build:(Mozilla-b2g18_v1_1_0_hd-helix/2013-08-05-23-22-02)
>   + Mercurial-Information
>     - Gecko revision="f0e9fcb591c2"
>   + Git-information
>     - Gaia revision="1788602b9e6bfdd6c91f46e1d72b0ed134e05b41"
> 
> 
> Could I confirm some behaviors of Usage app with you?
> If the current date is "2013-08-07", the I adjust the system date to
> "2013-12-07".
> (1) What will happen with usage app? Will FxOS reset the data usage?

FxOS will not reset data usage deleting the database, but you have to keep in mind that database keeps the data since 'now' until the six last months (180 days). So, if you change date form 2013-08-07 to 2013-12-07, your data from 2013-08-07 to 2013-06-07 should be not deleted.

https://mxr.mozilla.org/mozilla-central/source/dom/network/src/NetworkStatsDB.jsm#23 

> If I adjust the system time back to "2013-08-07", will FxOS reset the data
> usage again?

No, it won't. It depends on the 180 days rule commented before. When changing time back, the idea is to place new stats in the last record. As you can see in bug 844774 due to a limitation in costcontrol in order to be able to manage multiple SIM tracking. Now that muliSIM is being implemented in gecko, when bug 887699 lands, whe will think again to how to fix changes back in clock

> Thanks!
Hi, Albert,

Thanks for your reply and help.
I would like to close this case since I cannot reproduce it on the latest build.

By the way, I investigating the Cost Control behavior you mentioned.
If you are available, please see my further explanation below.

(In reply to Albert [:albert] from comment #18)
> (In reply to William Hsu [:whsu] from comment #17)
> > Hi, Albert,
> > 
> > I am not sure whether we had any related change.
> > I cannot reproduce this bug on the latest PVT build.
> > * Test build:(Mozilla-b2g18_v1_1_0_hd-helix/2013-08-05-23-22-02)
> >   + Mercurial-Information
> >     - Gecko revision="f0e9fcb591c2"
> >   + Git-information
> >     - Gaia revision="1788602b9e6bfdd6c91f46e1d72b0ed134e05b41"
> > 
> > 
> > Could I confirm some behaviors of Usage app with you?
> > If the current date is "2013-08-07", the I adjust the system date to
> > "2013-12-07".
> > (1) What will happen with usage app? Will FxOS reset the data usage?
> 
> FxOS will not reset data usage deleting the database, but you have to keep
> in mind that database keeps the data since 'now' until the six last months
> (180 days). So, if you change date form 2013-08-07 to 2013-12-07, your data
> from 2013-08-07 to 2013-06-07 should be not deleted.

O~ Got it. The default behavior confusing me.
As I tested, if I adjust the date from "2013-08-07" to "2014-08-09", the data usage will be deleted since it is over than 180 days.

> https://mxr.mozilla.org/mozilla-central/source/dom/network/src/
> NetworkStatsDB.jsm#23 
> 
> > If I adjust the system time back to "2013-08-07", will FxOS reset the data
> > usage again?
> 
> No, it won't. It depends on the 180 days rule commented before. When
> changing time back, the idea is to place new stats in the last record. As
> you can see in bug 844774 due to a limitation in costcontrol in order to be
> able to manage multiple SIM tracking. Now that muliSIM is being implemented
> in gecko, when bug 887699 lands, whe will think again to how to fix changes
> back in clock

As I tested the related scenario, if I adjust the date from "2014-08-09" to "2012-08-06".
The usage data didn't be deleted. Is it correct behavior since the date is over than 180 days?

By the way, after I adjust the data back and forth then clicking the "Reset" button, the data usage will become incorrect.
Data usage cannot be reseted. I think it is a bug. I will submit a bug to trace it.
This case happened on V1.0.1. So, I think it was a legacy bug.
Thanks!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
(In reply to William Hsu [:whsu] from comment #19)
> Hi, Albert,
> 
> Thanks for your reply and help.
> I would like to close this case since I cannot reproduce it on the latest
> build.
> 
> By the way, I investigating the Cost Control behavior you mentioned.
> If you are available, please see my further explanation below.
> 
> (In reply to Albert [:albert] from comment #18)
> > (In reply to William Hsu [:whsu] from comment #17)
> > > Hi, Albert,
> > > 
> > > I am not sure whether we had any related change.
> > > I cannot reproduce this bug on the latest PVT build.
> > > * Test build:(Mozilla-b2g18_v1_1_0_hd-helix/2013-08-05-23-22-02)
> > >   + Mercurial-Information
> > >     - Gecko revision="f0e9fcb591c2"
> > >   + Git-information
> > >     - Gaia revision="1788602b9e6bfdd6c91f46e1d72b0ed134e05b41"
> > > 
> > > 
> > > Could I confirm some behaviors of Usage app with you?
> > > If the current date is "2013-08-07", the I adjust the system date to
> > > "2013-12-07".
> > > (1) What will happen with usage app? Will FxOS reset the data usage?
> > 
> > FxOS will not reset data usage deleting the database, but you have to keep
> > in mind that database keeps the data since 'now' until the six last months
> > (180 days). So, if you change date form 2013-08-07 to 2013-12-07, your data
> > from 2013-08-07 to 2013-06-07 should be not deleted.
> 
> O~ Got it. The default behavior confusing me.
> As I tested, if I adjust the date from "2013-08-07" to "2014-08-09", the
> data usage will be deleted since it is over than 180 days.
> 
> > https://mxr.mozilla.org/mozilla-central/source/dom/network/src/
> > NetworkStatsDB.jsm#23 
> > 
> > > If I adjust the system time back to "2013-08-07", will FxOS reset the data
> > > usage again?
> > 
> > No, it won't. It depends on the 180 days rule commented before. When
> > changing time back, the idea is to place new stats in the last record. As
> > you can see in bug 844774 due to a limitation in costcontrol in order to be
> > able to manage multiple SIM tracking. Now that muliSIM is being implemented
> > in gecko, when bug 887699 lands, whe will think again to how to fix changes
> > back in clock
> 
> As I tested the related scenario, if I adjust the date from "2014-08-09" to
> "2012-08-06".
> The usage data didn't be deleted. Is it correct behavior since the date is
> over than 180 days?

It is correct, but as I said we will review it.
 
> By the way, after I adjust the data back and forth then clicking the "Reset"
> button, the data usage will become incorrect.

Actually, costcontrol is not calling the reset method of the NetworkStats API because, as said before, the API does not track different SIM but costcontrol should do it. So this feature is implemented in Gaia and is a bit tricky.

> Data usage cannot be reseted. I think it is a bug. I will submit a bug to
> trace it.
> This case happened on V1.0.1. So, I think it was a legacy bug.

Ok, open it and put me in cc please.

> Thanks!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: