microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.21k stars 29.29k forks source link

Electron 14+ required? Potential systemd 249 / nVidia issue #132609

Closed chrisweeksnz closed 3 years ago

chrisweeksnz commented 3 years ago

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

Steps to Reproduce

  1. install vscode from rpm using rpmostree
  2. run vscode - the application starts to draw the window and then crashes.

more information, including system information and example runs follow...

Suspected issue

There seems to be an incompatibility between systemd 249 and chrome <93 / electron <14.0 when paired with hosts using nvidia GPUs and the nVidia drivers. The problem doesn't seem to exist when using the nouveau drivers and I don't have the hardware to test on AMD and Intel GPUs readily. The error messages seem to follow a problem that existed in Chrome until Chrome 93 was released (an error with very similar error messages logged).

Related chrome information:

Suggested investigation / work to fix

Upgrade electron to >=14.0

Testing/Problem output

System information

[root@hostname ~]$inxi -b
System:    Host: toolbox Kernel: 5.14.0-60.fc35.x86_64 x86_64 bits: 64 Console: tty pts/0 Distro: Fedora release 35 (Rawhide) 
Machine:   Type: Desktop Mobo: ASUSTeK model: ROG CROSSHAIR VIII DARK HERO v: Rev X.0x serial: 201176739100039 
           UEFI: American Megatrends v: 0210 date: 10/13/2020 
CPU:       Info: 12-Core AMD Ryzen 9 5900X [MT MCP] speed: 2420 MHz min/max: 2200/3700 MHz 
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2070 Rev. A] driver: nvidia v: 470.63.01 
           Device-2: Logitech BRIO Ultra HD Webcam type: USB driver: hid-generic,snd-usb-audio,usbhid,uvcvideo 
           Display: server: No display server data found. Headless machine? 
           Message: Unable to show advanced data. Required tool glxinfo missing. 
Network:   Device-1: Realtek RTL8125 2.5GbE driver: r8169 
           Device-2: Intel I211 Gigabit Network driver: igb 
           Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi 
           Device-4: Microsoft Xbox 360 Wireless Adapter type: USB driver: xpad 
Drives:    Local Storage: total: 3.18 TiB used: 16.65 GiB (0.5%) 
Info:      Processes: 496 Uptime: 4h 53m Memory: 62.7 GiB used: 4.42 GiB (7.0%) Shell: Bash inxi: 3.3.06 

Attempt to launch verbosely

[username@hostname ~]$ code --verbose
[main 2021-09-08T03:56:48.928Z] Starting VS Code
[main 2021-09-08T03:56:48.929Z] from: /usr/share/code/resources/app
[main 2021-09-08T03:56:48.929Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'b8b40d61-b865-4432-acaf-ddef8c5637c8',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/username/.config/Code/logs/20210908T155648'
}
[main 2021-09-08T03:56:48.930Z] Resolving machine identifier...
[main 2021-09-08T03:56:48.930Z] Resolved machine identifier: 3548bd88a3b7c2295beeb8b4cc8f1c279de2cb73db6520abd67a70c942386fcb
[main 2021-09-08T03:56:48.931Z] Main->SharedProcess#connect
[main 2021-09-08T03:56:48.940Z] StorageMainService: creating global storage
[main 2021-09-08T03:56:48.941Z] lifecycle (main): phase changed (value: 2)
[main 2021-09-08T03:56:48.941Z] windowsManager#open
[main 2021-09-08T03:56:48.941Z] windowsManager#open pathsToOpen [
  {
    backupPath: '/home/username/.config/Code/Backups/1627648141969',
    remoteAuthority: undefined
  }
]
[main 2021-09-08T03:56:48.942Z] IPC Object URL: Registered new channel vscode:f814d4b5-4288-49a8-ab56-46d06020b0f6.
[main 2021-09-08T03:56:48.943Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:48.943Z] window#validateWindowState: 1 monitor working area { x: 0, y: 44, width: 3840, height: 1556 }
[main 2021-09-08T03:56:48.943Z] window#ctor: using window state { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:48.978Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 1, emptyToOpen: 0)
[main 2021-09-08T03:56:48.979Z] lifecycle (main): phase changed (value: 3)
[main 2021-09-08T03:56:48.980Z] update#setState idle
[main 2021-09-08T03:56:48.980Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116374:0908/155649.100031:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.100052:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 1 time(s)
[116374:0908/155649.312438:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.312450:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 2 time(s)
[116374:0908/155649.521488:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.521501:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 3 time(s)
[116472:0908/155649.531970:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116472:0908/155649.532032:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.626429:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.626443:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 4 time(s)
[116480:0908/155649.632417:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116480:0908/155649.632469:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.731986:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.732006:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 5 time(s)
[116490:0908/155649.737919:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116490:0908/155649.737974:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116374:0908/155649.831934:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.831950:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 6 time(s)
[116500:0908/155649.834163:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116500:0908/155649.834224:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155649.922634:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155649.922643:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 7 time(s)
[116510:0908/155649.924806:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116510:0908/155649.924854:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155650.011715:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155650.011723:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 8 time(s)
[116520:0908/155650.014779:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116520:0908/155650.014896:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116374:0908/155650.103789:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116374:0908/155650.103804:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 9 time(s)
[116374:0908/155650.103816:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
/dev/fd/3: No such file or directory
Server response:
/dev/fd/3: No such file or directory
Server response:

Attempt to launch verbosely, whilst disabling GPU

[username@hostname ~]$ code --verbose --disable-gpu
[116598:0908/155657.630767:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116598:0908/155657.630832:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[main 2021-09-08T03:56:57.687Z] Starting VS Code
[main 2021-09-08T03:56:57.688Z] from: /usr/share/code/resources/app
[main 2021-09-08T03:56:57.688Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'no-cached-data': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': true,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'skip-welcome': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-workspace-trust': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': 'b8b40d61-b865-4432-acaf-ddef8c5637c8',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  'no-sandbox': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: '/home/username/.config/Code/logs/20210908T155657'
}
[main 2021-09-08T03:56:57.689Z] Resolving machine identifier...
[main 2021-09-08T03:56:57.689Z] Resolved machine identifier: 3548bd88a3b7c2295beeb8b4cc8f1c279de2cb73db6520abd67a70c942386fcb
[main 2021-09-08T03:56:57.689Z] Main->SharedProcess#connect
[main 2021-09-08T03:56:57.699Z] StorageMainService: creating global storage
[main 2021-09-08T03:56:57.700Z] lifecycle (main): phase changed (value: 2)
[main 2021-09-08T03:56:57.700Z] windowsManager#open
[main 2021-09-08T03:56:57.700Z] windowsManager#open pathsToOpen [
  {
    backupPath: '/home/username/.config/Code/Backups/1627648141969',
    remoteAuthority: undefined
  }
]
[main 2021-09-08T03:56:57.701Z] IPC Object URL: Registered new channel vscode:8712f783-8fd0-43b6-ba00-e8a113a35665.
[main 2021-09-08T03:56:57.701Z] window#validateWindowState: validating window state on 1 display(s) { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[main 2021-09-08T03:56:57.702Z] window#validateWindowState: 1 monitor working area { x: 0, y: 44, width: 3840, height: 1556 }
[main 2021-09-08T03:56:57.702Z] window#ctor: using window state { mode: 1, x: 0, y: 73, width: 1920, height: 1527 }
[116562:0908/155657.730926:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155657.730937:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 1 time(s)
[main 2021-09-08T03:56:57.762Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 0, emptyToRestore: 1, emptyToOpen: 0)
[main 2021-09-08T03:56:57.763Z] lifecycle (main): phase changed (value: 3)
[main 2021-09-08T03:56:57.763Z] update#setState idle
[main 2021-09-08T03:56:57.763Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116623:0908/155657.783572:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116623:0908/155657.783656:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[main 2021-09-08T03:56:57.817Z] resolveShellEnv(): skipped (VSCODE_CLI is set)
[116562:0908/155657.884513:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155657.884530:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 2 time(s)
[116648:0908/155657.936418:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for swiftshader
[116648:0908/155657.936516:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is swiftshader
[116562:0908/155658.037659:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.037670:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 3 time(s)
[116661:0908/155658.040566:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116661:0908/155658.040626:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.127869:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.127885:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 4 time(s)
[116669:0908/155658.130209:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116669:0908/155658.130261:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.219955:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.219968:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 5 time(s)
[116681:0908/155658.222267:WARNING:vaapi_wrapper.cc(588)] VAAPI video acceleration not available for disabled
[116681:0908/155658.222328:ERROR:gpu_init.cc(440)] Passthrough is not supported, GL is disabled
[116562:0908/155658.312844:ERROR:gpu_process_host.cc(1007)] GPU process exited unexpectedly: exit_code=159
[116562:0908/155658.312859:WARNING:gpu_process_host.cc(1321)] The GPU process has crashed 6 time(s)
[116562:0908/155658.312869:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
/dev/fd/3: No such file or directory
Server response:
/dev/fd/3: No such file or directory
Server response:
deepak1556 commented 3 years ago

Thanks for the detailed report and linking the upstream issue, the fix looks simple enough to backport to older lines, I will update the fix for Electron 13. It is going to be while before we adopt Electron 14 as it depends on https://github.com/microsoft/vscode/issues/132282 and https://github.com/microsoft/vscode/issues/123592

deepak1556 commented 3 years ago

Backported at https://github.com/electron/electron/pull/30893

borgdylan commented 3 years ago

This issue still persists on the latest insiders. How do we workaround this until a fresh insiders release can be put out?

borgdylan commented 3 years ago

As a workaround I put code-insiders (and also azure data studio) on my PATH, and am launchign them from the terminal passing in --no-sandbox.

borgdylan commented 3 years ago

The latest insiders build still fails to launch without --no-sandbox. Ubuntu 21.10 is using systemd 248 (no teven 249) and will be in GA in the first week of October.

deepak1556 commented 3 years ago

@borgdylan can you open a separate issue for the behavior you are facing, it will be easier to collect the relevant logs and identify the issue. From what you have described it seems unrelated to this issue. Thanks for understanding!

borgdylan commented 3 years ago

@deepak1556 I opened https://github.com/microsoft/vscode/issues/133593

connor4312 commented 3 years ago

Marking as verified since it works with --no-sandbox, barring the new issue