Open Bug 1333409 Opened 9 years ago Updated 4 years ago

Bad interaction between the shutdownhang kill timer and the ContentParent kill timer

Categories

(Toolkit :: General, defect)

defect

Tracking

()

Tracking Status
firefox54 --- affected

People

(Reporter: ted, Unassigned)

References

Details

In bug 1320959 alex mayorga linked a crash report for a crash he hit during shutdown: https://crash-stats.mozilla.com/report/index/ec240b55-4ef6-415f-9dc7-e702f2161128#tab-details I got a better stack from visual C++: bug 1320959 comment 4. It looks like the browser was shutting down, and storage code was waiting for a worker thread to shut down, spinning the event loop while it did so. Then it hit the ContentParent timeout (`ContentParent::ForceKillTimerCallback`) and called `CreateMinidumpsAndPair`, and while it was writing a minidump for the content process the browser hit the shutdown timeout and intentionally crashed itself, so the top of the stack in thread 0 is in the guts of dbghelp while it's writing a minidump for another process. (I'm actually surprised that this worked, I don't think dbghelp is fully threadsafe.) We should fix things here so we don't get into this weird situation. Maybe if we hit the ContentParent timeout during shutdown we should just force-kill the content process without writing a minidump? Alternately, we could have some light interaction with the shutdown timer in this case so it could give a little more of a grace period to let it finish writing a minidump. Obviously we don't want to hang shutdown for longer than it already is.
Depends on: 1405290
Depends on: 1437575
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.