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

オープン
#413 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
linux, python
領域
backend, desktop

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
102
フォーク
27
平均マージ
10時間 43分
マージ済み PR(30日)
293

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OrchardLinux/orchard のほかの issue

OrchardLinux/orchard の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。