zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.98k stars 2.83k forks source link

crashes on linux with vulkan-nouveau #12696

Closed kojq closed 3 months ago

kojq commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

It crashes shortly after opening sometimes or after interacting with the UI (on Arch Linux, Hyprland, and using AMD and nouveau). I believe it occurs when using vulkan-nouveau from mesa.

v0.139.0-pre (also occurs on previous stable or preview releases)

[2024-06-05T13:40:01-05:00 ERROR auto_update] auto-update failed: error:error deserializing release

Caused by:
    expected value at line 1 column 1
[2024-06-05T13:40:01-05:00 ERROR util] crates/assistant/src/assistant_panel.rs:144: Failed to deserialize UserPrompt: invalid type: integer `0`, expected a string at line 1 column 64
[2024-06-05T13:41:43-05:00 ERROR Zed::reliability] {
  "thread": "main",
  "payload": "GPU has crashed, and no debug information is available.",
  "location_data": {
    "file": "/build/.cargo/git/checkouts/blade-b2bcd1de1cf7ab6a/e35b2d4/blade-graphics/src/vulkan/command.rs",
    "line": 444
  },
  "backtrace": [
    "__libc_start_main"
  ],
  "app_version": "1.0.0",
  "release_channel": "Zed",
  "os_name": "Linux",
  "os_version": "1.0.0",
  "architecture": "x86_64",
  "panicked_on": 1717612903106,
  "installation_id": "1179c803-a0c3-4063-bae2-bff618ebfe8a",
  "session_id": "302c6287-29d3-427f-a282-33dcf0cef0f2"
}
Aborted (core dumped)

Environment

Zed: v1.0.0 (Zed)
OS: Linux 1.0.0
Memory: 15 GiB
Architecture: x86_64

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

ognevny commented 4 months ago

I get crashes on zed 0.138.4 (stable). don't have nouveau drivers, but also use Wayland. I can't get any helpful info in logs

jansol commented 4 months ago

Since this is with the nouveau driver, it'd be good to know what Mesa version you are using (run vulkaninfo | grep driver and share at least all driverID, driverName and driverInfo lines it reports, driverVersion may also be helpful). As for logs, you might see something "drm" or gpu-related in the kernel log: run sudo dmesg or sudo journalctl -e and scroll up a bit.

ognevny commented 4 months ago

vulkaninfo:

VK_LUNARG_direct_driver_loading        : extension revision 1
    driverVersion     = 24.1.0 (100667392)
    driverID        = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
    driverName      = Intel open-source Mesa driver
    driverInfo      = Mesa 24.1.0-arch1.1
    driverUUID      = c89bffd6-d122-86fe-d82a-0550350dce5c
    VK_KHR_driver_properties                      : extension revision 1

I didn't get crash recently, so I can't provide logs now. I'll update the message update:

stack trace ``` Process 6561 (Zed) of user 1000 dumped core. Stack trace of thread 6561: #0 0x00007ecc0a09ee44 n/a (libc.so.6 + 0x94e44) #1 0x00007ecc0a046a30 raise (libc.so.6 + 0x3ca30) #2 0x00007ecc0a02e4c3 abort (libc.so.6 + 0x244c3) #3 0x00005f4f8971543a n/a (Zed + 0x371643a) #4 0x00005f4f8664e51a n/a (Zed + 0x64f51a) #5 0x00005f4f868289f8 n/a (Zed + 0x8299f8) #6 0x00005f4f8970d7d9 n/a (Zed + 0x370e7d9) #7 0x00005f4f8970d526 n/a (Zed + 0x370e526) #8 0x00005f4f8970bb79 n/a (Zed + 0x370cb79) #9 0x00005f4f8970d287 n/a (Zed + 0x370e287) #10 0x00005f4f864f2706 n/a (Zed + 0x4f3706) #11 0x00005f4f86d87249 n/a (Zed + 0xd88249) #12 0x00005f4f8839042a n/a (Zed + 0x239142a) #13 0x00005f4f88369151 n/a (Zed + 0x236a151) #14 0x00005f4f883ad204 n/a (Zed + 0x23ae204) #15 0x00005f4f883ac242 n/a (Zed + 0x23ad242) #16 0x00005f4f8836598c n/a (Zed + 0x236698c) #17 0x00005f4f883556ab n/a (Zed + 0x23566ab) #18 0x00005f4f8808e70e n/a (Zed + 0x208f70e) #19 0x00005f4f880840b7 n/a (Zed + 0x20850b7) #20 0x00005f4f88353a35 n/a (Zed + 0x2354a35) #21 0x00005f4f88339913 n/a (Zed + 0x233a913) #22 0x00005f4f8680e60c n/a (Zed + 0x80f60c) #23 0x00005f4f8690116c n/a (Zed + 0x90216c) #24 0x00005f4f868e3276 n/a (Zed + 0x8e4276) #25 0x00005f4f868677ec n/a (Zed + 0x8687ec) #26 0x00005f4f896fad5c n/a (Zed + 0x36fbd5c) #27 0x00005f4f86902f14 n/a (Zed + 0x903f14) #28 0x00007ecc0a02fc88 n/a (libc.so.6 + 0x25c88) #29 0x00007ecc0a02fd4c __libc_start_main (libc.so.6 + 0x25d4c) #30 0x00005f4f86711bf5 n/a (Zed + 0x712bf5) ```
kojq commented 4 months ago

vulkaninfo | grep driver

VK_LUNARG_direct_driver_loading        : extension revision 1
driverVersion     = 24.1.1 (100667393)
driverID        = DRIVER_ID_MESA_NVK
driverName      = NVK
driverInfo      = Mesa 24.1.1-arch1.1
driverUUID      = 70c46296-cf29-6da9-9ab3-1a97c8334ebd
driverUUID                        = 70c46296-cf29-6da9-9ab3-1a97c8334ebd
driverID                                             = DRIVER_ID_MESA_NVK
driverName                                           = NVK
driverInfo                                           = Mesa 24.1.1-arch1.1
VK_KHR_driver_properties                    : extension revision 1
driverVersion     = 24.1.1 (100667393)
driverID        = DRIVER_ID_MESA_RADV
driverName      = radv
driverInfo      = Mesa 24.1.1-arch1.1
driverUUID      = 414d442d-4d45-5341-2d44-525600000000
driverUUID                        = 414d442d-4d45-5341-2d44-525600000000
driverID                                             = DRIVER_ID_MESA_RADV
driverName                                           = radv
driverInfo                                           = Mesa 24.1.1-arch1.1
VK_KHR_driver_properties                      : extension revision 1

doas dmesg | grep nouveau

[    0.000000] Command line: initrd=\amd-ucode.img initrd=\intel-ucode.img initrd=\booster-linux-zen.img root=PARTLABEL=ARCH nouveau.config=NvGspRm=1 lockdown=integrity zswap.enabled=0 rootfstype=bcachefs rw
[    0.031010] Kernel command line: initrd=\amd-ucode.img initrd=\intel-ucode.img initrd=\booster-linux-zen.img root=PARTLABEL=ARCH nouveau.config=NvGspRm=1 lockdown=integrity zswap.enabled=0 rootfstype=bcachefs rw
[    2.811756] nouveau: detected PR support, will not use DSM
[    2.811783] nouveau 0000:01:00.0: enabling device (0000 -> 0003)
[    2.812016] nouveau 0000:01:00.0: NVIDIA GA106 (b76000a1)
[    3.097610] nouveau 0000:01:00.0: bios: version 94.06.15.00.7a
[    5.019728] nouveau 0000:01:00.0: DRM: VRAM: 6144 MiB
[    5.019731] nouveau 0000:01:00.0: DRM: GART: 536870912 MiB
[    5.084971] nouveau 0000:01:00.0: DRM: MM: using COPY for buffer copies
[    5.120615] snd_hda_intel 0000:01:00.1: bound 0000:01:00.0 (ops nv50_audio_component_bind_ops [nouveau])
[    5.123281] [drm] Initialized nouveau 1.4.0 20120801 for 0000:01:00.0 on minor 1
[    5.126668] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.133591] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.134133] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[  388.696593] nouveau 0000:01:00.0: gsp: mmu fault queued
[  388.861741] nouveau 0000:01:00.0: gsp: rc engn:00000001 chid:40 type:31 scope:1 part:233
[  388.861764] nouveau 0000:01:00.0: fifo:c00000:0005:0028:[Zed[1867]] errored - disabling channel
[  388.861780] nouveau 0000:01:00.0: Zed[1867]: channel 40 killed!

doas dmesg | grep drm

[    0.401164] ACPI: bus type drm_connector registered
[    0.403158] [drm] Initialized simpledrm 1.0.0 20200625 for simple-framebuffer.0 on minor 0
[    0.478536] simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device
[    1.876548] systemd[1]: Starting Load Kernel Module drm...
[    1.887980] systemd[1]: modprobe@drm.service: Deactivated successfully.
[    1.888103] systemd[1]: Finished Load Kernel Module drm.
[    4.142388] [drm] amdgpu kernel modesetting enabled.
[    4.153544] [drm] initializing kernel modesetting (RENOIR 0x1002:0x1638 0x1043:0x1722 0xC4).
[    4.154322] [drm] register mmio base: 0xFC500000
[    4.154323] [drm] register mmio size: 524288
[    4.157257] [drm] add ip block number 0 <soc15_common>
[    4.157259] [drm] add ip block number 1 <gmc_v9_0>
[    4.157261] [drm] add ip block number 2 <vega10_ih>
[    4.157262] [drm] add ip block number 3 <psp>
[    4.157263] [drm] add ip block number 4 <smu>
[    4.157264] [drm] add ip block number 5 <dm>
[    4.157265] [drm] add ip block number 6 <gfx_v9_0>
[    4.157266] [drm] add ip block number 7 <sdma_v4_0>
[    4.157268] [drm] add ip block number 8 <vcn_v2_0>
[    4.157269] [drm] add ip block number 9 <jpeg_v2_0>
[    4.160904] [drm] VCN decode is enabled in VM mode
[    4.160906] [drm] VCN encode is enabled in VM mode
[    4.162326] [drm] JPEG decode is enabled in VM mode
[    4.180784] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
[    4.180799] [drm] Detected VRAM RAM=512M, BAR=512M
[    4.180800] [drm] RAM width 128bits DDR4
[    4.180905] [drm] amdgpu: 512M of VRAM memory ready
[    4.180907] [drm] amdgpu: 7694M of GTT memory ready.
[    4.180920] [drm] GART: num cpu pages 262144, num gpu pages 262144
[    4.181044] [drm] PCIE GART of 1024M enabled.
[    4.181046] [drm] PTB located at 0x000000F41FC00000
[    4.181559] [drm] Loading DMUB firmware via PSP: version=0x01010028
[    4.181983] [drm] Found VCN firmware Version ENC: 1.21 DEC: 7 VEP: 0 Revision: 3
[    5.030754] [drm] Display Core v3.2.273 initialized on DCN 2.1
[    5.030757] [drm] DP-HDMI FRL PCON supported
[    5.031293] [drm] DMUB hardware initialized: version=0x01010028
[    5.123281] [drm] Initialized nouveau 1.4.0 20120801 for 0000:01:00.0 on minor 1
[    5.126668] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.133591] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.134133] nouveau 0000:01:00.0: [drm] Cannot find any crtc or sizes
[    5.189518] [drm] kiq ring mec 2 pipe 1 q 0
[    5.192557] [drm] VCN decode and encode initialized successfully(under DPG Mode).
[    5.192577] [drm] JPEG decode initialized successfully.
[    5.214259] [drm] Initialized amdgpu 3.57.0 20150101 for 0000:04:00.0 on minor 2
[    5.220698] fbcon: amdgpudrmfb (fb0) is primary device
[    5.221320] [drm] DSC precompute is not needed.
[    5.242877] amdgpu 0000:04:00.0: [drm] fb0: amdgpudrmfb frame buffer device
jansol commented 3 months ago
[  388.696593] nouveau 0000:01:00.0: gsp: mmu fault queued
[  388.861741] nouveau 0000:01:00.0: gsp: rc engn:00000001 chid:40 type:31 scope:1 part:233
[  388.861764] nouveau 0000:01:00.0: fifo:c00000:0005:0028:[Zed[1867]] errored - disabling channel
[  388.861780] nouveau 0000:01:00.0: Zed[1867]: channel 40 killed!

Yeah that sounds like a (kernel) driver issue. I would report it to https://gitlab.freedesktop.org/drm/nouveau/-/issues

kojq commented 3 months ago

Will close and reopen as needed.