Repository: vscode
Issue: VSC crashes when testing a plugin
Labels: bug,freeze-slow-crash-leak

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: NA

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: >=1.89.1 and up to 1.92.2 
- OS Version: Debian 12

Steps to Reproduce:
We develop a plugin for VSCode (Polyspace as You Code) and we have automated testing that rely on chromedriver and vscode-extension-tester.
The chromedriver version used is the latest given the chromium version that is embedded with the VSCode version.

Note that this issue is hard to reproduce even on our end => we don't have a scenario to reproduce it manually. We only see it happening when running our automated tests suite and it's not always the same tests that are failing.

Note that using VSC 1.87.2 that rely on chromium 118 works fine in our environment ; so we're wondering if this could be related to this bug https://issues.chromium.org/issues/341095522

The dump attached [20240821VSCodeMiniDump.zip](https://github.com/user-attachments/files/16690727/20240821VSCodeMiniDump.zip) has been generated with VSC 1.92.2 so chromium 124.0.6367.243 and therefore chromedriver version 124.0.6367.207.

We use the following command line arguments to run VSC: 
`--no-sandbox --skip-release-notes --disable-workspace-trust --disable-updates --disable-features=CalculateNativeWinOcclusion --disable-gpu --disable-dev-shm-usage --password-store="basic" --user-data-dir=<removed for confidentiality> --crash-reporter-directory=<removed for confidentiality> --extensions-dir=<removed for confidentiality>`


Chromedriver log file around the crash shows the following:
```
[0821/052915.649640:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0821/052915.649681:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[1724232555.966][DEBUG]: DevTools WebSocket Event: Target.detachedFromTarget (session_id=D8C3B5F66063FF0CB76C738C1215C33D) D2716466DD7811A504D5B76A7FBAE9BF {
   "sessionId": "94B85D33F62D9E8DA5E65D31A3975137",
   "targetId": "B3DE9B57B26075A5DF7555A3DABC78B6"
}   
[1724232555.966][DEBUG]: DevTools WebSocket Event: Target.detachedFromTarget (session_id=D8C3B5F66063FF0CB76C738C1215C33D) D2716466DD7811A504D5B76A7FBAE9BF {
   "sessionId": "73364029DB745E81C973192057B9B13D",
   "targetId": "DD9AEA4958D8F42C8720393844441604"
}   
^[[91m[main 2024-08-21T09:29:16.183Z]^[[0m CodeWindow: renderer process gone (reason: crashed, code: 139)
[1724232556.217][DEBUG]: DevTools WebSocket Event: Inspector.targetCrashed (session_id=D8C3B5F66063FF0CB76C738C1215C33D) D2716466DD7811A504D5B76A7FBAE9BF {
}
```