vscode: Incorrect crash event fired for termination of filewatcher by SIGTERM

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.79.2
  • OS Version: Ubuntu 23.04

Steps to Reproduce:

  1. Open an empty folder in vscode
  2. Set this as workspace settings json:
{
  "files.watcherExclude": {
    "**/.git/objects/**": true,
    "**/.git/subtree-cache/**": true,
    "**/.hg/store/**": true,
    "**/.vscode-test-workspace/**": true,
    "**/.vscode-user-data-dir/**": true,
    "**/dist/**": true,
    "**/fixtures/**": true
  }
}
  1. Open the Main Output channel
  2. An error message is dispayed in the output channel: [error] [UtilityProcess id: 1, type: fileWatcher, pid: 28113]: crashed with code 15 and reason 'killed'

See also detailed reproduction steps in https://github.com/SimonSiefke/vscode-file-watcher-crashed

Complete Main Output Channel Logs

2023-06-28 20:16:26.396 [info] update#setState idle
2023-06-28 20:16:30.591 [error] [UtilityProcessWorker]: terminated unexpectedly with code 15, signal: unknown
2023-06-28 20:16:30.592 [error] [UtilityProcess id: 1, type: fileWatcher, pid: 28113]: crashed with code 15 and reason 'killed'
2023-06-28 20:16:30.593 [info] Extension host with pid 28133 exited with code: 0, signal: unknown.
2023-06-28 20:16:56.399 [info] update#setState checking for updates
2023-06-28 20:16:56.403 [info] update#setState idle

Expected behaviour

The file watcher doesn’t crash.

Actual behaviour

The file watcher crashes with code 15.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 28 (16 by maintainers)

Commits related to this issue

Most upvoted comments

@anthony-langford @AngeloGross @Spyabo Please could you try installing the previous version of Pylance extension, thats 2023.10.20 Let me know if that works.

Opening a vscode window that contains a jupyter notebook .ipynb file causes the window to crash after loading image Here are the main logs related to the crash:

2023-10-19 11:34:38.693 [error] [UtilityProcessWorker]: terminated unexpectedly with code 15, signal: unknown
2023-10-19 11:34:38.694 [error] [UtilityProcess id: 2, type: fileWatcher, pid: 20000]: crashed with code 15 and reason 'killed'
2023-10-19 11:34:38.695 [error] ptyHost terminated unexpectedly with code 0
2023-10-19 11:34:38.696 [error] [UtilityProcessWorker]: terminated unexpectedly with code 15, signal: unknown
2023-10-19 11:34:38.696 [error] [UtilityProcess id: 1, type: fileWatcher, pid: 19602]: crashed with code 15 and reason 'killed'
2023-10-19 11:34:38.697 [error] [UtilityProcess type: shared-process, pid: 19601]: crashed with code 15 and reason 'killed'
2023-10-19 11:34:38.704 [info] Extension host with pid 20001 exited with code: 0, signal: unknown.
2023-10-19 11:34:38.704 [error] [UtilityProcess id: 2, type: extensionHost, pid: 20001]: crashed with code 15 and reason 'killed'
2023-10-19 11:34:38.705 [error] CodeWindow: renderer process gone (reason: killed, code: 15)
2023-10-19 11:34:38.994 [error] CodeWindow: renderer process gone (reason: killed, code: 15)
2023-10-19 11:34:39.278 [info] Extension host with pid 19603 exited with code: 15, signal: unknown.
2023-10-19 11:34:39.281 [error] [UtilityProcess id: 1, type: extensionHost, pid: 19603]: crashed with code 15 and reason 'killed'
ProductName: macOS
ProductVersion: 13.5.1
BuildVersion: 22G90

I think there is some confusion, the issue has two unrelated crashes being combined.

  1. Filewatcher crash with code 15 - this was due to an incorrect crashed event being fired from the runtime when the process was killed by SIGTERM. @bpasero set out to address this and additionally there will not be any crash dumps generated as it is not a crash in the first place.

  2. Crash reported by @jetm , I have separated it out to https://github.com/microsoft/vscode/issues/211422 as it is unrelated to the file watcher. @jetm can you comment in that issue with the data for https://github.com/microsoft/vscode/issues/186540#issuecomment-2078675731. Thanks!

@DonJayamanne I installed 2023.10.20 and the problem disappeared. Reinstalled the latest version 2023.10.30 and the problem reappeared. In my opinion, it seems that there is a bug in 2023.10.30.

Please check out this screencast of the issue:

And here is the crash dump:

vscode-file-watcher-crash-dump.zip

I hope this helps!