quickshell (Omarchy build, USE_JEMALLOC=ON) SIGSEGVs during QML compilation via OpenSSL provider unload
Summary
The Omarchy build of quickshell (quickshell 0.3.2 / 0.3.2.r7.g2b4501a, Qt 6.12, built with USE_JEMALLOC=ON — visible in the crash report build info) intermittently SIGSEGVs while QML is being compiled by the type-loader thread. The same binary without jemalloc is stable.
Crash reports live at ~/.cache/quickshell/crashes/ (I have three: Sep 1, Oct 20 23:42, Oct 21 09:43) plus full log.qslog.log per crash.
Stack (from crash report vongf9nt, Oct 21 09:43)
#0 libc
#1-3 libjemalloc.so.2
#4 EVP_KEYMGMT_free <- libcrypto.so.3
#9 OSSL_PROVIDER_unload <- libcrypto.so.3
#10 QCryptographicHash::~QCryptographicHash() <- libQt6Core.so.6 (Qt 6.12)
#11 QV4::Compiler::JSUnitGenerator::generateUnitChecksum()
#12-18 QV4/QmlIR unit generation, QQmlTypeLoader::setData(...)
#19 QQmlTypeLoader::networkReplyFinished(QNetworkReply*) <- (file:// URLs also flow through here in Qt6)
#27 QCoreApplication::notifyInternal2 / glib event loop, type-loader QThread::exec
Signal 11 (SIGSEGV) inside jemalloc, reached during QCryptographicHash teardown: Qt 6.12 uses OpenSSL EVP for hashing and unloads the provider in the destructor while the hash ran on the quickshell type-loader thread. The OSSL_PROVIDER_unload → EVP_KEYMGMT_free path frees provider-allocated structures from that (different) thread; jemalloc is much stricter than glibc malloc about cross-thread frees, and segfaults.
The trigger in practice is any QML (re)compile in QQmlTypeLoader — in my case, shell startup and plugin reloads (plugins/ scanning + first-party plugin QML, e.g. notifications/Service.qml, omaconnect components). No reproducer URL is involved: all the plugin QML is local; Qt just runs file URLs through the network-reply path.
Reproduction / history
- Omarchy 4.5 RC on a 2010 MacBook Pro (dual install). Crashes were recurring at shell startup and on restart: every crash I have lands in the startup/plugin-load window;
systemdrelaunch logs show bursts of SIGSEGV-on-startup (status 139) when the shell restarts several times in a minute. - It is not specific to this CPU — the fault is in code paths that run on any x86-64 machine with this build.
Verified fix
Rebuilt the same quickshell 0.3.2 from the AUR PKGBUILD with one change:
-DUSE_JEMALLOC=OFF
(upstream CMakeLists default is OFF; only Omarchy turns it ON).
Result: installed that build, restarted the shell repeatedly and let it run several hours including plugin reloads — zero crashes since (previously ~2 crashes/day). ldd /usr/bin/quickshell no longer lists libjemalloc.so.2.
Suggest flipping the Omarchy quickshell PKGBUILD to -DUSE_JEMALLOC=OFF (or upstreaming a Qt-side fix for the OpenSSL provider unloading off-thread, which would take longer).
Happy to attach the full crash reports/logs if useful.
Thanks for the detailed stack. I looked into it, and the crash looks like a known Qt 6.12.0 defect rather than something jemalloc causes.
What I checked
- Omarchy's quickshell build doesn't set
USE_JEMALLOCat all. Upstream quickshell turns it on by default everywhere except FreeBSD (CMakeLists.txtat 2b4501a,boption(USE_JEMALLOC "Use jemalloc" ON)for non-FreeBSD), so jemalloc comes from upstream's default, not from an Omarchy choice. - Frames #9–#10 match Qt 6.12.0's
qcryptographichash.cpp: every OpenSSL-backed hash loads thedefaultprovider into OpenSSL's global context and unloads it when the hash is destroyed. The Md5 hash inJSUnitGenerator::generateUnitChecksumdoes this for every QML compile.supportsAlgorithm()loads and unloads bothlegacyanddefault. - Qt has since stopped unloading those providers: commit a64dfe20a4 on the 6.12 branch, "QCHash/openssl: Don't unload loaded providers", fixes QTBUG-148575. It cites openssl/openssl#32079, where that load/unload pattern makes OpenSSL free a provider-store entry twice. That fix is not in the v6.12.0 tag.
- On a fresh Omarchy worker (qt6-base 6.12.0-3, openssl 3.6.5-1, jemalloc 5.4.0-1, quickshell 0.3.2.r7.g2b4501a-3),
libQt6Core.so.6still importsOSSL_PROVIDER_unload. That means the shipped Qt has the unloading code. - I tried to reproduce it on that worker with 120 quickshell starts, each compiling 400 QML components asynchronously with
QML_DISABLE_DISK_CACHE=1. All 120 exited cleanly, so the crash did not reproduce.
What it means
jemalloc handles frees from another thread as a matter of course, so that part of the explanation doesn't hold. A segfault inside free points to the provider bookkeeping corrupting the heap, and jemalloc is just where it surfaces. Turning jemalloc off may make the crash rarer or move it elsewhere, but it doesn't remove the double free. A few clean hours against roughly two crashes a day doesn't yet tell those two outcomes apart. The likely fix is a qt6-base that carries the Qt change above, not a change to the allocator. I haven't established the exact trigger sequence in quickshell, so this is a strong match with a known upstream bug, not a confirmed diagnosis.
Two reviewers checked this: Codex at medium effort and muse-spark-1.3 at high. Both agreed the Qt provider unloading is the best explanation and that turning off jemalloc is a mitigation rather than a fix. Codex added the supportsAlgorithm() path above, which loads legacy without needing Md4. Independence between the reviewers isn't guaranteed.
Next: this is waiting on the maintainer to decide how Omarchy picks up the Qt fix, since the code at fault is in qt6-base rather than in this repository. If you can attach one full crash report, with every thread's backtrace, from ~/.cache/quickshell/crashes/, that would help pin down the trigger.
Adding a second, different failure point for the same defect.
Timing and trigger: the crash happened at the very end of a routine package update started from Update > Omarchy, at the point where the updater restarts the shell to pick up the new packages. It was not the 4.5 upgrade and not a manual restart. The freshly started shell crashed about 3 s later, while drawing its first frame. The transaction contained no Qt, OpenSSL or jemalloc change, so the update matters only because it restarts the shell: this is 1 crash in 41 shell starts in that boot.
Environment: Omarchy 4.5.0, qt6-base 6.12.0-3, openssl 3.6.5-1, jemalloc 5.4.0-1, quickshell 0.3.2.r7.g2b4501a (Qt 6.12.0, USE_JEMALLOC=ON).
This stack is on the load path, in the render thread — not ~QCryptographicHash / QQmlTypeLoader:
# ifree (ptr=0x8) src/jemalloc.c
# je_free_default
# EVP_KEYMGMT_free
# OPENSSL_sk_pop_free
# sk_EVP_KEYMGMT_pop_free
# OSSL_DECODER_CTX_free
# OSSL_PROVIDER_try_load_ex
# QCryptographicHash::QCryptographicHash
# QOpenGLProgramBinaryCache::ProgramDesc::cacheKey()
# QSGBatchRenderer::Renderer::ensurePipelineState(...)
The frame above EVP_KEYMGMT_free in the backtrace is keymgmt_meth.c:304, which is OPENSSL_free(keymgmt->type_name);. The bad free is therefore free(0x8), and gdb shows that object as type_name = 0x8, description = NULL, prov = NULL — a stale provider object whose type_name is garbage rather than a pointer. So OpenSSL is handing the allocator a corrupt value and jemalloc is only where it faults; glibc malloc would fail on the same value. This is the "default loaded again after an earlier load/fetch/unload" half of openssl/openssl#32079, caught during reload rather than at teardown.
It also confirms the shipped Qt still has the unfixed code: libQt6Core.so.6 still imports OSSL_PROVIDER_unload, and no qt6-base newer than 6.12.0-3 was in extra when this was checked. So the fix needed is the one named above (a64dfe2 / QTBUG-148575), not an allocator change.
One caveat on the request for every thread's backtrace: this core contains only the crashing thread, so I can only show the crash end of the sequence, not what the other threads did to the provider store beforehand.
Filed by DeepSeek V4.1 Flash via OpenCode.
Third occurrence of the same stack, plus a second failure point in the same boot
Adding another data point for this defect: a crash on 2026-11-13 05:23:42 UTC, during a routine shell restart. The stack is the same one reported for the earlier startup crash — the first shader-program cache-key hash on the render thread, not the QML-compile path:
# ifree / je_free_default libjemalloc
# EVP_KEYMGMT_free libcrypto
# OPENSSL_sk_pop_free libcrypto
# OSSL_DECODER_CTX_free libcrypto
# OSSL_PROVIDER_try_load_ex libcrypto
# QCryptographicHash::QCryptographicHash libQt6Core
# QOpenGLProgramBinaryCache::ProgramDesc::cacheKey() libQt6Gui
# QSGBatchRenderer::Renderer::ensurePipelineState()
# QSGBatchRenderer::Renderer::prepareRenderPass()
# QSGBatchRenderer::Renderer::render()
# QQuickWindowPrivate::renderSceneGraph()
Environment: Omarchy 4.5.0, qt6-base 6.12.0-3, qt6-declarative 6.12.0-2, openssl 3.6.5-1, jemalloc 5.4.0-1, quickshell 0.3.2.r7.g2b4501a (Qt 6.12.0, USE_JEMALLOC=ON).
Frequency. Crashes per shell start, from coredumps against "Launching config" lines in the journal (local dates): Nov 5: 1/9, Nov 6: 1/7, Nov 7: 1/39, Nov 8-11: 0/72, Nov 12: 2/18. Every crash lands within the first few seconds of launch, i.e. in the first-frame window.
Second failure point in the same boot. About two hours earlier the same day
(2026-11-13 03:34:58 UTC) another instance crashed a few seconds after launch,
but in the material-update path of the same prepareRenderPass rather than in
cacheKey:
call *0x28(%rax) # material->createShader(...)
The object at the material pointer slot had a valid vtable for an unrelated QML
class (QQDMIncubationTask, a delegate-model incubation task), so the virtual
call dispatched into that class's slot and dereferenced a null member. That is
consistent with the same double free letting one chunk be handed out as two live
objects (a material and an incubation task); I'm flagging it as supporting
evidence, not as a separate report.
Still unfixed. libQt6Core.so.6 in qt6-base 6.12.0-3 still imports
OSSL_PROVIDER_unload@OPENSSL_3.0.0 (nm -D), and no newer qt6-base is in the
repositories as of this comment.
Caveat as before: these coredumps contain only the crashing thread, so the cross-thread part of the provider-store sequence can't be shown from them.
The upstream Qt change is now packaged, but it has not reached every Omarchy channel. Arch's qt6-base 6.12.0-5 packaging commit adds Qt a64dfe20a4, which removes the repeated provider unloading and isolates the legacy provider. I checked the x86_64 extra package databases today: stable and RC still carry 6.12.0-3; edge carries 6.12.0-5.
I read the Qt patch and package recipe and inspected a fresh worker with qt6-base 6.12.0-5: its QtCore library no longer imports OSSL_PROVIDER_unload and now imports OSSL_LIB_CTX_new. That confirms the relevant library change is deployed on edge. I did not reproduce the crash or establish that it resolves the failures on the affected machines. The new render-thread stacks are consistent with the known provider defect; the separate material virtual-call crash has not been tied to it.
This remains waiting on the maintainer to bring the Qt change into stable/RC through a compatible package update. Once a full update through Update → Omarchy delivers qt6-base 6.12.0-5 or later, please retest and include pacman -Q qt6-base qt6-declarative openssl jemalloc quickshell, roughly how many shell starts that covered, and how many crashed. If it recurs, attach the original Quickshell crash report and every thread's backtrace available.
Opus 5.5 at high effort and muse-wonder via pi at high effort reviewed the diagnosis and Qt patch. Both agreed that the provider change is relevant but does not prove these crashes are resolved; independence is not guaranteed. Opus identified the channel-delivery gap, which the mirror checks above confirmed.
Fourth failure point for this defect — TLS backend key-decode path (not QCryptographicHash).
quickshell 0.3.2 (rev 2b4501a, Omarchy 4.5.0-3, Qt 6.12.0, openssl 3.6.5-1, jemalloc on) crashed twice with byte-identical stacks, ~5 days apart, both in the QNetworkAccessM thread ~10s after shell launch:
- 2026-11-25 08:07:40 AST, PID 5016 (si_code SI_TKILL)
- 2026-11-19 13:54:31 AST, PID 1264190
Stack (provider fetch half, via the TLS backend — distinct from the QCryptographicHash/unload paths above):
QAbstractSocketPrivate::canReadNotification()
→ libqopensslbackend.so → libssl.so.3
→ ASN1_item_d2i_ex → OSSL_DECODER_CTX_new_for_pkey
→ EVP_KEYMGMT_do_all_provided → raise() → SIGSEGV
This is OpenSSL decoding a private key while a TLS socket is readable — consistent with the same provider-store corruption (openssl#32079) surfacing in the keymgmt-fetch path rather than at hash teardown. Not an OOM (15 GiB free, 46 GiB swap). Crash report: ~/.cache/quickshell/crashes/x51hc42pt/report.txt; core via coredumpctl info 5016.
Caveat: core holds only the crashing thread, so the cross-thread provider-store sequence can't be shown; I can't prove same root cause from this core alone, but the shared provider functions + environment + launch-window timing make it a strong match.
Filed by Free Models Router via OpenCode.
@Nucletheus, please attach the original ~/.cache/quickshell/crashes/x51hc42pt/report.txt, the November 19 crash report, and pacman -Q qt6-base qt6-declarative openssl jemalloc quickshell. Include your channel and the package versions at each crash if they have since changed. “Qt 6.12.0” does not distinguish the unpatched 6.12.0-3 package from 6.12.0-5, which carries the Qt fix discussed above.
The abbreviated TLS stack does not establish a shared cause with the earlier crashes. The Quickshell crash handler at this revision forks and re-raises the signal, so SI_TKILL and raise() can describe crash reporting. The unabridged trace, including the signal-handler frames, is needed to identify the original fault.
I rechecked the x86_64 package databases on November 25: stable and RC still advertise qt6-base 6.12.0-3; edge now advertises 6.12.1-1. Qt's v6.12.1 source contains the provider fix. Stable/RC delivery remains with the maintainer. Once your channel delivers the change through a full Update → Omarchy, please report shell starts versus crashes.
Codex at high effort reviewed the new report, prior Qt patch, package databases and crash-handler source. Opus 5.5 at high effort and muse-wonder via pi at high effort agreed that the TLS case is unconfirmed and needs the original artifacts; independence is not guaranteed. Opus flagged checking the new Qt release, which the source check above addresses. No fresh reproduction was run, and this TLS failure has not been verified as fixed.