Still having some crashes after having dom.input_events.strict_input_vsync_alignment enabled again
Categories
(Core :: Performance, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox88 | --- | unaffected |
firefox89 | --- | disabled |
firefox90 | blocking | disabled |
firefox91 | --- | fixed |
People
(Reporter: sefeng, Assigned: sefeng)
References
(Regression)
Details
(Keywords: crash, regression)
Crash Data
Attachments
(2 files, 1 obsolete file)
We still having these DidRunTask
because an edge case, such that vsync -> rAF -> xhr triggers event loop -> runInput -> crash
.
Assignee | ||
Comment 1•3 years ago
|
||
Currently, we use VsyncTaskManager::DidRunTask
to change state from
RunVsync
to NoPendingVsync
, however, the issue is that if the vsync
starts an event loop (for instance, by using requestAnimationFrame), and
the event loop starts another input task, Firefox crashes because input
tasks don't expect the state to be RunVsync
.
So instead of using DidRunTask
, we start to use WillRunTask
to fix
it.
Updated•3 years ago
|
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/57e445916fc9 Use VsyncTaskManager::WillRunTask to change InputVsyncState r=smaug
Comment 3•3 years ago
|
||
bugherder |
Assignee | ||
Comment 4•3 years ago
|
||
Reopen this due to still having the crashes
Assignee | ||
Comment 5•3 years ago
|
||
Rarely, we sill see a input task was run when the expectation was a
vsync task. I am unable to find the root cause by looking at the code.
One possible case is the vsync was gone when the input task was run.
This patch added some assertions to see if that was the case.
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Before this patch, we use InputPriorityController::DidRunTask to change
InputVsyncState which is problematic.
Consider this scenario
- Two events are in the queue, vsync(V1) and input(I1)
- I1 runs and starts an inner event loop (We only expect one input
event to be run because there's only one input event) - Another input event(I2) arrives
- Inner event loop picks I2 to run
- When I2 is finished, it sets the InputVsyncState to
RunVsync
- I1's DidRunTask is called and crashed because the state shouldn't
beRunVsync
.
This patch moves the code which checks InputVsyncState from DidRunTask
to WillRunTask
so that the state is correctly checked and updated
before the input task is about to run.
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f4a7cf1a8f7 Change InputVsyncState in InputPriorityController::WillRunTask r=smaug
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 9•3 years ago
|
||
There's no crashes on beta AFAICT.
Comment 10•3 years ago
|
||
Sefeng can you set a priority and severity for this bug? (I'm going through triage)
Assignee | ||
Comment 11•3 years ago
|
||
This can now be closed after landing https://phabricator.services.mozilla.com/D117336 because if we still get new crashes, the crash signature will be changed.
Updated•3 years ago
|
Comment 12•3 years ago
|
||
dom.input_events.strict_input_vsync_alignment is disabled on Beta, so that's why we wouldn't see crashes there.
Updated•3 years ago
|
Description
•