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

RESOLVED WORKSFORME

Status

Firefox OS
Gaia::Cost Control
RESOLVED WORKSFORME
5 years ago
5 years ago

People

(Reporter: whsu, Assigned: albert)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:hd+)

Details

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

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
* 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"
(Reporter)

Updated

5 years ago
blocking-b2g: --- → hd?
(Reporter)

Updated

5 years ago
Group: mozilla-corporation-confidential
(Reporter)

Comment 1

5 years ago
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)

Updated

5 years ago
Flags: needinfo?(salva)
(Reporter)

Comment 4

5 years ago
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)
(Reporter)

Updated

5 years ago
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)

Updated

5 years ago
Duplicate of this bug: 899815
(Reporter)

Comment 8

5 years ago
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+
(Assignee)

Comment 10

5 years ago
In unagi is working as expected also.
(Assignee)

Comment 11

5 years ago
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)
(Reporter)

Comment 12

5 years ago
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)
(Reporter)

Comment 13

5 years ago
Hi, Albert,

Could you please provide the detailed information?
Please guide me to enable the costcontrol and NetworkStats API log.
Thanks!
Flags: needinfo?(acperez)
(Assignee)

Comment 14

5 years ago
Created attachment 786845 [details] [diff] [review]
Enable logs for costcontrol (gaia)
(Assignee)

Comment 15

5 years ago
Created attachment 786846 [details] [diff] [review]
Enable logs for networkstats (gecko)
(Assignee)

Comment 16

5 years ago
I attached two patches to enable logs in gaia and gecko.
Apply patches, make a build and reproduce the bug.
Flags: needinfo?(acperez)
(Reporter)

Comment 17

5 years ago
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!
(Assignee)

Comment 18

5 years ago
(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!
(Reporter)

Comment 19

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
(Assignee)

Comment 20

5 years ago
(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.