Commit c7179db
authored
fix(amazonq): Open multiple VSCode instances crashes Amazon Q Language Server (#6811)
## Problem
When running multiple VSCode windows on mac arm64, Amazon Q's language
server works correctly in the first window but crashes in additional
windows with the error: `EXC_CRASH (SIGKILL (Code Signature Invalid))`
## Root Cause
The crash occurs because:
- The first VSCode window starts the language server and extracts
everything (including the node binary from flare)
- When additional VSCode windows are opened, they attempt to re-extract
the zip from flare, overriding the current contents
- On mac arm64, overwriting the node binary while it's in use by the
first VSCode window can apparently cause code signing validation to fail
for the next callers of it
- This didn't effect windows when I was playing around with it yesterday
- Weirdly enough, if you start the language server outside of VSCode,
unzip servers.zip again, and then spawn a new language server it doesn't
seem to have an issue. My guess is there's some weird interplay with
electron owning the spawning of the processes
## Solution
Instead of forcefully overriding contents in flare, only copy over the
file if its necessary
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent cf83957 commit c7179db
File tree
1 file changed
+8
-1
lines changed1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
312 | 319 | | |
313 | 320 | | |
314 | 321 | | |
| |||
0 commit comments