Closed Bug 1691517 Opened 5 years ago Closed 5 years ago

Nullptr dereference when processing tasks after main thread destruction

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Crash Data

Attachments

(1 file)

For example, see: https://treeherder.mozilla.org/logviewer?job_id=326465839&repo=mozilla-central

It appears it's possible to hit https://searchfox.org/mozilla-central/source/xpcom/threads/TaskController.cpp#659-661 where NS_GetMainThread returns a nullptr. Right now we crash when this happens.

There's already bug 1690592 on file for this crash. You could dupe it over if you want.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

Oops, I didn't mean to close this.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
See Also: → 1687191
Crash Signature: [@ mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal]

I did the very, most reliable thing of making sure a lack of main thread wouldn't crash task controller. Which is I think is a good thing. Andrew, do you want me to put up a patch trying to remove the event processing after ThreatManager shutdown altogether as well?

Flags: needinfo?(continuation)

I'm not really familiar enough with event processing to have an opinion on how it should work late in shutdown, sorry.

Flags: needinfo?(continuation)
Pushed by bschouten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/feca4d091977 Do not crash inside TaskController when the main thread is unavailable. r=smaug
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Blocks: 1752305
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: