Closed Bug 1620623 Opened 5 years ago Closed 5 years ago

Ignore memory-pressure if we've begun to shut down

Categories

(Core :: XPCOM, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

While looking over crash reports where we are hanging, I found this interesting report: bp-32dc5e7a-8be3-46dd-91e5-24f820200306

IPCShutdownState is "SendFinishShutdown (sent)", which I think means we've started to shutdown. The shutdown stack shows that we're GCing in response to memory pressure when we hang. This seems pretty silly. We'd rather the entire content process just goes away, so I think we should ignore memory pressure once we're in a shutdown state. This should be about one or two lines of code to do.

Doing some searching on crash stats, this doesn't look like it is very common. Presumably once we've started shutting down ContentChild we're going to ignore ContentChild::RecvFlushMemory messages, so maybe it only affects memory flushing that was already in progress when we decided to shut down the child.

If we're in the middle of shutting down a content process, don't GC if we get a
memory pressure event. Shutting down the process is a better way to free memory!
This doesn't seem to happen much, presumably because once we've started
shutting down the content process we ignore new messages, like ones telling
us to do memory-pressure.

I looked at the other places we start a GC in nsJSEnvironment, and the rest are from the timers that I dealt with in the other patch.

Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e6a7c66bc500 Ignore memory-pressure if we've begun to shut down. r=smaug
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: