Repository navigation
Crash: SIGSEGV inside fontconfig FcFontSort — concurrent font fallback from multiple surface render threads is unserialized (Linux/GTK) #13083
Issue DescriptionOn Linux (GTK, gtk-single-instance), Ghostty intermittently crashes with SIGSEGV, taking down ALL windows at once (single process). It happens reliably during bursts of varied terminal output that trigger frequent font fallback — most notably while installing software (apt/dnf/npm/etc. printing progress bars, box-drawing, package names in mixed scripts, symbols, emoji), and especially with two or more windows open. I captured several coredumps. In every one, the faulting thread bottoms out inside fontconfig's FcFontSort (symbolized as the FcFontMatch region in the statically-linked libfontconfig). The faulting instruction dereferences Root cause (verified against v1.3.1 source): Ghostty does NOT serialize fontconfig access. This is a race, so it is not 100% deterministic, but it is frequent in daily use with multiple windows under heavy output. A process-wide lock that serializes ALL fontconfig calls (both the discovery path and every DeferredFace fontconfig call) eliminates the crash. I have such a patch running locally and have not been able to reproduce the crash since. Happy to open a PR. Expected BehaviorGhostty does not crash. Concurrent font discovery / fallback from multiple surface render threads is serialized so it cannot corrupt fontconfig's shared state. Actual BehaviorGhostty SIGSEGVs inside fontconfig FcFontSort and the entire process dies, closing all windows simultaneously. Triggered by font fallback during heavy/varied output. Reproduction Steps
Ghostty LogsGhostty VersionOS Version InformationUbuntu 24.04.4 LTS (Noble Numbat) (Linux only) Display ServerX11 (Linux only) Desktop Environment/Window ManagerKDE Plasma Version 5.27.12 KDE Frameworks Version 5.115.0 Minimal Ghostty ConfigurationReproducible with default/empty configuration — independent of font-family/theme.Additional Relevant ConfigurationGPU / Renderer info I acknowledge that:
|
Replies: 1 comment
|
We don't entertain AI slop reports. |
We don't entertain AI slop reports.