Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nothing happens when running zed inside virtualbox client #22707

Open
1 task done
andrewcooke opened this issue Jan 6, 2025 · 6 comments
Open
1 task done

nothing happens when running zed inside virtualbox client #22707

andrewcooke opened this issue Jan 6, 2025 · 6 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@andrewcooke
Copy link

andrewcooke commented Jan 6, 2025

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

i am running in an opensuse leap 15.6 vm inside virtualbox on a host with the same os, using the latest version of zed (0.167.1). host graphics card is some radeon thing; i installed libvulkan_radeon. vm has 8GB of memory.

zed -v and zed -h work fine. but if i run zed alone, it just sits there. i can find no zed.log. if i run in the foreground there are no messages printed to the console. i am using gnome and see the same with x and wayland.

if i run with strace i see:

...
readlink("/home/andrew/.local/zed.app/libexec/zed-editor", 0x7fff01afd280, 1023) = -1 EINVAL (Invalid argument)
socket(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0) = 3
mkdir("/tmp/.tmpKKyaXP", 0777)          = 0
bind(3, {sa_family=AF_UNIX, sun_path="/tmp/.tmpKKyaXP/socket"}, 110) = 0
listen(3, 10)                           = 0
getrandom("\xb6\xff\xe3\x62\x0c\xf0\x13\x32\x18\xe8\x4b\x8f\xb0\x89\x89\xaf", 16, GRND_INSECURE) = 16
rt_sigaction(SIGRT_1, {sa_handler=0x7f6c1fca461e, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f6c1fc57980}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1f9ff000
mprotect(0x7f6c1fa00000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1fbff990, parent_tid=0x7f6c1fbff990, exit_signal=0, stack=0x7f6c1f9ff000, stack_size=0x1ffe40, tls=0x7f6c1fbff6c0} => {parent_tid=[20620]}, 88) = 20620
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1f7fe000
mprotect(0x7f6c1f7ff000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1f9fe990, parent_tid=0x7f6c1f9fe990, exit_signal=0, stack=0x7f6c1f7fe000, stack_size=0x1ffe40, tls=0x7f6c1f9fe6c0} => {parent_tid=[20621]}, 88) = 20621
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1ffee000
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_VFORK|CLONE_CLEAR_SIGHAND, exit_signal=SIGCHLD, stack=0x7f6c1ffee000, stack_size=0x9000}, 88) = 20622
munmap(0x7f6c1ffee000, 36864)           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(20622, 0x7fff01afd590, 0, NULL)   = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
--- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} ---

and the last couple of lines then repeat for a while before freezing.

Zed Version and System Specs

i am running in an opensuse leap 15.6 vm inside virtualbox on a host with the same os, using the latest version of zed (0.167.1). host graphics card is some radeon thing; i installed libvulkan_radeon. vm has 8GB of memory.

If applicable, add screenshots or screencasts of the incorrect state / behavior

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

@andrewcooke andrewcooke added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jan 6, 2025
@andrewcooke
Copy link
Author

i don't understand... but i returned to this after finding a reddit thread mentioning ZED_ALLOW_EMULATED_GPU.

after some messing around, i now find that on a fresh reboot i get useful diagnostics:

andrew@vbox:~> zed --foreground
thread 'main' panicked at crates/gpui/src/platform/linux/wayland/client.rs:465:47:
Unable to init GPU context: Platform(Init(ERROR_INITIALIZATION_FAILED))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
andrew@vbox:~> RUST_BACKTRACE=1 zed --foreground
thread 'main' panicked at crates/gpui/src/platform/linux/wayland/client.rs:465:47:
Unable to init GPU context: Platform(Init(ERROR_INITIALIZATION_FAILED))

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: gpui::platform::blade::blade_context::BladeContext::new
   2: gpui::platform::linux::wayland::client::WaylandClient::new
   3: gpui::platform::current_platform
   4: gpui::app::App::new
   5: zed::main
   6: std::sys::backtrace::__rust_begin_short_backtrace
   7: std::rt::lang_start::{{closure}}
   8: std::rt::lang_start_internal
   9: main
  10: __libc_start_call_main
  11: __libc_start_main@@GLIBC_2.34
  12: _start
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: gpui::platform::linux::wayland::client::WaylandClient::new
   4: gpui::platform::current_platform
   5: gpui::app::App::new
   6: zed::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@andrewcooke
Copy link
Author

and using X:

andrew@vbox:~> RUST_BACKTRACE=1 zed --foreground
thread 'main' panicked at crates/gpui/src/platform/linux/x11/client.rs:374:47:
Unable to init GPU context: Platform(Init(ERROR_INITIALIZATION_FAILED))

Stack backtrace:
   0: anyhow::error::<impl anyhow::Error>::msg
   1: gpui::platform::blade::blade_context::BladeContext::new
   2: gpui::platform::linux::x11::client::X11Client::new
   3: gpui::platform::current_platform
   4: gpui::app::App::new
   5: zed::main
   6: std::sys::backtrace::__rust_begin_short_backtrace
   7: std::rt::lang_start::{{closure}}
   8: std::rt::lang_start_internal
   9: main
  10: __libc_start_call_main
  11: __libc_start_main@@GLIBC_2.34
  12: _start
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: gpui::platform::linux::x11::client::X11Client::new
   4: gpui::platform::current_platform
   5: gpui::app::App::new
   6: zed::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@grandchild
Copy link

grandchild commented Jan 9, 2025

Same problem on regular (i.e. non-virtualized) Archlinux laptop, running Wayland/Sway, with NVIDIA GPU.

$ pacman -Q zed
zed 0.168.2-1

@andrewcooke
Copy link
Author

huh. thanks. in that case it must be either a very common failure point, or we're doing something similarly wrong. maybe a bad version or missing install. i will try build from source when i have a moment.

@andrewcooke
Copy link
Author

building on opensuse leap is non-trivial. too many dependencies are new for such a "boring" os. i will try again later with fedora or similar (maybe things will just work there...)

@andrewcooke
Copy link
Author

andrewcooke commented Jan 9, 2025

and it works just fine on fedora (well, apart from a warning saying it sucks on vms). i guess i will leave this up and the devs can decide what to do. i suspect opensuse leap just had too old libraries.

edit: also works on rocky 9 which seems a bit more stable than fedora

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

2 participants