Hi, i am making this mail or issue (i don't think this belongs on the issue tracker, but i am unsure) on behalf of someone else, currently i am a bit baffled by the fact that some issues can occur depending on the backend used:
go run --tags nox11,novulkan gioui.org/example/hello@latest
runs
successfullygo run --tags nox11,noopengl gioui.org/example/hello@latest
causes
'vulkan: no suitable device found'go run --tags nowayland,novulkan gioui.org/example/hello@latest
causes a panic backtrace, provided as an attachmentgo run --tags nowayland,noopengl gioui.org/example/hello@latest
causes 'x11: no available GPU backendsfor some information on the user's environment, they are using Wayland, 'vkcube' and 'glxgears' runs as normal. They are also using an Nvidia GPU, which most of the people that are running this seem to face the issue from.
Maybe this is an issue due to Nvidia's egl-wayland?
Please paste the panic here; attachments are ignored by the issue tracker.
I don't know what causes Gio to report no available backends. You'll have to dig into https://git.sr.ht/~eliasnaur/gio/tree/main/item/app/os_wayland.go#L1747 or the corresponding X11 method to find out more.
On 2023-10-21 17:20, ~eliasnaur wrote:
Please paste the panic here; attachments are ignored by the issue tracker.
SIGSEGV: segmentation violation PC=0x7f95ba49ff84 m=4 sigcode=1 signal arrived during cgo execution goroutine 21 [syscall]: runtime.cgocall(0x65bc30, 0xc00068c778) /usr/lib/go/src/runtime/cgocall.go:157 +0x4b fp=0xc00068c750 sp=0xc00068c718 pc=0x40776b gioui.org/internal/egl._Cfunc_eglGetDisplay(0x7f9564003d10) _cgo_gotypes.go:182 +0x48 fp=0xc00068c778 sp=0xc00068c750 pc=0x52a748 gioui.org/internal/egl.NewContext.eglGetDisplay.func1(0x20?) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/internal/egl/egl_unix.go:99 +0x34 fp=0xc00068c7b0 sp=0xc00068c778 pc=0x528f34 gioui.org/internal/egl.eglGetDisplay(...) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/internal/egl/egl_unix.go:99 gioui.org/internal/egl.NewContext(0xc000050c00?) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/internal/egl/egl.go:80 +0x18 fp=0xc00068c808 sp=0xc00068c7b0 pc=0x528d98 gioui.org/app.init.1.func1(0xc000098000) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/egl_x11.go:24 +0x25 fp=0xc00068c830 sp=0xc00068c808 pc=0x659e65 gioui.org/app.(*x11Window).NewContext(0x10?) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/os_x11.go:133 +0x27 fp=0xc00068c850 sp=0xc00068c830 pc=0x6544e7 gioui.org/app.(*Window).validateAndProcess(0xc000110e00, {0x7c8bc8, 0xc000098000}, {0x9?, 0x0?}, 0xf8?, 0x0?, 0xc000103aa0) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:225 +0xf2 fp=0xc00068c918 sp=0xc00068c850 pc=0x64c572 gioui.org/app.(*Window).processEvent(0xc000110e00, {0x7c8bc8, 0xc000098000}, {0x7c53b8, 0xc00009c120}) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:881 +0xeac fp=0xc00068ccf0 sp=0xc00068c918 pc=0x64f8cc gioui.org/app.(*callbacks).Event(0xc000111320, {0x7c53b8?, 0xc00009c120?}) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:476 +0x126 fp=0xc00068cdb0 sp=0xc00068ccf0 pc=0x64d7a6 gioui.org/app.(*x11Window).loop(0xc000098000) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/os_x11.go:460 +0x3b9 fp=0xc00068cf50 sp=0xc00068cdb0 pc=0x656ab9 gioui.org/app.newX11Window.func12() /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/os_x11.go:834 +0x18f fp=0xc00068cfe0 sp=0xc00068cf50 pc=0x658d2f runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00068cfe8 sp=0xc00068cfe0 pc=0x465901 created by gioui.org/app.newX11Window in goroutine 7 /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/os_x11.go:826 +0x8c7 goroutine 1 [select (no cases)]: runtime.gopark(0x441c00?, 0x77d7e0?, 0xa0?, 0x61?, 0x65ab9a?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00005fef8 sp=0xc00005fed8 pc=0x4398ce runtime.block() /usr/lib/go/src/runtime/select.go:103 +0x26 fp=0xc00005ff28 sp=0xc00005fef8 pc=0x448a66 gioui.org/app.osMain(...) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/os_unix.go:43 gioui.org/app.Main(...) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/app.go:64 main.main() /home/vnuxa/go/pkg/mod/gioui.org/example@v0.3.1/hello/hello.go:29 +0x25 fp=0xc00005ff40 sp=0xc00005ff28 pc=0x65aba5 runtime.main() /usr/lib/go/src/runtime/proc.go:267 +0x2bb fp=0xc00005ffe0 sp=0xc00005ff40 pc=0x43947b runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00005ffe8 sp=0xc00005ffe0 pc=0x465901 goroutine 2 [force gc (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004afa8 sp=0xc00004af88 pc=0x4398ce runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:404 runtime.forcegchelper() /usr/lib/go/src/runtime/proc.go:322 +0xb3 fp=0xc00004afe0 sp=0xc00004afa8 pc=0x439753 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004afe8 sp=0xc00004afe0 pc=0x465901 created by runtime.init.6 in goroutine 1 /usr/lib/go/src/runtime/proc.go:310 +0x1a goroutine 3 [GC sweep wait]: runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004b778 sp=0xc00004b758 pc=0x4398ce runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:404 runtime.bgsweep(0x0?) /usr/lib/go/src/runtime/mgcsweep.go:321 +0xdf fp=0xc00004b7c8 sp=0xc00004b778 pc=0x4260ff runtime.gcenable.func1() /usr/lib/go/src/runtime/mgc.go:200 +0x25 fp=0xc00004b7e0 sp=0xc00004b7c8 pc=0x41b445 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004b7e8 sp=0xc00004b7e0 pc=0x465901 created by runtime.gcenable in goroutine 1 /usr/lib/go/src/runtime/mgc.go:200 +0x66 goroutine 4 [GC scavenge wait]: runtime.gopark(0xc000074000?, 0x7c1ba0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004bf70 sp=0xc00004bf50 pc=0x4398ce runtime.goparkunlock(...) /usr/lib/go/src/runtime/proc.go:404 runtime.(*scavengerState).park(0xb90e80) /usr/lib/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc00004bfa0 sp=0xc00004bf70 pc=0x423949 runtime.bgscavenge(0x0?) /usr/lib/go/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc00004bfc8 sp=0xc00004bfa0 pc=0x423ef9 runtime.gcenable.func2() /usr/lib/go/src/runtime/mgc.go:201 +0x25 fp=0xc00004bfe0 sp=0xc00004bfc8 pc=0x41b3e5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004bfe8 sp=0xc00004bfe0 pc=0x465901 created by runtime.gcenable in goroutine 1 /usr/lib/go/src/runtime/mgc.go:201 +0xa5 goroutine 5 [finalizer wait]: runtime.gopark(0x0?, 0x77d888?, 0xc0?, 0x60?, 0x2000000020?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004c628 sp=0xc00004c608 pc=0x4398ce runtime.runfinq() /usr/lib/go/src/runtime/mfinal.go:193 +0x107 fp=0xc00004c7e0 sp=0xc00004c628 pc=0x41a4c7 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004c7e8 sp=0xc00004c7e0 pc=0x465901 created by runtime.createfing in goroutine 1 /usr/lib/go/src/runtime/mfinal.go:163 +0x3d goroutine 6 [chan receive]: runtime.gopark(0x0?, 0xc00009c1e0?, 0x0?, 0x0?, 0xc00018bb98?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00018bb48 sp=0xc00018bb28 pc=0x4398ce runtime.chanrecv(0xc000103aa0, 0x0, 0x1) /usr/lib/go/src/runtime/chan.go:583 +0x3cd fp=0xc00018bbc0 sp=0xc00018bb48 pc=0x409b4d runtime.chanrecv1(0x0?, 0x0?) /usr/lib/go/src/runtime/chan.go:442 +0x12 fp=0xc00018bbe8 sp=0xc00018bbc0 pc=0x409752 gioui.org/app.(*Window).update(...) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:208 gioui.org/app.(*Window).update-fm(0x0?) <autogenerated>:1 +0x45 fp=0xc00018bc18 sp=0xc00018bbe8 pc=0x65a7c5 main.loop(0xc000110e00) /home/vnuxa/go/pkg/mod/gioui.org/example@v0.3.1/hello/hello.go:48 +0x3f1 fp=0xc00018bfa8 sp=0xc00018bc18 pc=0x65afb1 main.main.func1() /home/vnuxa/go/pkg/mod/gioui.org/example@v0.3.1/hello/hello.go:24 +0x1f fp=0xc00018bfe0 sp=0xc00018bfa8 pc=0x65b07f runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00018bfe8 sp=0xc00018bfe0 pc=0x465901 created by main.main in goroutine 1 /home/vnuxa/go/pkg/mod/gioui.org/example@v0.3.1/hello/hello.go:22 +0x1a goroutine 7 [select]: runtime.gopark(0xc00005af50?, 0x5?, 0x0?, 0x0?, 0xc00005aeee?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00005ad80 sp=0xc00005ad60 pc=0x4398ce runtime.selectgo(0xc00005af50, 0xc00005aee4, 0x4?, 0x0, 0x4619ee?, 0x1) /usr/lib/go/src/runtime/select.go:327 +0x725 fp=0xc00005aea0 sp=0xc00005ad80 pc=0x4491a5 gioui.org/app.(*Window).run(0xc000110e00, {0xc00006ac00?, 0xc00004a766?, 0xc00004a7b8?}) /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:961 +0x1b9 fp=0xc00005afb0 sp=0xc00005aea0 pc=0x650259 gioui.org/app.NewWindow.func7() /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:188 +0x2c fp=0xc00005afe0 sp=0xc00005afb0 pc=0x64c2ac runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00005afe8 sp=0xc00005afe0 pc=0x465901 created by gioui.org/app.NewWindow in goroutine 6 /home/vnuxa/go/pkg/mod/gioui.org@v0.3.1/app/window.go:188 +0x805 goroutine 8 [GC worker (idle)]: runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004cf50 sp=0xc00004cf30 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc00004cfe0 sp=0xc00004cf50 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004cfe8 sp=0xc00004cfe0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 9 [GC worker (idle)]: runtime.gopark(0xb6ae0b306f0?, 0x0?, 0x0?, 0x0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004d750 sp=0xc00004d730 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc00004d7e0 sp=0xc00004d750 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004d7e8 sp=0xc00004d7e0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 18 [GC worker (idle)]: runtime.gopark(0xb6ae0b306fa?, 0x3?, 0xa1?, 0x27?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc000046750 sp=0xc000046730 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc0000467e0 sp=0xc000046750 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0000467e8 sp=0xc0000467e0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 19 [GC worker (idle)]: runtime.gopark(0xb6ae0b3043c?, 0x1?, 0x43?, 0xa0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc000046f50 sp=0xc000046f30 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc000046fe0 sp=0xc000046f50 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc000046fe8 sp=0xc000046fe0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 20 [GC worker (idle)]: runtime.gopark(0xb6ae0b304d4?, 0x3?, 0xe8?, 0xa?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc000047750 sp=0xc000047730 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc0000477e0 sp=0xc000047750 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0000477e8 sp=0xc0000477e0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 34 [GC worker (idle)]: runtime.gopark(0xb6ae0ae8128?, 0x3?, 0x2d?, 0xf0?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc000588750 sp=0xc000588730 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc0005887e0 sp=0xc000588750 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc0005887e8 sp=0xc0005887e0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 35 [GC worker (idle)]: runtime.gopark(0xb6ae0ae8183?, 0x3?, 0x24?, 0x32?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc000588f50 sp=0xc000588f30 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc000588fe0 sp=0xc000588f50 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc000588fe8 sp=0xc000588fe0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c goroutine 10 [GC worker (idle)]: runtime.gopark(0xb6ae0b32293?, 0x3?, 0x29?, 0x40?, 0x0?) /usr/lib/go/src/runtime/proc.go:398 +0xce fp=0xc00004df50 sp=0xc00004df30 pc=0x4398ce runtime.gcBgMarkWorker() /usr/lib/go/src/runtime/mgc.go:1293 +0xe5 fp=0xc00004dfe0 sp=0xc00004df50 pc=0x41cdc5 runtime.goexit() /usr/lib/go/src/runtime/asm_amd64.s:1650 +0x1 fp=0xc00004dfe8 sp=0xc00004dfe0 pc=0x465901 created by runtime.gcBgMarkStartWorkers in goroutine 6 /usr/lib/go/src/runtime/mgc.go:1217 +0x1c rax 0xb rbx 0x7f9568079970 rcx 0x70 rdx 0x68 rdi 0x123 rsi 0x0 rbp 0x7f9564003d10 rsp 0x7f95728e7b28 r8 0xffffffffffffffb8 r9 0x70 r10 0xff r11 0x246 r12 0x7f9568007860 r13 0x7f9568079940 r14 0x7f9564003d10 r15 0x7f95680797f0 rip 0x7f95ba49ff84 rflags 0x10202 cs 0x33 fs 0x0 gs 0x0
This is unfortunately a crash in native code. You'll need a debugger to pinpoint the crash and cause.
On 2023-10-23 23:48, ~eliasnaur wrote:
This is unfortunately a crash in native code. You'll need a debugger to pinpoint the crash and cause.
What am i supposed to do exactly? Run gdb with this?
I've noticed that most of these panic errors come from only one case: The user is running Wayland and is using Nvidia.
Could you please consider seeing egl-wayland? I believe it could be the cause for this but I'm not sure how i can debug this as I'm not an Nvidia user.
Except for the weird vulkan errors like 'vulkan: no suitable device found'
I'm not an NVIDIA user either. In fact, my only machine right now is a macbook where I test Linux and Windows through virtual machines.
Still, it would really be appreciated if you took a look at this. Wayland is slowly approaching and my users often have a Nvidia system, in where Gio just panics.
I think what's needed is for someone with the affected hardware to run the app within GDB and capture a backtrace of the crash with debug symbols for the NVIDIA GL libraries. We then might be able to determine what exactly is going wrong. However, neither ~eliasnaur nor I have the hardware to test this issue, so we can't capture that backtrace ourselves.
How can i debug this?
If you have access to the affected hardware/software configuration, we need a full backtrace of the crash. You can run the process under gdb and wait for it to crash, then use the bt command to generate a backtrace. If the backtrace is full of question marks, you'll need to find and install appropriate debug info packages to allow gdb to resolve the missing symbols.
(gdb) bt No stack. (gdb)
there is a error returned:
panic: eglSwapBuffers failed (3008)
which has no backtrace whatsoever.
The
eglSwapBuffers
error seems to happen only within my software, which i will be trying to debug...
Hmm, that
bt
was after the segfault? There's an example of the debugging flow here. If that's exactly what you did, perhaps Go's segfault handling is preventing gdb from detecting it... In that case, you can try a similar flow indlv
, but I don't know how well it can descend into C code.