zed icon indicating copy to clipboard operation
zed copied to clipboard

Zed crashing the display driver

Open DeprecatedLuke opened this issue 10 months ago • 4 comments

Summary

~~On linux kde neon 6.3 using and amd gpu when opening the extensions menu the display driver will crash.~~

Description

  1. Navigate to the extensions menu
  2. Search anything
  3. Screens go back (presumably display driver crashing)

Actual Behavior: - Expected Behavior: -

~~Interestingly enough this does not happen with any other application which leads me to believe it's one of the low level features sending commands with excessive bounds or just malformed commands that soft-fail on other display drivers.~~

~~There's no useful logs in zed or dmesg due to the nature of gpu display drivers crashing which are typically only possible to debug with running the kernel in highly verbose mode. Was wondering if there's someone that has experienced similar issues before I go poking around in the mesa/amd drivers.~~

~~It could also be wayland crashing, but same issue happens on x11 so doubtful, wayland-x11 could also be related?~~

On linux it seems to memory leak 100+GB. Navigation makes it exponentially worse.

Zed Version and System Specs

Zed: v0.183.10 (Zed) OS: Linux Wayland ubuntu 24.04 Memory: 93.7 GiB Architecture: x86_64 GPU: AMD Radeon RX 7600 (RADV NAVI33) || radv || Mesa 24.2.8-1ubuntu1~24.04.1

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

Zed.log
2025-02-22T07:36:19.997533275+02:00 [INFO] ========== starting zed ==========
2025-02-22T07:36:20.648790151+02:00 [INFO] Compositor detection: _NET_WM_CM_S?=false, _NET_WM_CM_OWNER=false, _NET_SUPPORTING_WM_CHECK=true
2025-02-22T07:36:20.64882434+02:00 [INFO] x11: compositor present: true, gtk_frame_extents_supported: true
2025-02-22T07:36:20.786427396+02:00 [INFO] Presentation support: "VK_KHR_wayland_surface"
2025-02-22T07:36:20.786454587+02:00 [INFO] Presentation support: "VK_KHR_xcb_surface"
2025-02-22T07:36:20.786461025+02:00 [INFO] Presentation support: "VK_KHR_xlib_surface"
2025-02-22T07:36:20.786468294+02:00 [INFO] Enabling Vulkan Portability
2025-02-22T07:36:20.786474174+02:00 [INFO] Enabling color space support
2025-02-22T07:36:20.798060694+02:00 [INFO] Adapter: "AMD Radeon RX 7600 (RADV NAVI33)"
2025-02-22T07:36:20.798097834+02:00 [INFO] Ray tracing is supported
2025-02-22T07:36:20.800620359+02:00 [INFO] perform;
2025-02-22T07:36:20.800638875+02:00 [INFO] authenticate;
2025-02-22T07:36:20.800663813+02:00 [INFO] read_command;
2025-02-22T07:36:20.800715272+02:00 [INFO] send_secondary_commands;
2025-02-22T07:36:20.800789622+02:00 [INFO] Opening main db
2025-02-22T07:36:20.801199125+02:00 [INFO] new;
2025-02-22T07:36:20.801218904+02:00 [INFO] socket reader;
2025-02-22T07:36:20.8016174+02:00 [INFO] keep_updated;
2025-02-22T07:36:20.803969358+02:00 [INFO] Opening main db
2025-02-22T07:36:20.806261928+02:00 [INFO] Using git binary path: None
2025-02-22T07:36:20.825463009+02:00 [INFO] No prompt template overrides directory found at /home/luk/.local/share/zed/prompt_overrides. Using built-in prompts.
2025-02-22T07:36:20.827156173+02:00 [INFO] activate is not implemented on Linux, ignoring the call
2025-02-22T07:36:20.82849129+02:00 [INFO] Opening main db
2025-02-22T07:36:20.828721498+02:00 [INFO] perform;
2025-02-22T07:36:20.828733444+02:00 [INFO] authenticate;
2025-02-22T07:36:20.82875649+02:00 [INFO] read_command;
2025-02-22T07:36:20.829289126+02:00 [INFO] socket reader;
2025-02-22T07:36:20.846372887+02:00 [INFO] Using Visual { id: 184, colormap: 0, depth: 32 }
2025-02-22T07:36:20.84638829+02:00 [INFO] Creating colormap 169869315
2025-02-22T07:36:20.84844694+02:00 [INFO] Using surface present mode MAILBOX
2025-02-22T07:36:20.849285851+02:00 [INFO] Creating a descriptor pool for at most 16 sets
2025-02-22T07:36:20.849308493+02:00 [INFO] Creating a descriptor pool for at most 16 sets
2025-02-22T07:36:20.849321282+02:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored }
2025-02-22T07:36:20.90678696+02:00 [INFO] Refreshing at 16666 micros
2025-02-22T07:36:20.90772263+02:00 [INFO] Using GPU: GpuSpecs { is_software_emulated: false, device_name: "AMD Radeon RX 7600 (RADV NAVI33)", driver_name: "radv", driver_info: "Mesa 24.2.8-1ubuntu1~24.04.1" }
2025-02-22T07:36:20.913591518+02:00 [INFO] Opening main db
2025-02-22T07:36:20.947978469+02:00 [ERROR] missing field `name` at line 17 column 1
2025-02-22T07:36:20.948012795+02:00 [ERROR] Is a directory (os error 21)
2025-02-22T07:36:21.029131644+02:00 [INFO] rebuilt extension index in 750.836µs
2025-02-22T07:36:21.081310025+02:00 [INFO] set environment variables from shell:/usr/bin/zsh, path:/home/luk/.local/bin:/home/luk/.local/bin:/home/luk/.deno/bin:~/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/luk/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/bin:/home/luk/.fzf/bin
2025-02-22T07:36:23.522374105+02:00 [INFO] Node runtime install_if_needed
2025-02-22T07:36:25.294155384+02:00 [INFO] starting language server process. binary path: "/home/luk/.local/share/zed/node/node-v22.5.1-linux-x64/bin/node", working directory: "/", args: ["/home/luk/.local/share/zed/copilot/copilot-v0.7.0/dist/language-server.js", "--stdio"]
2025-02-22T07:36:25.650185147+02:00 [INFO] Using surface present mode MAILBOX
2025-02-22T07:36:25.650226907+02:00 [INFO] Retaining current format: Bgra8UnormSrgb
2025-02-22T07:36:25.67901385+02:00 [INFO] Using surface present mode MAILBOX
2025-02-22T07:36:25.679041163+02:00 [INFO] Retaining current format: Bgra8UnormSrgb
2025-02-22T07:36:25.708177969+02:00 [INFO] Using surface present mode MAILBOX
2025-02-22T07:36:25.708198267+02:00 [INFO] Retaining current format: Bgra8UnormSrgb

DeprecatedLuke avatar Apr 25 '25 03:04 DeprecatedLuke

Hmm, I wonder if the issue is that we completely consume some resource such as GPU, CPU, or RAM, causing the screen to go black but no errors to show up in the kernel log. It might be worth looking into some way of tracking GPU, CPU, etc usage levels over time and seeing if any of them spike before the screen goes black.

Additionally, I recommend taking a look at syslog or systemd logs in user space to look for user-space issues as it may be the X11/wayland server crashing outside of the kernel

probably-neb avatar Apr 29 '25 15:04 probably-neb

Looks like it doesn't happen anymore after updating to latest versions for everything so it was either mesa, zed or wayland 🤷.

DeprecatedLuke avatar May 01 '25 14:05 DeprecatedLuke

Looks like it was something entirely different, zed is using up all the memory >150gb!! which OOM killed plasmashell which made the screens go black. Need instructions on how to get diagnostic information.

DeprecatedLuke avatar May 04 '25 19:05 DeprecatedLuke

It's also crashing my gpu on cachyos with latest updates when selecting text. Just open a file and use the mouse to select any text.

duckarp avatar May 15 '25 11:05 duckarp

Hey @duckarp that's probably #23288 or a different GPU related issue. Please create a new issue if no existing issues seem to be the same problem you're having

@DeprecatedLuke, is the issue still occurring only when searching extensions? There are a few memory leak issues open currently, I recommend searching through them and seeing if any of them seem applicable. If none do we can work to figure out where the excess memory usage is coming from in your case

probably-neb avatar May 22 '25 08:05 probably-neb

Appears to be fixed.

DeprecatedLuke avatar May 22 '25 11:05 DeprecatedLuke