Installer segfaults on quit: exit() called from worker thread while main thread is rendering (NVIDIA GL)

Aperta
#413 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
linux, python
Ambito
backend, desktop

Direzione di ricerca

Start by locating the Quit effect handler and the worker thread entry points in the installer; the issue does not identify source files or tests. Trace how shutdown is requested and how the main event and render loop owns the window and GL context. Done when quitting exits cleanly without a worker calling process::exit() while rendering is active; verify the shutdown path on the affected Linux installer.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

The Linux installer segfaults during shutdown, right after it logs effect: Quit. From the core dump, a worker thread calls exit() while the main thread is still rendering. exit() runs the NVIDIA GL driver's cleanup, and the main thread then crashes inside libnvidia-glcore.

Environment

  • orchard 0.3.14 (748a58386594), linux x86_64 (installer)
  • Arch Linux (Omarchy), Hyprland (Wayland)
  • NVIDIA proprietary driver 615.78.08

What happened

The installer had been running for about 25 minutes (an iPad mini 2 boot attempt via checkra1n, which failed because usbmuxd wasn't running). On quit, the log's last line is:

[1538.2] [orchard] 20:58:04.753 effect: Quit

In the same second, the process got SIGSEGV (si_code: SI_KERNEL) and dumped core.

Stack traces (binary is stripped, so offsets only)

Crashing thread (main thread): inside the NVIDIA GL driver, called from the app's render path

#0  libnvidia-glcore.so.615.78.08 + 0xddc715
#1  install-omarchy-a + 0xe1b92f
#2  install-omarchy-a + 0xe273cb
#3  install-omarchy-a + 0xc89c0a
...
#11 install-omarchy-a + 0xbd97ac
#12 install-omarchy-a + 0xbd9c26
#13 libc.so.6 + 0x27781
#14 __libc_start_main

Another thread, at the same moment: a spawned worker that is inside exit(), running the GLX driver's teardown

#0  ioctl (libc.so.6)
#1  libnvidia-glcore.so.615.78.08 + 0xf61e70
#2  libnvidia-glcore.so.615.78.08 + 0xf66c07
#3  libnvidia-glcore.so.615.78.08 + 0x9fb691
#4  libnvidia-glcore.so.615.78.08 + 0xfd6ded
#5  libnvidia-glcore.so.615.78.08 + 0xa00adf
#6  libGLX_nvidia.so.0 + 0xa2461
#7  libGLX_nvidia.so.0 + 0x517bb
#8  libGLX_nvidia.so.0 + 0x51ebf
#9  libGLX_nvidia.so.0 + 0xe3009
#10 libc.so.6 + 0x40fbf
#11 exit (libc.so.6)
#12 install-omarchy-a + 0x12f2545
#13 install-omarchy-a + 0x12f24d4
#14 install-omarchy-a + 0x109d0bf
#15 install-omarchy-a + 0x109a797
#16 install-omarchy-a + 0x1093034
#17 install-omarchy-a + 0x1092fac
#18 install-omarchy-a + 0x12ed022   (thread start)

BuildID: c73bac71b6f207dac093de56d0f56e5abe3515d0

Likely cause

The Quit effect seems to be handled on a background thread that calls std::process::exit() directly. That runs libc's exit handlers, including the NVIDIA driver's teardown, while the main thread's event/render loop is still submitting GL work. The main thread then touches the destroyed driver state and segfaults.

This is an inference from the stack shapes. I couldn't symbolize the app frames.

Suggested fix

Have the worker ask the main event loop to exit (for example, send a quit message or event-loop proxy event) instead of calling process::exit() itself. Let the main thread drop the window and GL context first, then return or exit. That would also make the shutdown order deterministic on other GL drivers.

Impact

Low. It only happens on quit, and no work is lost. But on systems with crash reporting (systemd-coredump plus desktop notifications), every quit can show up as a crash.

Lingua principale
Python
Stelle
102
Fork
27
Merge medio
10h 43m
PR unite (30g)
293

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OrchardLinux/orchard

Tutte le issue di OrchardLinux/orchard

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.