Closed Bug 1426801 Opened 6 years ago Closed 6 years ago

Intermittent leakcheck | tab process: 40 bytes leaked (FirstIdleRunnable)

Categories

(Core :: DOM: Content Processes, defect, P5)

defect

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- wontfix
firefox58 --- fixed
firefox59 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: mccr8)

References

Details

(Keywords: intermittent-failure, memory-leak)

Attachments

(1 file)

This probably used to be bug 1416927 before I landed bug 1410209.
Component: General → DOM: Content Processes
Keywords: mlk
See Also: → 1416927
I looked at two logs where this is happening, and it seemed like a very short-lived process. gFirstIdleTask is cleared in FirstIdle.

    RefPtr<CancelableRunnable> firstIdleTask = NewCancelableRunnableFunction("FirstIdleRunnable",
                                                                             FirstIdle);
    gFirstIdleTask = firstIdleTask;
    NS_IdleDispatchToCurrentThread(firstIdleTask.forget());

If the call to NS_IdleDispatchToCurrentThread fails, we'd end up leaking gFirstIdleTask. I can try clearing gFirst if the dispatch fails.
Assignee: nobody → continuation
Another possibility is that when ContentChild::ActorDestroy() is called when gFirstIdleTask is defined, the runnable is cancelled, but gFirstIdleTask is not cleared. That seems like a more likely cause of this.
Comment on attachment 8940024 [details]
Bug 1426801 - Clear gFirstIdleTask if we fail to dispatch the runnable.

https://reviewboard.mozilla.org/r/210310/#review216036
Attachment #8940024 - Flags: review?(mrbkap) → review+
Keywords: leave-open
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1eb22728208e
Clear gFirstIdleTask if we fail to dispatch the runnable. r=mrbkap
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Please request Beta approval on this when you get a chance. It grafts cleanly.
Flags: needinfo?(continuation)
Target Milestone: --- → mozilla59
Comment on attachment 8940024 [details]
Bug 1426801 - Clear gFirstIdleTask if we fail to dispatch the runnable.

Approval Request Comment
[Feature/Bug causing the regression]: probably bug 1324428
[User impact if declined]: None. This just fixes an intermittent orange on Treeherder.
[Is this code covered by automated tests?]: yes
[Has the fix been verified in Nightly?]: yes
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: this only does a little bit of extra cleanup in a rare situation during shutdown
[String changes made/needed]: none
Flags: needinfo?(continuation)
Attachment #8940024 - Flags: approval-mozilla-beta?
Comment on attachment 8940024 [details]
Bug 1426801 - Clear gFirstIdleTask if we fail to dispatch the runnable.

Fix an intermittent failure. Beta58+.
Attachment #8940024 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: