Investigate hangs in CycleCollectedJSContext::PerformMicroTaskCheckPoint reported by BHR
Categories
(Core :: Cycle Collector, task)
Tracking
()
People
(Reporter: jstutte, Unassigned)
Details
It seems we can get stuck in CycleCollectedJSContext::PerformMicroTaskCheckPoint
.
In particular there are stacks that indicate we are hanging directly inside that function, not within something called from it:
mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool) xul
which would probably mean that we are hanging directly inside its for loop.
Note about BHR: It truncates stacks up to the first event loop processing and if there is a bhr:
whiteboard tag, it will group and truncate stacks also down to the first line that contains the search string. But those single line stacks were already present before adding the bhr:
whiteboard tag here, so I must assume they are real.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Adding the BHR annotation actually groups more hangs than expected. Not all of them originally read just with one frame, but there is a decent amount of them that apparently hang directly in the for loop inside PerformMicroTaskCheckPoint
. The latest optimization around mSuppressedMicroTasks
might be of interest here ?
Comment 2•2 years ago
|
||
It is somewhat expected to see hangs under PerformMicroTaskCheckPoint. That is where long js promise chains are handled.
Do you have a link to something where mSuppressedMicroTasks shows up?
Reporter | ||
Comment 3•2 years ago
|
||
(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #2)
It is somewhat expected to see hangs under PerformMicroTaskCheckPoint. That is where long js promise chains are handled.
Do you have a link to something where mSuppressedMicroTasks shows up?
Sorry, the description omitted some context. See updated description.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
Removing [bhr:PerformMicroTaskCheckPoint] to check the full stacks.
Reporter | ||
Comment 5•2 years ago
|
||
So the empty stack this bug is interested in ranks #17 currently.
It is probably better for other bugs (like bug 1688963) to not add the whiteboard bhr tag here.
Comment 6•2 years ago
|
||
I guess the hang could look like this if there are tons of promises
Description
•