-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect disposing of crashed targets
In April 2024 last year we landed crrev.com/c/5458415 which handled a case where the performance panel would freeze after trace recording. We tracked the freezing down to a call to `resumeAllTargets()` which never resolved. The performance panel suspends all targets before starting a recording. The cause of this was a target crashing during the recording process. This would mean it would hang when `resume()` was called. To fix this, we added code that disposed of the target when it crashed. This meant we would not then try to resume it after the trace recording was complete. Fast forward to the present, and the bug crbug.com/387258086 gets reported which shows a case where if you crash the page ("awww snap") and then reload the page, the page itself is fine again but DevTools for that page is completely broken. The triage folks tracked this down to the original CL mentioned above (crrev.com/c/5458415) which disposed of crashed targets. When debugging this I realised that our solution of `target.dispose()` on a crashed target is too heavy-handed. I had incorrectly assumed that a crashed target can never "un-crash", but this is not true. If you have a page that crashes, and reload the page, the target can go from crashed => working. So the fix from the original CL that disposed it was incorrect. This CL introduces a fix for both bugs; we still prevent the hanging on `resume()` in the performance panel, but we fix the page crash bug also. Rather than dispose the target, this CL now: 1. Marks a target as crashed when we get the `targetCrashed` CDP event. 2. Marks a target as not-crashed when we get the `targetInfoChanged` CDP event (from my debugging this is what gets fired on crashed targets when you reload the page). 3. Skips attempting to `resume()` a crashed target (thus avoiding the performance panel freezing issue). Fixed: 387258086, 333989070 Change-Id: Ia609f6ceee8e166d9defcdd826bcff61002e50cb Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6148211 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Jack Franklin <[email protected]>
- Loading branch information
1 parent
2c14405
commit e32aa43
Showing
4 changed files
with
97 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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