Closed Bug 1828685 Opened 1 year ago Closed 1 year ago

The EverySecondTelemetryCallback_m timer fires every second until xpcom shutdown

Categories

(Core :: WebRTC: Signaling, defect)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: florian, Assigned: bwc)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The new check I'm adding in bug 1828013 at the end of every browser chrome mochitests makes this leftover repeating timer visible when running the browser_WebrtcGlobalInformation.js test which creates peer connections in the parent process.

From looking at the code, it seems this timer is created in PeerConnectionCtx::Initialize, called by PeerConnectionCtx::InitializeGlobal which creates a PeerConnectionCtx instance stored in the global gInstance variable, which is only cleared by PeerConnectionCtx::Destroy, which is only called when receiving the "xpcom-will-shutdown" observer notification.

Could this timer instead be canceled when the last peer connection of the process is closed?

EverySecondTelemetryCallback_m was already causing a performance issue in bug 1724417. At the time I didn't understand that the timer kept firing even after all peer connections were closed.

The reason I'm filing this bug today is that it blocks landing of bug 1828013 (well, if there's no quick fix I'll find a way to add an exception for this timer, but it's unfortunate).

I think it would be possible to stop/resume when all PCs are gone. It might even clear up some intermittent failures on try.

Assignee: nobody → docfaraday
Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d3cb7fb59ff Stop the telemetry gathering timer when there are no PeerConnections. r=ng
Status: NEW → RESOLVED
Closed: 1 year 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: