Align Node V8 progress handling with Chromium - #129
Draft
Andarist wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: there is no crash report associated with this. It's just a reported progress mismatch + inconsistent data between basic and scan data that leads to a backend assert in
ensureFramePoint/getPointStack. With inconsistent data, our machinery fails to narrow down the enclosing frame points for a bookmark point.We've observed progress mismatches. In the recording
af25ba61-465b-4ccb-91ef-183926364d7dthe mismatch goes away when starting the scan later, see the manifest diff (lowerstartProgressmismatches when the higher one stops to mismatch):{ "kind": "scanRecording", "endpoint": { "checkpoint": 469, "progress": 2030423 }, - "startProgress": 2027916, + "startProgress": 2027917, "getGenerators": true, "getDependencies": true, "writeScanDataFile": true }The lower one includes the tail of some Playwright async frame, the higher one "skips" over it.
It's unclear what the root cause actually is. But I found some optimization-related divergences around progress tracking when comparing things to the current Chromium source code. I think it's worth aligning to the more heavily used and tested Chromium code either way and there is a real chance this will address the issue we have found.
Chromium commits effectively cherry-picked/mirrored:
6183d3132d7f- Add env var to assert on JS progress changes (#68)3104d7cad00f- Fix build breaks2055467196a- RUN-2232: Make OnProgressReached a no-op when events disallowed (#166)Related context, but not newly cherry-picked:
4349d6d17f42- introduced Chromium's optimized counter path; Node already had its own equivalent.a7cb52b8c2e1- introduced Chromium's direct progress-reached callback; Node already had the direct callback path.relates to: https://hub.replay.io/issues/issue/DEBU-6