microsoft / vscode

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

Immediate crash when opening VSCode on Fedora 40: code 133 and other instabilities #224673

Open irm-codebase opened 3 months ago

irm-codebase commented 3 months ago

Type: Bug

Steps to Reproduce:

  1. Install VSCode (I used these instructions)
  2. Try to open it. The app may show the following:
    • Crash with code 133. Interestingly, clicking "NewWindow" will fail endlessly. You need to close the program and re-run it... and hope it does not crash again! This happens roughly 50% of the time.
    • Random plugin fails (code spell checker, Ruff, MyPy...). I am not entirely sure if this one is related, but I thought it would be good to mention it.

Crash screen: image

VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Linux x64 6.9.12-200.fc40.x86_64 Modes:

System Info |Item|Value| |---|---| |CPUs|13th Gen Intel(R) Core(TM) i7-13700H (20 x 400)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off| |Load (avg)|1, 1, 1| |Memory (System)|15.25GB (9.63GB free)| |Process Argv|| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|gnome| |XDG_CURRENT_DESKTOP|GNOME| |XDG_SESSION_DESKTOP|gnome| |XDG_SESSION_TYPE|wayland|
Extensions (32) Extension|Author (truncated)|Version ---|---|--- markdown-mermaid|bie|1.23.1 catppuccin-vsc|Cat|3.15.0 catppuccin-vsc-icons|Cat|1.13.0 ruff|cha|2024.36.0 file-tree-to-text-generator|d-k|1.4.0 vscode-markdownlint|Dav|0.55.0 EditorConfig|Edi|0.16.4 remotehub|Git|0.62.0 vscode-drawio|hed|1.6.6 compareit|in4|0.0.2 mypy|mat|0.3.1 rainbow-csv|mec|3.12.0 git-graph|mhu|1.30.0 debugpy|ms-|2024.10.0 python|ms-|2024.13.2024080201 vscode-pylance|ms-|2024.7.1 jupyter|ms-|2024.7.0 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.19 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-ssh|ms-|0.112.0 remote-ssh-edit|ms-|0.86.0 azure-repos|ms-|0.38.0 remote-explorer|ms-|0.4.3 remote-repositories|ms-|0.40.0 autodocstring|njp|0.6.1 vscode-yaml|red|1.15.0 snakemake-lang|sna|0.1.8 code-spell-checker|str|3.0.1 code-spell-checker-british-english|str|1.4.10 even-better-toml|tam|0.19.2
irm-codebase commented 3 months ago

I did try to search in older issues for this crash code, and found several. Unfortunately I could not identify an easy fix on my side... sorry!

Some possibly related issues: #224618

gjsjohnmurray commented 3 months ago

Please try launching with the --disable-extensions command line argument. Is it still unstable?

irm-codebase commented 3 months ago

@gjsjohnmurray yeeeep

image

I was going to do several tries... but it failed at the first one! (Ignore the bare code above it, I was trying to see if it failed from terminal without --disable-extensions)

irm-codebase commented 3 months ago

Tried running it 10 times for completeness. Crashed 2/10. So it's definitely not the extensions.

gjsjohnmurray commented 3 months ago

Please use the steps at https://github.com/microsoft/vscode/wiki/Native-Crash-Issues to get more info for one of the team to look at next week.

irm-codebase commented 3 months ago

@gjsjohnmurray done (it was on the "pending" folder).

command used: code --disable-extensions --crash-reporter-directory [some-path]

I should note that the failure code was 132 in this case. dump.zip

irm-codebase commented 3 months ago

Did another one with extensions enabled: code --crash-reporter-directory [some-path] Code was also 132.

fa3bcfd7-5950-4e41-b8cf-2c1aedd72c91.zip

abc-nix commented 3 months ago

See if it runs using x11 Ozone Platform

ELECTRON_OZONE_PLATFORM_HINT="x11" code

It also crashes for me on sway (when I open the top menu or right-click, with no error message), but not on x11 mode.

peacepenguin commented 3 months ago

Same issue occuring here. fedora 40, gnome, default install. amdgpu, no 3rd party repos in the OS, no extensions loaded. Happens very regularly on launch of code in the past couple weeks.

albertgasset commented 3 months ago

The cause is this selinux/kernel bug affecting all chromium based apps: https://bugzilla.redhat.com/show_bug.cgi?id=2254434

A workaround is to set SELinux to permissive until the bug is fixed.

bhaveshpatel-developer commented 2 months ago

Having the same issue from last 2 weeks. Tried with disabled the plugins but still have same issue. after re-open, several plugins are not working. 2024-08-21_14-54

Version: 1.92.2
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.8.0-40-generic snap
albertgasset commented 2 months ago

The upcoming update of the kernel for Fedora 40 (now in testing) includes a patch that fixes the selinux bug: https://koji.fedoraproject.org/koji/buildinfo?buildID=2532093

irm-codebase commented 2 months ago

@albertgasset do you know if this will help with stability in general? I've been noticing that other apps also fail at random

albertgasset commented 2 months ago

@irm-codebase The selinux bug affects Chromium and apps using Electron.