Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code extension host terminated unexpectedly #3327

Closed
kafisatz opened this issue Jun 13, 2023 · 23 comments
Closed

VS Code extension host terminated unexpectedly #3327

kafisatz opened this issue Jun 13, 2023 · 23 comments

Comments

@kafisatz
Copy link

See below please.
I run into this every now and then.
Is there any way I can debug this further?
I am on Windows 11 and Julia 1.8.5.

Usually when the extension host fails, I do the following: I disable the Julia extension (for vs code to load everything else properly) and then re-enable it.

image
@pfitzseb
Copy link
Member

Which VS Code version are you on?

@kafisatz
Copy link
Author

a recent one
image

@pfitzseb
Copy link
Member

Ok. I don't really have any ideas on how to debug this, but try checking the dev console under Help > Toggle Developer Tools.

@kafisatz
Copy link
Author

seems like a deprecation warning is resulting in an error.....
image

@kafisatz
Copy link
Author

there is also this:
image

@cserteGT3
Copy link

I'm having the same issue (Windows 11, Julia 1.9.1, VS Code 1.79.2, julia-vscode v1.47.2). I see both the deprecation warning and the "Extension host (LocalProcess) terminated unexpectedly. Code: -2147483645, Signal: unknown" error.

Disabling the julia extension, then enabling it sometimes solves the issue.

@pfitzseb
Copy link
Member

pfitzseb commented Jul 3, 2023

This error apparently signifies a "Break instruction exception". We don't have direct control over the extension host process, so while it's definitely possible we're doing something bad in the extension to crash the host process, I'm not sure how to debug this. It might be worth opening an issue against microsoft/vscode that links here.

@cserteGT3
Copy link

I hoped that using the extension bisect and bug reporting tool I could submit a more useful bug report, but unfortunately not. The following is what the tool generated:

Extension version: 1.47.2
VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:57:04.379Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2803)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.73GB (1.34GB free)
Process Argv --crash-reporter-id 125c35aa-9be8-486e-978d-f96d724f5171
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30776702
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30771522
showindicator:30766890
pythongtdpath:30769146
i26e3531:30780429
pythonnosmt12:30779714
pythonidxptcf:30772540
pythonnocebcf:30776496

I have two more ideas:

  1. Updating to Insiders version of VS Code.
  2. This guide was mentioned many times in similar issues: https://github.com/Microsoft/vscode/wiki/Native-Crash-Issues#creating-a-crash-report. What do you think, would that contain useful information regarding the julia extension? I see a few .dmp files in the folder, I can share those.

@cserteGT3
Copy link

I can reproduce it with Insiders version as well:

Extension version: 1.47.2
VS Code version: Code - Insiders 1.80.0-insider (5b7440441bbd2548a862f7321cafdfa1597132e5, 2023-06-30T21:12:14.732Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2803)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.73GB (3.35GB free)
Process Argv --crash-reporter-id 609c6433-b12c-4e2f-8116-85084f3fc908
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
vsc_aa:30263845
pythonptprofiler:30281269
vshan820:30294714
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
py29gd2263:30776702
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
pylantcb52:30590116
pyind779:30611226
pythonsymbol12:30651887
2i9eh265:30646982
showlangstatbar:30737417
pythonms35:30671666
24365598:30687740
pythonfmttext:30716741
pythoncmvfstr:30726892
fixshowwlkth:30771523
hideindicator:30766887
pythongtdpath:30726887
i26e3531:30780429
gsofb:30778559
pythonnosmt12:30779711
pythonidxpt:30768918
pythondjangots:30768917
pythonnoceb:30776497
copilotsettingt:30767686
e537b577:30772214
h0f32768:30779712
asynctokenver:30776452
dsvsc013:30777762
dsvsc014:30777825

@pfitzseb
Copy link
Member

pfitzseb commented Jul 3, 2023

What do you think, would that contain useful information regarding the julia extension? I see a few .dmp files in the folder, I can share those.

Probably, but I have no idea what to do with those.

Do you also get that Cannot read properties of undefined error, btw? If so, can you paste the complete stack trace here?

@cserteGT3
Copy link

Do you also get that Cannot read properties of undefined error, btw? If so, can you paste the complete stack trace here?

Actually, I don't 🤔 . These are the logs I see:

image

(Sorry for the screenshot, I can't copy the text in a readable manner, but if any part of it is useful, I'll copy that part.)

@pfitzseb
Copy link
Member

pfitzseb commented Jul 3, 2023

microsoft/pylance-release#1118 seems very similar.

Do you have any non-Microsoft antivir software running?

Anyways, I can't really help here -- if you can reliable repro this issue, I'm sure that the VS Code devs would be interested in this.

@cserteGT3
Copy link

microsoft/pylance-release#1118 seems very similar.

I'll check it.

Do you have any non-Microsoft antivir software running?

No, only the built in.

Anyways, I can't really help here -- if you can reliable repro this issue, I'm sure that the VS Code devs would be interested in this.

Allright, I'll open an issue at vscode.

@kafisatz
Copy link
Author

kafisatz commented Jul 3, 2023

I have done this just now, see above.

@pfitzseb
Copy link
Member

pfitzseb commented Jul 3, 2023

Thanks!

@cserteGT3
Copy link

I am trying to further debug this or find a way around, because it is now a daily issue for me. I installed julia-vscode from source and the following happens:

  1. I hit "Start debugging", the new vs code windows pops up.
  2. First time, a bunch of julia precompilation happened, then I could start the Julia REPL. So everything works fine.
  3. I opened a vs code workspace containing: a julia package (at ~/.julia/dev) and another folder with a bunch of julia files.
  4. It still works fine.
  5. I closed the separate vs code instance.
  6. When I do "Start debugging" again, the new vs code instance pops up with the workspace opened, but closes after a few seconds, around the time, when the julia vs code extension starts.

I see the following in the terminal (where the julia extension repo is opened), but doesn't really get what the issue is:

 *  Executing task: npm run webpack 


> language-julia@1.50.0 webpack
> webpack --mode development

asset extension.js 4.38 MiB [compared for emit] (name: main) 1 related asset
orphan modules 74 KiB [orphan] 44 modules
runtime modules 1.04 KiB 5 modules
modules by path ./node_modules/ 3.56 MiB
  javascript modules 3.39 MiB 618 modules
  json modules 173 KiB
    ./node_modules/diagnostic-channel/package.json 912 bytes [built] [code generated]
    + 4 modules
modules by path ./src/ 349 KiB 28 modules
optional modules 126 bytes [optional]
  external "applicationinsights-native-metrics" 42 bytes [optional] [built] [code generated]
  external "@opentelemetry/instrumentation" 42 bytes [optional] [built] [code generated]
  external "@azure/opentelemetry-instrumentation-azure-sdk" 42 bytes [optional] [built] [code generated]
+ 27 modules

WARNING in ./node_modules/applicationinsights/out/AutoCollection/AzureFunctionsHook.js 51:40-72
Module not found: Error: Can't resolve '@azure/functions-core' in 'C:\Users\username\julia-vscode\node_modules\applicationinsights\out\AutoCollection'
 @ ./node_modules/applicationinsights/out/applicationinsights.js 17:27-73
 @ ./src/telemetry.ts 13:20-50
 @ ./src/extension.ts 37:18-40 41:20-42

1 warning has detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.88.2 compiled with 1 warning in 7093 ms
 *  Terminal will be reused by tasks, press any key to close it. 

Is this error related to my setup or maybe hints something about the original issue?

@jonschumacher
Copy link

Looks like I have the same problem. For me the extension works when no .jl-file is open at the start (saved from the last session) and I then open a .jl-file. But if I had one opened from the last session, the extension host fails and bisect tells that it is the Julia extension. So maybe the issue arises to to something related to the startup order. Unfortunately I am not experienced with TypeScript and debugging it but if someone tells me how to get more information out of the messages then I would be glad to help.

grafik

Extension version: 1.51.2
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.76GB (6.62GB free)
Process Argv --crash-reporter-id 2c3d6060-fc40-4e9b-a888-1d133461e5ca
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263cf:30792227
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
3biah626:30602489
f6dab269:30613381
showlangstatbar:30737416
0bi6i642:30823812
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
asynctok:30821568
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572

@pfitzseb
Copy link
Member

pfitzseb commented Sep 4, 2023

Scroll up a bit? The context before that "AssignProcessToJobObject: (87) Falscher Parameter" line might be relevant.

For me the extension works when no .jl-file is open at the start (saved from the last session) and I then open a .jl-file. But if I had one opened from the last session, the extension host fails and bisect tells that it is the Julia extension.

Very strange. Wanna post that additional info in microsoft/vscode#186912?

@jonschumacher
Copy link

The following screenshot shows what is happening prior to the line "AssignProcessToJobObject: (87) Falscher Parameter"

grafik

I will add that info to the mentioned thread.

@vtjnash
Copy link

vtjnash commented Sep 27, 2023

I think this might be an NT kernel issue, but I think I found a workaround for it in libuv/libuv#4152

@cserteGT3
Copy link

The issue has been resolved for me. Thank you everyone for helping, developing and testing solutions! I really do appreciate the julia community :)

@kafisatz
Copy link
Author

Same (although I don't quite know when). Thank you everyone!

@pfitzseb
Copy link
Member

The libuv fix made it into VS Code 1.84, so you shouldn't have seen the issue since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants