Open
Bug 1272445
Opened 9 years ago
Updated 2 years ago
Shut down chromium threads before the main thread
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: khuey, Unassigned)
References
(Depends on 2 open bugs)
Details
Given that they can NS_DispatchToMainThread, it would be nice if they were gone by thread manager shutdown. Currently the late threads are:
1. The Vsync thread, shut down from gfxPlatform::Shutdown (which happens after thread manager shutdown) and SoftwareVsyncSource's destructor calling SoftwareDisplay::Shutdown.
2. The IO thread, shut down from mozilla::ShutdownXPCOM very, very late.
Mason, can we move vsync shutdown to gfxPlatform::ShutdownLayersIPC?
Nathan, I think we should shut down the IO thread after joining all other XPCOM threads but before processing the final events for the main thread. Does that seem reasonable? (e.g. at https://hg.mozilla.org/mozilla-central/annotate/c3f5e6079284/xpcom/build/XPCOMInit.cpp#l896) I kind of expect there to be services that try to IPDL during shutdown that will have to be fixed.
Flags: needinfo?(nfroyd)
Flags: needinfo?(mchang)
Comment 1•9 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #0)
> Nathan, I think we should shut down the IO thread after joining all other
> XPCOM threads but before processing the final events for the main thread.
> Does that seem reasonable? (e.g. at
> https://hg.mozilla.org/mozilla-central/annotate/c3f5e6079284/xpcom/build/
> XPCOMInit.cpp#l896) I kind of expect there to be services that try to IPDL
> during shutdown that will have to be fixed.
Kinda wondering what happens to the crashreporter if we happen to crash after the IO thread has been shut down. I can't think of other things, but I'm sure there are some...
Flags: needinfo?(nfroyd)
Comment 2•9 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #0)
> Given that they can NS_DispatchToMainThread, it would be nice if they were
> gone by thread manager shutdown. Currently the late threads are:
>
> 1. The Vsync thread, shut down from gfxPlatform::Shutdown (which happens
> after thread manager shutdown) and SoftwareVsyncSource's destructor calling
> SoftwareDisplay::Shutdown.
> 2. The IO thread, shut down from mozilla::ShutdownXPCOM very, very late.
>
> Mason, can we move vsync shutdown to gfxPlatform::ShutdownLayersIPC?
>
> Nathan, I think we should shut down the IO thread after joining all other
> XPCOM threads but before processing the final events for the main thread.
> Does that seem reasonable? (e.g. at
> https://hg.mozilla.org/mozilla-central/annotate/c3f5e6079284/xpcom/build/
> XPCOMInit.cpp#l896) I kind of expect there to be services that try to IPDL
> during shutdown that will have to be fixed.
I think this is ok as long as shutdown doesn't require ticks from the refresh driver. If the Compositor doesn't tick, that's fine since we don't care about nothing being displayed on the screen at that point. Do we expect anything to tick from the refresh driver after thread manager shutdown?
Flags: needinfo?(mchang) → needinfo?(khuey)
Reporter | ||
Comment 3•9 years ago
|
||
Well, we shut down the compositor in gfxPlatform::ShutdownLayersIPC, so I assume we don't need vsync after that point ...
Flags: needinfo?(khuey)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•