Closed
Bug 1047416
Opened 10 years ago
Closed 10 years ago
Wakelock leak on server response while disabled
Categories
(Firefox OS Graveyard :: FindMyDevice, defect)
Firefox OS Graveyard
FindMyDevice
Tracking
(b2g-v2.1 fixed)
RESOLVED
FIXED
2.1 S2 (15aug)
Tracking | Status | |
---|---|---|
b2g-v2.1 | --- | fixed |
People
(Reporter: ggp, Assigned: ggp)
References
Details
Attachments
(1 file)
After bug 1030249 landed, we report to the server whenever FMD is disabled. However, our callback for server responses currently returns early when FMD is not enabled [1], and in that case a 'ping' alarm is not set [2]. The callback is called with a wakelock held, and that wakelock would have been released when the alarm is set. STR: 1- Enable FMD 2- Disable FMD 3- Repeat steps 1 and 2 a few times, observe how a wakelock is leaked at each repetition. 1- https://github.com/mozilla-b2g/gaia/blob/26d76259aa04393d480057c0b04ef0494ec25e07/apps/findmydevice/js/findmydevice.js#L533 2- https://github.com/mozilla-b2g/gaia/blob/26d76259aa04393d480057c0b04ef0494ec25e07/apps/findmydevice/js/findmydevice.js#L577
Assignee | ||
Comment 1•10 years ago
|
||
Actually, the callback I linked to is not invoked after we report disabled; in fact, we don't have a callback for that at all [1], so it's no surprise that the wakelock is not being released :) 1- https://github.com/mozilla-b2g/gaia/blob/26d76259aa04393d480057c0b04ef0494ec25e07/apps/findmydevice/js/findmydevice.js#L227
Assignee | ||
Comment 2•10 years ago
|
||
Work in progress PR; still need to add some tests.
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8466222 [details] [review] gaia pull request PR updated, I believe this is ready for review.
Attachment #8466222 -
Flags: review?(lissyx+mozillians)
Comment 4•10 years ago
|
||
Okay, so I can reproduce the leak: 08-06 16:13:03.783 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{}],"command":[]} 08-06 16:13:04.263 1408 1408 I GeckoDump: [findmydevice] releasing one wakelock, wakelocks are: {"clientLogic":[{},{}],"command":[]} 08-06 16:13:08.283 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{}],"command":[]} 08-06 16:13:24.863 1408 1408 I GeckoDump: [findmydevice] releasing one wakelock, wakelocks are: {"clientLogic":[{},{}],"command":[]} 08-06 16:13:25.043 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{}],"command":[]} 08-06 16:13:31.873 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{},{}],"command":[]} 08-06 16:13:32.273 1408 1408 I GeckoDump: [findmydevice] releasing one wakelock, wakelocks are: {"clientLogic":[{},{},{}],"command":[]} 08-06 16:14:40.823 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{},{}],"command":[]} 08-06 16:14:53.643 1408 1408 I GeckoDump: [findmydevice] releasing one wakelock, wakelocks are: {"clientLogic":[{},{},{}],"command":[]} 08-06 16:14:53.903 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{},{}],"command":[]} 08-06 16:14:56.483 1408 1408 I GeckoDump: [findmydevice] acquiring one wakelock, wakelocks are: {"clientLogic":[{},{},{}],"command":[]} 08-06 16:14:56.893 1408 1408 I GeckoDump: [findmydevice] releasing one wakelock, wakelocks are: {"clientLogic":[{},{},{},{}],"command":[]}
Comment 5•10 years ago
|
||
Comment on attachment 8466222 [details] [review] gaia pull request That does work fine, thanks. I left a couple of comments on Github, but it's more cosmetic.
Attachment #8466222 -
Flags: review?(lissyx+mozillians) → review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 6•10 years ago
|
||
PR updated.
Comment 7•10 years ago
|
||
Master: https://github.com/mozilla-b2g/gaia/commit/a7458f19647193768ce15819bd34f528b69ae49f
Status: NEW → RESOLVED
Closed: 10 years ago
status-b2g-v2.1:
--- → fixed
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 2.1 S2 (15aug)
You need to log in
before you can comment on or make changes to this bug.
Description
•