Closed Bug 968689 Opened 7 years ago Closed 7 years ago

Netd BandwidthController sets costlyAlert to invalid quota


(Firefox OS Graveyard :: General, defect)

Gonk (Firefox OS)
Not set


(blocking-b2g:1.3T+, b2g-v1.3T fixed)

1.4 S1 (14feb)
blocking-b2g 1.3T+
Tracking Status
b2g-v1.3T --- fixed


(Reporter: albert, Assigned: albert)




(2 files)

Usage alarms in NetworkStats API use netd costlyAlerts to set quota and fire a message when netd notifies the API. As we can see in: 

When alertBytes is not null, so at least one alert has been set, alertBytes is not updated with desired quota bytes until the updateQuota has been called. That means quota is updated with a wrong value.

For the user it means that alarms are triggered at a wrong threshold values, for example:
- User sets an alarm at 500B.
- User sets an alarm at 700B.
- After some data transfer, user has consumed 600B.
- The first alarm is triggered.
- NetworkStats API sets the next alert quota at 100B, but BandwidthController sets old quota value to 500.
- The second alarm is triggered at 1000B, what is wrong.
Assignee: nobody → acperez
Blocks: 858017
blocking-b2g: --- → 1.3?
nominating to v1.3? since it is an issue related to NetworkStats API already uplifted to v1.3. Thanks!
blocking-b2g: 1.3? → 1.3+
Attached patch PatchSplinter Review
Remove netd alarm before adding the new one.
Attachment #8373175 - Flags: review?(vchang)
Attachment #8374643 - Flags: review?(vchang)
Hi Vincent, could you please help us with the reviews?. Many Thanks!
Flags: needinfo?(vchang)
Renoming for more triage discussion.
blocking-b2g: 1.3+ → 1.3?
Comment on attachment 8373175 [details] [diff] [review]

Review of attachment 8373175 [details] [diff] [review]:

Looks good, thank you.
Attachment #8373175 - Flags: review?(vchang) → review+
Attachment #8374643 - Flags: review?(vchang) → review+
Done... :-)
Flags: needinfo?(vchang)
Keywords: checkin-needed
Patch needed for Tarako version, asking for 1.3t?
blocking-b2g: 1.3? → 1.3T?
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S1 (14feb)
traige: 1.3T+ to get this into tarako for usage app memory saving
blocking-b2g: 1.3T? → 1.3T+
You need to log in before you can comment on or make changes to this bug.