Closed Bug 1817305 Opened 2 years ago Closed 2 years ago

DataStorageTimer causes wake-ups every 5 minutes while Firefox is completely idle

Categories

(Core :: Security: PSM, defect, P2)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [psm-backlog])

Attachments

(1 file)

Here is a long profile of Firefox showing only about:blank with the user away for multiple hours, with the new markers from bug 1817034: https://share.firefox.dev/3lFS3DK

The new markers show that there are 3 repeating 300s timers called "DataStorageTimer".

Reading the code, it seems this repeating timer is added unconditionally during initialization at https://searchfox.org/mozilla-central/rev/66aa740e65a343659a7446b890145781f1b6a344/security/manager/ssl/DataStorage.cpp#178-181 and then in the timer callback there's an early return if there's no pending write: https://searchfox.org/mozilla-central/rev/66aa740e65a343659a7446b890145781f1b6a344/security/manager/ssl/DataStorage.cpp#689

Could this be changed to use a one-shot timer, that would be started when mPendingWrite is set to true?

Severity: -- → S2
Priority: -- → P2
Whiteboard: [psm-backlog]
Assignee: nobody → florian
Status: NEW → ASSIGNED
Blocks: 1736916
Pushed by fqueze@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d54375f41a61 Start the DataStorageTimer only when there is something to write, r=keeler.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: