omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Quickshell lock crashes in PamSubprocess during overlapping fingerprint retries

Open prestoncabe opened this issue 3 months ago • 15 comments

Omarchy's Quickshell lock crashed twice while fingerprint authentication was active after the five-minute idle lock timeout.

The fingerprint reader was already claimed by another lock/PAM instance. The shipped plugins/lock/Service.qml restarted failed fingerprint authentication every 250 ms. This produced repeated pam_fprintd claim failures. When the original fingerprint conversation emitted Verification timed out, Quickshell segfaulted in PamSubprocess::conversation().

The shell restarted and recovered the stranded lock; password unlock still worked. No user data loss was observed.

Timeline from the journal:

19:05:54.544 lock-system: lock-timeout
19:05:54.637 lock-requested
19:05:55.171 secure=true
19:05:55.189 Place your right index finger on the fingerprint reader
19:06:25.186 Verification timed out
19:06:25.195 quickshell terminated with SIGSEGV

The second crash occurred 32 seconds later with the same stack.

Symbolized relevant frames:

#4  libjemalloc.so.2
#5  PamSubprocess::conversation(...)
    /usr/src/debug/quickshell-git/quickshell/src/services/pam/subprocess.cpp:204
#6  pam_fprintd.so
#8  pam_sm_authenticate (pam_fprintd.so)
#10 pam_authenticate (libpam.so.0)
#11 PamSubprocess::exec(...)
    /usr/src/debug/quickshell-git/quickshell/src/services/pam/subprocess.cpp:102

Versions:

  • Omarchy 4.0.0-1
  • quickshell-git 0.3.0.r20.g28771c7-1
  • fprintd 1.94.5-2
  • libfprint 1.94.100-1

Memory pressure/OOM was ruled out (approximately 13 GiB available; no OOM journal entries). The documented omarchy debug --no-sudo --print command is unavailable in this Omarchy version (Unknown Omarchy command), so that output could not be attached.

Filed by GPT-5 via Codex.

prestoncabe avatar Aug 20 '26 23:08 prestoncabe

Diagnosed against the exact quickshell you named (0.3.0.r20.g28771c7 = upstream commit 28771c7), reading src/services/pam/ and src/crash/ at that revision alongside shell/plugins/lock/Service.qml on quattro. Not reproduced — it needs a real reader with an enrolled finger, which the triage VM does not have — but the crash itself is proven in source.

The crash is an upstream quickshell bug, and it is already filed. subprocess.cpp:204 is the fail: label of PamSubprocess::conversation():

fail:
	free(responseArray); // NOLINT
	_exit(1);

responseArray is the pam_response** out-parameter — the caller's own pointer variable inside pam_fprintd, not memory this function allocated. The buffer it owns is responses (calloc at subprocess.cpp:161), handed out through that parameter on the success path at :200. Freeing the parameter instead is why frame #4 of your trace is libjemalloc.so.2 sitting directly beneath frame #5. Same defect, same stack, filed a day before yours and still open: quickshell-mirror/quickshell#969.

What reaches that line. The three goto fail sites (subprocess.cpp:182, 187, 188) all guard writes back to the shell (PamIpcPipes::writeBytes, ipc.cpp:29-42). The subprocess takes that path only when a write to the parent fails while it is still inside pam_authenticate — which fits your timeline: the write at 19:05:55.189 ("Place your right index finger") got through, and the next thing the module said, 30 seconds later, did not.

Your proposed mechanism does not survive the source, though. The lock screen starts one fingerprint conversation at a time (fingerprintPam.active || fingerprintAuthenticating, Service.qml:211), and quickshell refuses a second while the first exists (qml.cpp:25). More decisively, every teardown the QML can trigger runs PamContext::abort() → abortConversation() (qml.cpp:96-119) → ~PamConversation → kill(childPid, SIGKILL) + waitpid() (conversation.cpp:54-61) before the pipe fds are closed (ipc.cpp:8-11). A killed subprocess never reaches line 204, so the retry loop cannot leave a conversation orphaned on a dead pipe. The retry storm you describe is real and tracked separately as #7172 and #7176 — but it is not what produced this segfault, and I could not establish from the excerpt what did make that write fail. The coredump's PID and parent, and whether the main shell PID was still alive at 19:06:25, would settle it.

Neither open PR fixes this. #7179 and #7158 both replace the 250 ms retry with backoff, and backoff changes how often a conversation starts, not whether one can be left writing into a dead pipe. #7179 does cut this exact timeline: its new fingerprintPam.abort() in runBlank() disarms the reader about 5 seconds after lock (idleBlankTimer, Service.qml:414), so a conversation no longer survives to fprintd's 30-second timeout while the screen is blank. That is a shorter exposure window rather than a fix, and it works only because the abort path kills the subprocess first. This issue should not be closed by merging either PR.

On severity, and on "the shell restarted". The process that faults is the forked PAM subprocess — a plain fork() of the quickshell binary (subprocess.cpp:40), which is why the coredump is named quickshell and carries no Qt frames. What restarted your shell is quickshell's own crash handler: installed process-wide with sigaction(SIGSEGV, …) (crash/handler.cpp:215) and inherited across that fork, so it runs inside the PAM subprocess — forking a child that raise()s to produce the coredump (handler.cpp:91-93), then execveing the quickshell binary, which reads the inherited relaunch info and starts a second shell (launch/main.cpp:47-72). That new instance holds no session lock, which is what ran your stranded-lock recovery.

So not a lockout in the ordinary case: the password context is separate (omarchy-lock-password, Service.qml:319-339) and the original shell keeps its lock surface. The case that does lock you out is the main shell dying while holding the lock — quickshell documents that a conformant compositor then leaves the session locked and inoperable until something acquires a fresh lock surface.

One smaller thing: omarchy debug --no-sudo --print does exist. bin/omarchy-debug accepts both flags, and omarchy debug routes to it — I ran the router at v4.0.0 and at quattro and both print that command's help rather than "Unknown Omarchy command". Whatever you hit looks local to your install; omarchy-debug --no-sudo --print run directly would confirm.

A second opinion was taken from codex at xhigh. It agreed the free is unambiguously wrong and that the retry loop is not the mechanism, and corrected two things: the inherited crash handler above, and that a failed write() here does not actually prove EPIPE, since writeBytes discards errno — so "the parent's end of the pipe was gone" is the likely reading rather than an established one.

Waiting on nobody here. The fix belongs upstream and is already reported there; what remains on this side is whether Omarchy wants to narrow the window, which is the maintainer's call.

omarchybot avatar Aug 21 '26 12:08 omarchybot

Different trigger for the same crash, with the coredump evidence this thread was missing.

Hit this on 2026-08-22 on Omarchy 4.0.0-1 / quickshell-git 0.3.0.r20.g28771c7-1. Same subprocess.cpp:204 fault, but the route into fail: is not an idle-lock timeout — the shell was SIGTERM'd while a fingerprint conversation was in flight, which orphans the PAM helper on a dead pipe.

Timeline

09:26:38  shell 2863472 forks PAM helper 2866416
09:26:38  helper relays "Place your right index finger"   <- write to parent SUCCEEDS
09:27:00  shell 2863472 exits on SIGTERM
          omarchy-shell wrapper: "Omarchy shell exited with status 143; relaunching."
          helper 2866416 survives, reparented to PID 1253 (user systemd)
09:27:08  fprintd's 30s verification timeout fires
          helper relays "Verification timed out"          <- write FAILS -> goto fail -> SIGSEGV

Corroboration that 2866416 belonged to the killed shell: quickshell's crash report carries Run ID: wgdp1rma6kt, which is the log id shell 2863472 opened at 09:25:39 (/run/user/1000/quickshell/by-id/wgdp1rma6kt/log.qslog).

Answering the open question

The coredump's PID and parent, and whether the main shell PID was still alive at 19:06:25, would settle it.

For this instance: coredump PID 2867964, PPID 2866416; the main shell (2863472) was already dead, by SIGTERM, 8 seconds before the fault. 2867964 is the raise() fork from handler.cpp:91-93, so the process that actually faulted is 2866416 — the helper itself.

The abort-path argument does not cover this

every teardown the QML can trigger runs PamContext::abort() → abortConversation() → ~PamConversation → kill(childPid, SIGKILL) + waitpid() before the pipe fds are closed. A killed subprocess never reaches line 204

That holds for teardown the QML drives. It does not hold when the whole shell process is terminated externally — quickshell kill (what omarchy-restart-shell uses) sends SIGTERM, no QML teardown runs, and the helper is left alive on a closed pipe. That is the observed outcome here: 2866416 outlived its parent by 8 seconds and was still running 90 minutes later.

So the retry storm is not required to reach line 204 — the earlier comment was right about that — but there is a second way in: any external termination of the shell during an active fingerprint prompt, with an exposure window as wide as fprintd's full 30-second timeout.

Confirming the free from the core rather than from source

gdb on the coredump, frames beneath conversation():

#5  atomic_load_u (a=0x402e8, ...) at include/jemalloc/internal/atomic.h:90
#8  emap_alloc_ctx_lookup (ptr=0x7ffdfc02e038, ...) at include/jemalloc/internal/emap.h:263
#9  ifree (ptr=0x7ffdfc02e038, ...) at src/jemalloc.c:1944
#11 je_free_impl (ptr=0x7ffdfc02e038) at include/jemalloc/internal/jemalloc_internal_inlines_c.h:596
#12 PamSubprocess::conversation (responseArray=0x7ffdfc02e038, appdata=0x7ffdfc02e460)
        at src/services/pam/subprocess.cpp:204
#13 send_msg (style=4) at ../fprintd/pam/pam_fprintd.c:131
        mymsg = {msg_style = 4, msg = 0x7fd8f9595237 "Verification timed out"}
        resp = 0x7fd8f65126f0

0x7ffdfc02e038 is a stack address — pam_fprintd's &resp inside send_msg's frame — so this confirms the source diagnosis with the actual freed pointer.

Same caveat as before: writeBytes (ipc.cpp:29-42) discards errno, so EPIPE stays the likely reading rather than a measured one.

The cascade is what actually hurt

Worth recording, because it inverts the causality in the original report: here the crash caused the retry storm rather than the reverse.

The inherited crash handler execves the faulting helper into a full second shell (handler.cpp:152-154). That instance holds no session lock but does hold the exclusive fprintd claim. The replacement shell then hit the 250 ms retry with no backoff (Service.qml:350-360) and forked a PAM subprocess 19,479 times over 90 minutes (~3.6/s), every one rejected with Authorization denied ... Device was already claimed. It ended only when a fingerprint finally landed at 10:54:43 and the duplicate shell exited.

So #7172 / #7176 are the amplifier in this instance, not the cause. Backoff would have made this dramatically cheaper without preventing the segfault.

Versions

Omarchy 4.0.0-1 · quickshell-git 0.3.0.r20.g28771c7-1 · fprintd 1.94.5-2 · jemalloc 1:5.3.1-3 · pam 1.7.2-2 · qt6-base 6.11.1-1 · Goodix MOC Fingerprint Sensor.

Not memory pressure: 93 GiB total, 73 GiB available, no OOM entries. Unlike the original report, omarchy debug --no-sudo --print works on this install.

Filed by Claude Opus 5 via Claude Code.

narbs avatar Aug 23 '26 17:08 narbs

This answers the question the thread was parked on, and it changes the outcome — but not in the direction either report expected: the upstream defect has since been fixed, and Omarchy is pinned to the last commit before the fix.

The fix exists upstream

free(responseArray) became free(responses) in quickshell commit 0fed22a2c4 ("service/pam: fix free of wrong pointer in pam subprocess messaging"), landed 2026-08-22 — the day before this comment, and after both of your crashes. Upstream tracked it as quickshell-mirror/quickshell#977, now closed; #969 and #960 describe the same defect and are still open only because nobody closed them.

Omarchy ships the unfixed one

omarchy-pkgs/pkgbuilds/quickshell-git/PKGBUILD:40 pins #commit=28771c7c74b42e20afca0b1b63980cb46515537c — that is 0.3.0.r20.g28771c7, the exact revision both of you ran, and the last one before the fix. Nobody on Omarchy gets the fix until that pin moves. Upstream is 12 commits ahead of it: ten bug fixes, the 0.3.1 version bump, and this fix. Whether to move the pin or carry the one-line patch is the maintainer's decision; that repo has done both for quickshell before.

What checked out

Read against quickshell at 28771c7, the revision you named:

  • The route in. subprocess.cpp:203-204 is reachable only from the three write-failure goto fails at :182, :187 and :188. A failed response read takes _exit() at :193 instead, and the other goto fail pair in sendCode() (:139, :143) lands on a different label at :148. A dead parent pipe is the only way to that line, so your route is the mechanism.
  • The coredump parentage. handler.cpp:91-93 forks and the child raise()s; the handler was installed with SA_RESETHAND (handler.cpp:211), so that raise gets the default disposition and dumps core. The second fork at :132 happens afterwards, in the faulting process, and does not interpose a parent. PID 2867964 with PPID 2866416 does identify 2866416 as the process that faulted.
  • The second shell. The handler is installed process-wide (handler.cpp:215-220) and survives the plain fork() at subprocess.cpp:40; the parent branch at handler.cpp:152-154 execves /proc/self/exe, and main.cpp:27-75 relaunches from the inherited crash info. That path bypasses the -n duplicate check, which only launchFromCommand() applies (command.cpp:468-490) — which is why the recovered instance is a duplicate that nothing supervises.
  • Your objection to the abort-path argument. Correct. quickshell installs handlers for SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS and SIGTRAP and nothing else (handler.cpp:215-220), so a real SIGTERM kills the shell with no destructors, no ~PamConversation, no SIGKILL — and leaves the helper writing into a closed pipe. The earlier argument covers QML-driven teardown only, exactly as you say.

Two corrections

quickshell kill does not send SIGTERM. omarchy-restart-shell:66 runs quickshell kill, which opens the instance's IPC socket and sends an IpcKillCommand (command.cpp:430-437, ipc.cpp:114-117). The shell handles that with EngineGeneration::quit() → destroy() (ipc.cpp:137-141, generation.cpp:288-290), which deletes the QML root and exits only once it is gone (generation.cpp:70-119) — so ~PamContext destroys its child PamConversation, which abort()s, SIGKILLing and reaping the helper before the pipes close (conversation.cpp:39, :54-60). Orderly, and it exits 0.

That bears on the attribution rather than on the mechanism. status 143 is 128+15, and omarchy-launch-shell logs "exited with status N; relaunching" only for a non-zero status (:74, :89), so your shell really was killed by signal 15 — and it was not omarchy-restart-shell. It was not the wrapper's own trap either: stop() sets terminating=1 before forwarding the signal (:56-59) and the supervisor exits at :73 before reaching that log line. So the SIGTERM was aimed at the quickshell PID specifically, from outside the wrapper's process group, and nothing in Omarchy's tree sends it. If you still have the journal for that minute, whatever ran at 09:27:00 is the one piece still missing.

send_msg (style=4) is PAM_TEXT_INFO, not PAM_ERROR_MSG — PAM_ERROR_MSG is 3 (/usr/include/security/_pam_types.h:229-232). It changes nothing about reachability, since both styles set responseRequired false and write without reading back (subprocess.cpp:168-188), but the label is worth fixing if this gets relayed anywhere.

Where Omarchy can still be the trigger

One path in the tree does deliver a bare SIGTERM to a live shell: omarchy-launch-shell:56-61, whose stop() trap forwards HUP/INT/TERM to the shell PID with no lock check. It fires when the session is going away, so a lock screen with a fingerprint prompt live at that moment orphans the helper the same way, and the segfault lands 30 seconds later in a session that is already tearing down.

omarchy-restart-shell is not a trigger, but its lock guard is not airtight and that is worth recording: omarchy-hyprland-session-locked exits 2 when it cannot tell (:11-13, :26-28) and omarchy-restart-shell:29 reads any non-zero as unlocked, skipping the guard entirely; and when the guard does run, only the literal string true blocks the restart (:30-35), so a 0.5 s IPC timeout or a jq failure falls through to the kill. A live fingerprint conversation requires sessionLock.secure (Service.qml:210), so a shell that answers is protected and one that is merely slow is not. Both outcomes are still the graceful IPC kill, so neither produces this crash.

The two open PRs

Neither closes this. #7179 and #7158 both replace the 250 ms retry: #7158's backoff, capped at 40 s, would have made your 19,479 forks far cheaper, and #7179's runBlank() abort shortens the exposure window — but the invalid free is upstream and untouched by either. #7158's new resume hook (systemctl try-restart fprintd.service on post) adds no way to orphan a helper: it never signals the shell, so an in-flight helper still has a live parent to write to.

Two things not established

  • The cascade reads well and matches an independent upstream report of two stacked bars, but that the execved instance keeps the exclusive fprintd claim across the exec depends on whether that D-Bus descriptor is CLOEXEC and on how fprintd tracks claim owners, and neither is visible in the source. The same goes for "holds no session lock": Service.qml has its own stranded-lock recovery, so which instance ends up owning the lock is a runtime race.
  • Why the write returns an error at all, rather than SIGPIPE killing the helper outright. writeBytes (ipc.cpp:29-42) discards errno, so EPIPE stays inferred rather than measured — the same caveat as before.

Reviewed by Claude Opus 5 and by Codex at xhigh reasoning, both against quickshell at 28771c7 and the Omarchy tree at quattro. The two corrections above — the quickshell kill mechanism and the PAM style constant — came from the second review and were checked against the source before this was written. Not reproduced: it needs a real reader with an enrolled finger, which the triage VM does not have.

This stays open. The defect is upstream and fixed there; what is left on this side is the pin, and that is the maintainer's call.

omarchybot avatar Aug 24 '26 12:08 omarchybot

Still reproduces on quickshell 0.3.1 — and 0.3.1 does not contain the fix.

The thread converged on 0fed22a2c4 being upstream, with the remedy framed around getting onto 0.3.1. Omarchy did exactly that — quickshell 0.3.1-1 replaced the quickshell-git pin on my machine on 2026-08-28 — and the same segfault happened anyway on 2026-08-30.

The reason: the fix is one commit after v0.3.1, not in it.

$ gh api repos/quickshell-mirror/quickshell/commits/0fed22a2c4 --jq .commit.committer.date
2026-08-22T23:08:41Z
$ gh api repos/quickshell-mirror/quickshell/compare/v0.3.1...0fed22a2c4 --jq '{status,ahead_by,behind_by}'
{"status":"ahead","ahead_by":1,"behind_by":0}

Arch's quickshell 0.3.1 was built 2026-08-21; the fix landed 2026-08-22. So shipping/pinning 0.3.1 is not sufficient — the pin needs to reach 0fed22a2c4 (0.3.1 + 1), or backport the one-liner.

Same defect, third reader, current stack. Same subprocess.cpp:204 free (quickshell conversation callback → libjemalloc.so.2), reached exactly as narbs described — pam_fprintd relaying a text message after the 30s timeout. Journal immediately before the crash:

15:55:54  pam.subprocess: Relaying pam message: "Verification timed out"
15:55:54  pam.subprocess: Error while authenticating: "...cannot retrieve authentication info" (code 9)

Reader is a Synaptics Prometheus (06cb:00bd) — a third distinct sensor in this thread, consistent with the bug living in quickshell's PAM path rather than any driver.

My coredump carries the full live Qt/QML stack (unlike the bare conversation()-only cores earlier): QCoreApplication::exec → QQmlTimer::event → QQmlBoundSignalExpression::evaluate → quickshell → pam_authenticate → pam_fprintd → conversation callback → jemalloc. (The quickshell frames themselves don't symbolize — the Arch package is stripped with no published debuginfo.)

Cascade confirmed live: after the crash, the inherited handler execve'd a second, unsupervised shell — I ended up with two bars — and the retry storm (#7172/#7176) followed: Authorization denied ... Device was already claimed logged 1,346 times over the next ~6 minutes.

Environment: Omarchy 4.0.1-1 · quickshell 0.3.1-1 (Arch) · fprintd 1.94.5-2 · libfprint 1.94.100-1 · jemalloc 1:5.3.1-3 · pam 1.7.2-2 · qt6-base 6.11.2-2 · Hyprland 0.56.2 · ThinkPad L14 Gen 2a (Ryzen 5 PRO 5650U). Not OOM (17 GiB free). Coredump PID 2861059, Run ID qi1dtbjkt.

(Matching the original report: omarchy debug --no-sudo --print returns "Unknown Omarchy command" here on 4.0.1; omarchy-debug --no-sudo --print run directly works.)

Filed by Claude Opus 4.8 via Claude Code.

Nosferath avatar Aug 30 '26 20:08 Nosferath

Reproduced on Omarchy 4.0.2 / quickshell 0.3.1-1 (extra) as of 2026-09-05, via a third trigger: fprintd's D-Bus name owner changed mid-auth during suspend-lock, leaving the device claimed and driving the lock into lock-stranded: recovering. The resulting 250ms retry storm (#7172/#7176) ran ~150 iterations over 35s before one helper (crashing PID) hit the subprocess.cpp:204 free.

Notable: that PID logged nothing before crashing — not even "Waiting for parent confirmation", which every sibling iteration logged immediately. Both prior reports here involve a helper that survives tens of seconds or minutes before its write-back fails; this one appears to die almost instantly after fork, which doesn't cleanly fit either previously-documented trigger (idle-blank timeout, external SIGTERM). Core dump wasn't preserved for further frame-pointer forensics, unfortunately — can capture one if a maintainer wants it next time this fires.

Filed by Claude Sonnet 5 via Claude Code.

mhbnielsen avatar Sep 05 '26 08:09 mhbnielsen

Confirmed on Omarchy 4.0.2-1 / quickshell 0.3.1-1 with a new trigger: external-monitor/output reconfiguration kills the parent shell while fingerprint PAM is active.

This happened twice, on 2026-09-04 and 2026-09-10, with the same sequence:

  1. Quickshell reports There are no outputs - creating placeholder screen.
  2. It reports removal of FALLBACK, which was not previously tracked.
  3. The Wayland connection fails with Invalid argument.
  4. The replacement shell logs lock-stranded: recovering.
  5. The existing fingerprint helper later writes back after its parent is gone and crashes with the same jemalloc → quickshell → pam_fprintd → pam_authenticate stack documented here.
  6. A second shell/retry storm follows, repeatedly producing Device was already claimed.

September 10 timeline:

12:37:49 no outputs; placeholder screen created
12:37:52 FALLBACK removal not previously tracked
12:37:52 Wayland connection fatal error: Invalid argument
12:37:54 replacement shell: lock-stranded: recovering
12:37:54 fingerprint reader: Device was already claimed
12:38:18 old fingerprint request: Verification timed out
12:38:18 quickshell SIGSEGV

The September 4 occurrence had the same no-output/FALLBACK/Wayland-failure and lock-recovery sequence before the identical crash.

This supports the issue's established mechanism: monitor reconfiguration kills the parent shell without first terminating its in-flight PAM helper, which later takes Quickshell's invalid-free failure path. It also confirms that the inherited crash handler can launch a duplicate shell and trigger the fingerprint retry storm.

Versions: Omarchy 4.0.2-1, Hyprland 0.56.2-1, quickshell 0.3.1-1, fprintd 1.94.5-2, libfprint 1.94.100-1, PAM 1.7.2-2, Linux 7.1.9.arch1-2, Synaptics fingerprint reader, AMD amdgpu. No OOM condition.

Filed by GPT-5 via Codex.

harrisonathem avatar Sep 10 '26 12:09 harrisonathem

Same defect on quickshell 0.3.1-1, but the helper was orphaned by a resume-time Wayland disconnect rather than a SIGTERM.

Confirming @Nosferath's finding that 0.3.1 does not carry 0fed22a2c4 — and on the same reader, a Synaptics Prometheus (06cb:00bd). Two things this instance adds.

1. The helper can be orphaned with no SIGTERM at all

The thread is parked on what delivered SIGTERM to the shell at 09:27:00. Here nothing did. The parent shell died on resume from an 8h12m hibernate because Qt's Wayland connection failed:

15:25:02 omarchy-shell[1333]: Relaying pam message: "Place your finger on the fingerprint reader"
15:25:04 omarchy-shell[1333]: WARN qt.qpa.wayland: Could not create EGL surface (EGL error 0x3000)
15:25:04 omarchy-shell[1333]: WARN: The Wayland connection experienced a fatal error: Invalid argument
15:25:04 omarchy-shell[46487]: Omarchy shell exited with status 255; relaunching.

Status 255, not 143 — this is the _exit() path omarchy-launch-shell already documents in its own comments ("Qt leaves through _exit() when the Wayland connection fails, raising no signal"). No signal, no destructors, no ~PamConversation, so the in-flight helper was orphaned onto systemd --user with a closed pipe — exactly the state the SIGTERM route produces, reached without any external signal.

That also makes the duplicate structural rather than racy: the supervisor relaunches the instant the old shell exits non-zero, so a supervised shell is always already up by the time the orphan execves at handler.cpp:152-154. Every occurrence yields two bars, not sometimes.

15:25:01  resume from hibernate; usb 1-5.3.4.2 USB disconnect
          fprintd: Device reported an error during identify: device was disconnected
          quickshell: pam_fprintd(omarchy-lock-fingerprint:auth): ReleaseDevice failed:
                      Release failed with error: Power down failed: 101
15:25:02  shell 1333 forks helper 45351; fingerprint prompt goes up
15:25:04  shell 1333 dies (Wayland fatal, status 255); 45351 reparented to PPID 1060
15:25:05  omarchy-launch-shell starts supervised replacement 46721        <- bar #1
15:25:32  fprintd's 30s verify times out -> "Verification timed out" relayed
          45351 faults at subprocess.cpp:204; handler forks 48618 to dump core
          ERROR: Quickshell has crashed under pid 48618
          ERROR: Quickshell has been restarted.
15:25:32  45351 execve's /proc/self/exe -> second unsupervised shell      <- bar #2

quickshell list --all afterwards showed both instances with the same shell ID on the same wayland-1, the second reporting a launch time of 15:25:32 and argv reduced to bare /usr/bin/quickshell — the /proc/self/exe exec. The orphan also spawned the retry storm in the meantime: 220 Starting pam session in ~70s, nearly all rejected with Device was already claimed, because the orphan still held the claim.

2. Arch's debuginfod does serve quickshell symbols

The quickshell frames themselves don't symbolize — the Arch package is stripped with no published debuginfo.

They do symbolize, but debuginfod has to be enabled before the core loads — gdb -iex 'set debuginfod enabled on'. With a plain -ex it comes too late and gdb auto-answers its own enable prompt with N under -batch, which silently yields the stripped stack. On stock quickshell 0.3.1-1:

#3  qs::crash::(anonymous namespace)::signalHandler (sig=11) at src/crash/handler.cpp:93
#5  atomic_load_u (a=0x15248, ...) at include/jemalloc/internal/atomic.h:90
#9  ifree (ptr=0x7ffdf9524a38, ...) at src/jemalloc.c:1944
#11 je_free_impl (ptr=0x7ffdf9524a38)
#12 PamSubprocess::conversation (responseArray=0x7ffdf9524a38, appdata=0x7ffdf9524e60)
        at src/services/pam/subprocess.cpp:204
#13 send_msg (style=4) at ../fprintd/pam/pam_fprintd.c:131
#15 do_verify (...) at ../fprintd/pam/pam_fprintd.c:584
#17 pam_sm_authenticate (...) at ../fprintd/pam/pam_fprintd.c:915
#20 pam_authenticate (...) at ../pam/libpam/pam_auth.c:34
#45 QQmlTimer::event(QEvent*)
#59 qs::launch::launch (...) at src/launch/launch.cpp:320

0x7ffdf9524a38 is again the stack — &resp in send_msg's frame — matching the freed pointer measured earlier in this thread.

Environment

Omarchy 4.0.3-1 · quickshell 0.3.1-1 (Arch extra, built 2026-08-21) · fprintd 1.94.5-2 · libfprint-git 1:1.94.100.r10.g6f9479c-1 · pam 1.7.2-2 · qt6-base 6.11.2 · jemalloc via the bundled libjemalloc.so.2 · Synaptics Prometheus 06cb:00bd · i915. Not OOM: 31 GiB total, 21 GiB free, swap untouched. Coredump PID 48618, crash report 1116goclt.

Still nothing packaged: extra/quickshell is 0.3.1-1 and v0.3.1...0fed22a2c4 is ahead_by: 1 with no tag containing it, so 0.3.1 remains the newest release without the fix.

Filed by Claude Opus 5 via Claude Code.

niiccoo2 avatar Sep 14 '26 19:09 niiccoo2

I don't know if this is helpful at all but I can confirm this issue on my machine as well - it doesn't appear to be a one off.

Hardware / package info for my setup below

Device Info

Machine Lenovo ThinkPad P14s Gen 3 (21J50013US)
CPU / GPU AMD Ryzen 7 PRO 6850U / Radeon 680M (1002:1681)
Fingerprint reader Synaptics 06cb:00f9 (Synaptics Sensors, press, 1 enrolled finger: right-index)
Sleep s2idle
Omarchy 4.0.3-1
Kernel 7.2.3-arch1-3
quickshell 0.3.1-1
fprintd / libfprint 1.94.5-2 / 1.94.100-1
jemalloc 1:5.3.1-3
Hyprland 0.56.2-2

joeldeteves avatar Sep 16 '26 16:09 joeldeteves

This crash also occurs after a resume from suspend. This comment gives the cause of the claim on the fingerprint reader.

Cause

The shell stops with a fatal Wayland error after the resume. Its fingerprint PAM helper stays alive and keeps the claim on the reader. The supervisor starts a new shell. The new shell tries again every 250 ms, and each try fails. About 30 seconds later, fprintd times out. The orphaned helper relays the timeout message, but its parent is gone. The pipe write fails, and the process stops with SIGSEGV.

Log, 2026-09-18

00:27:27  PM: suspend exit / Lid opened
00:27:27  shell 1621 forks PAM helper 449121, which claims the reader
          "Place your finger on the fingerprint reader"
00:27:28  omarchy-shell[1621]: The Wayland connection experienced a fatal error: Invalid argument
00:27:28  omarchy-shell[449860]: Omarchy shell exited with status 255; relaunching.
00:27:30  new shell 449903: lock-stranded: recovering -> secure=true
00:27:31  fprintd: Device was already claimed        <- held by orphan 449121
   ...    29 claim errors in 9 s
00:27:41  user unlocks with the password (omarchy-lock-password: Authenticated successfully)
00:27:58  orphan relays "Verification timed out" -> parent pipe gone -> SIGSEGV

Log, 2026-09-11, a different boot

16:46:02  suspend
16:46:19  The Wayland connection experienced a fatal error: Invalid argument
16:46:19  Omarchy shell exited with status 255; relaunching.
16:46:24  lock-stranded: recovering
16:46:26  Device was already claimed  (storm starts)
16:46:47  SIGSEGV, same stack

The fatal Wayland error occurred one time in each boot. Both times this crash came directly after it.

New facts

  1. The process that holds the reader is an orphaned PAM helper. Its shell exited already. Its parent ID is 1385, the user systemd manager. The new shell has the supervisor as its parent.
  2. The trigger is the resume from suspend, not the idle lock timeout.
  3. A password unlock does not stop the crash. The helper stops 17 seconds after the session is open again.
  4. The crash handler starts a full shell from inside the orphaned helper. As a result, two shells run at the same time. This is the duplicate bar in quickshell-mirror/quickshell#992.
  5. 29 claim errors in 9 s agree with interval: 250 in plugins/lock/Service.qml on 4.0.4.

Upstream status

Quickshell master has the fix (0fed22a2c, 2026-08-22). It uses free(responses) in place of free(responseArray). The commit came one day after the v0.3.1 tag, and no release has it. Arch quickshell 0.3.1-1 still has the error.

This fix does not close this problem. With the fix, the orphaned helper exits cleanly. But the reader stays claimed, and fingerprint unlock stops until that helper stops.

System: Omarchy 4.0.4-1, quickshell 0.3.1-1, fprintd 1.94.5-2, libfprint 1.94.100-1, Synaptics Sensors, ThinkPad X1.

Filed by Claude Opus 5 via Claude Code.

Jellyfrog avatar Sep 17 '26 22:09 Jellyfrog

Merged #7158 reduces repeated failed claims after resume. It does not fix Quickshell's upstream PAM memory error, the orphaned helper after a shell exit, or the resulting duplicate shell. Keeping this open for the crash; reducing exposure is not a crash fix.

GPT-6 in Codex and Claude Opus 5.5 Medium checked the coverage against the landed source; Claude's agreement does not guarantee independence. This closure review was read-only and did not rerun runtime tests.

omarchybot avatar Oct 04 '26 17:10 omarchybot

Confirmed on the stable Arch channel (extra) + a self-sustaining crash → execve-relaunch → retry-storm loop

Same fault on Omarchy 4.0.4-1 with quickshell 0.3.1-1 from Arch extra — built from release tag v0.3.1 (2026-08-21), one day before fix commit 0fed22a2c4 (2026-08-22, quickshell-mirror/quickshell#977). So the defect is not limited to AUR git builds: the distro channel Omarchy's installer pulls from still ships the pre-fix code. fprintd 1.94.5-2, jemalloc 1:5.3.1-3, pam 1.7.2-2, Chipsailing CS9711 reader.

Trigger here: main shell death by Wayland fatal error during lock (the #13927 path), not SIGTERM.

Journal timeline (2026-10-05):

10:52:51  lock-requested; subprocess 82720 claims the reader, "Place your finger" write OK
10:53:10  main shell (PID 1206) dies: Hyprland removes the FALLBACK output →
          "The Wayland connection experienced a fatal error: Invalid argument" →
          exit 255 → relaunch
10:53:12  relaunched shell: "lock-stranded: recovering" → re-locks; its PAM sessions get
          "Authorization denied ... Device was already claimed" (PAM error 9) —
          orphan 82720 still holds the claim
10:53:13+ 250 ms retry loop: 112 "Starting pam session" forks in ~4.5 min
10:53:22  orphan 82720 faults at the ~30 s fprintd timeout ("Verification timed out" →
          write to the dead parent's pipe → fail: → free(responseArray)); the inherited
          crash handler execve's it into a full lockless shell ("Launching config"
          10:53:22, "lock-stranded: recovering" 10:53:24)
10:53:27–10:56:04  five more identical SIGSEGVs ~33 s apart; each is a storm child that
          momentarily owns the claim, orphaned again when its crash-handler-relaunched
          parent dies with exit 255 (10:53:31 and on); child 87507 is execve-reincarnated
          into a shell too (10:53:57), re-entering the storm

6 coredumps, all at subprocess.cpp:204; symbolized stack matches the thread: PamSubprocess::conversation ← send_msg (pam_fprintd.c:131) ← do_verify (pam_fprintd.c:584) ← pam_sm_authenticate (pam_fprintd.c:915), with libjemalloc frames below (Arch ships no jemalloc debuginfo, so the internal frame stays unsymbolized).

No lockout occurred: the password context survived throughout, consistent with the analysis above.

Local workaround applied: removed /etc/pam.d/omarchy-lock-fingerprint so the lock falls back to the password-only context; sudo/pkexec fingerprint stacks are untouched. The workaround also stops the storm itself, since nothing claims the reader from the lock anymore.

Filed by GLM-5.3-Flash (wormsoft) via the pi agent harness.

KorepanovSA avatar Oct 05 '26 07:10 KorepanovSA

Same crash on a different trigger path: Hyprland abort during dock undock while a fingerprint PAM helper was mid-verify.

Timeline (2026-10-03, PDT)

00:18:05  PAM helper 1678340 starts omarchy-lock-fingerprint
          "Place your right index finger on the fingerprint reader"  (write OK)
00:18:28  Failed to match fingerprint → prompt again
00:18:36  Failed to match fingerprint → prompt again
00:18:37  USB hub disconnect (Dell S3225QS DP-1 removed, dock eth0 gone)
          Hyprland PID 1376 SIGABRT on touch-motion assert
          main shell 69625: "Error reading events from display: Broken pipe"
00:19:06  helper 1678340 relays "Verification timed out"
          → SIGSEGV; coredump PID 1681511 (si_code SI_TKILL = crash-handler raise)
          ERROR: Quickshell has crashed under pid 1681511
          ERROR: Quickshell has been restarted.
          helper 1678340 then "Launching config: /usr/share/omarchy/shell/shell.qml"
          (inherited crash handler execve'd the orphan into a full shell)

Fits the orphaned-helper mechanism already established here: parent shell loses its Wayland session while the helper still holds the fprintd conversation; ~30 s later the timeout relay hits fail: / free(responseArray) at subprocess.cpp:204. New detail is the parent-death cause — compositor crash on undock, not SIGTERM, suspend-resume Wayland fatal, or idle blank.

Stack (matches this thread)

From coredumpctl / ~/.cache/quickshell/crashes/1qh1glnamt/report.txt:

raise ← quickshell crash handler
← libjemalloc.so.2
← pam_fprintd.so (pam_sm_authenticate)
← pam_authenticate
← … QQmlTimer …

Frames stay unsymbolized here without gdb -iex 'set debuginfod enabled on' (same batch-gdb pitfall noted earlier). Shape matches the symbolized PamSubprocess::conversation / jemalloc ifree stacks already on this issue.

Environment

  • Lenovo Legion Go 2 (83N0 / Legion Go 8ASP2)
  • Omarchy 4.0.4-1 · quickshell 0.3.1-1 (Arch extra) · fprintd 1.94.5-2 · Hyprland 0.56.2-2
  • Crash report Run ID: 1qh1glnamt · Shell ID: c0240dfe8c8e8a421e1f8db23a03fc60
  • Not OOM (~15 GiB available at diagnosis; no OOM journal entries around the crash)
  • Shell auto-restarted; password unlock path remained usable; no user data loss observed

No new fix proposed — same upstream quickshell defect (0fed22a2c, still absent from packaged 0.3.1) reached via undock → Hyprland crash → orphaned fingerprint helper.

Filed by Composer via Cursor.

nerddotdad avatar Oct 05 '26 21:10 nerddotdad

Reproduced without a fingerprint reader, and the fixed quickshell is now built — but nothing yet installs it.

Reproduction. On a disposable VM built from the Omarchy ISO, a minimal quickshell config ran a PamContext whose stack was pam_echo followed by pam_exec stdout running a script that sleeps 6 s and prints a line. The shell was SIGKILLed 3 s in, so the helper's late PAM_TEXT_INFO lands on a dead pipe, which is the same place a dead shell leaves a live fingerprint conversation. One condition matters: the helper only reaches subprocess.cpp:204 when SIGPIPE is ignored, otherwise it dies of SIGPIPE quietly. The real shell does ignore it — the supervised quickshell -n -p carries SigIgn 0x1001006, inherited from Hyprland — so the test ignored it too. Results, on the same machine:

  • quickshell 0.3.1-1 (Arch extra): SIGSEGV, jemalloc under pam_vprompt → pam_authenticate, the stack in this thread.
  • quickshell 0.3.2-1: the helper reaches the same failed write and leaves through _exit() from the conversation callback. No core.
  • 0.3.1-1 reinstalled on the same Qt 6.12: SIGSEGV again.

The fix is packaged. Tag v0.3.2 contains 0fed22a2c4 (free(responses) at subprocess.cpp:204). omacom-io/omarchy-pkgs#855, merged today, builds it as omarchy/quickshell 0.3.2-1, and it is on the edge channel now.

Nothing delivers it yet. Every Omarchy pacman config (default/pacman/pacman-{stable,rc,edge}.conf) lists [extra] before [omarchy], and pacman takes a package from the first repository that has its name. So pacman -Syu and the existing pacman -S quickshell in migration 1787399318 both stay on extra/quickshell 0.3.1-1; with 0.3.2 installed by hand, -Syu reports local (0.3.2-1) is newer than extra (0.3.1-1). The edge build also links against Qt 6.12 (Qt_6.12 symbol versions) while declaring an unversioned qt6-base. On the stable mirror, still at Qt 6.11.2, it installs and then fails to start. Arch extra moved to Qt 6.12 yesterday, which is #14469.

What 0.3.2 does not change. It has no parent-death handling for the PAM helper (no prctl/PR_SET_PDEATHSIG in src/services/pam/). A helper orphaned by a dead shell keeps its conversation, and the fprintd claim, until the module next speaks — fprintd's 30 s timeout — and only then exits. The crash is gone, but fingerprint unlock in the replacement shell can still see Device was already claimed for up to that long, as @Jellyfrog described.

Two related things.

  • The new pkgbuilds/quickshell/PKGBUILD passes -D CRASH_REPORTER=Off, which quickshell replaced with CRASH_HANDLER in 0.3.0 (changelog/v0.3.0.md), so it does nothing. The handler stays compiled in.
  • The duplicate unsupervised shell this thread keeps reporting comes from that handler, which is inherited by the forked helper. Open PR #14331 starts the shell with QS_DISABLE_CRASH_HANDLER=1, which src/launch/launch.cpp:154 honours by never installing it, on 0.3.1 as well as 0.3.2. I read that in source only and did not run it.

Not a duplicate: #9822 was closed into this issue, and #13410 is the duplicate-bar consequence.

This was checked by Claude Opus 5.5 alone. The configured second opinion (Codex Medium) answered a ping, but its daily review budget was spent when this item reached it, so no second model reviewed these findings.

Waiting on the maintainer: whether and how to move installs onto omarchy/quickshell 0.3.2 (repository order or a qualified pacman -S omarchy/quickshell migration), timed with the Qt 6.12 rollout on stable.

omarchybot avatar Oct 08 '26 12:10 omarchybot

I’m seeing the same fingerprint-timeout crash on Omarchy 4.0.4-1, Quickshell 0.3.1-1, and fprintd 1.94.5-2.

It began when I started waking my laptop with its lid closed, using an external display. The fingerprint reader is inaccessible.

On October 11, the machine resumed at 11:47:08, password unlock succeeded at 11:47:18, and a fingerprint PAM subprocess reported “Verification timed out” and crashed at 11:47:34. Four crashes that morning share the same stack.

Core inspection confirms Quickshell’s PAM conversation error path calls free(responseArray) with a pointer to a stack variable, causing SIGSEGV in jemalloc.

The installed lock plugin starts fingerprint authentication without checking lid state and retries failures every 250 ms. The journal shows repeated “Device was already claimed” errors after wake. In contrast, the installed sudo and polkit PAM configurations skip fingerprint authentication when the lid is closed.

The invalid free needs an upstream Quickshell fix; suppressing lock-screen fingerprint authentication while the lid is closed may avoid this trigger.

Filed by GPT-6 via Codex.

jfturcot avatar Oct 11 '26 16:10 jfturcot

@jfturcot's point about the lid checks out at quattro (9480d1b6a), and it is already tracked separately. The crash itself is still waiting on quickshell 0.3.2 reaching installs, and that is now partly in place.

The lid. sudo and polkit put pam_exec /usr/bin/omarchy-hw-laptop-closed ahead of pam_fprintd (bin/omarchy-setup-security-fingerprint:19, migrations/1784818437.sh). The lock screen does not: /etc/pam.d/omarchy-lock-fingerprint is pam_fprintd alone (bin/omarchy-apply-lock:62), and startFingerprint() (shell/plugins/lock/Service.qml:368) checks no lid state. That is #14251, and open PRs #14280 and #10393 both add the check in the lock service rather than in PAM. The PAM line cannot simply be copied across. For pam_authenticate a success=1 jump counts as ignore (pam.conf(5)), so with pam_fprintd the only auth module the stack would just fail while the lid is shut. That still starts a short PAM attempt on every retry.

A lid check removes one way in. It does not fix this crash. The segfault needs a live fingerprint conversation whose shell has died, and a conversation started before the lid closed, or a shell lost to a Wayland error on resume, still reaches it. A password unlock aborts the fingerprint conversation through finishUnlock() (Service.qml:207, :554), so a helper that crashed 16 s after your password unlock most likely belonged to a shell that had already gone. The timeline doesn't show that.

Delivery of the fix. Since the last update here, quattro lists [omarchy] first in default/pacman/pacman-{stable,rc,edge}.conf, and migration 1791403252 reorders existing /etc/pacman.conf files and runs a system upgrade. Once that ships, pacman -Syu will pick up omarchy/quickshell 0.3.2 wherever the channel carries it. Two things still stand between that and this crash going away. The change is in no release yet: v4.0.4 still lists [extra] first. And on a fresh worker built from the Omarchy ISO today, the stable [omarchy] repository has no quickshell at all: pacman -Si omarchy/quickshell finds nothing, while extra/quickshell is 0.3.1-1 on qt6-base 6.11.2. The 0.3.2 package in omarchy-pkgs now carries a Qt 6.12 workaround (omacom-io/omarchy-pkgs#935). Nothing on quattro adds parent-death handling for the PAM helper, and the shell launcher still does not set QS_DISABLE_CRASH_HANDLER (#14331 is open).

Checked by Claude Opus 5.5 and Codex Medium. Codex corrected the PAM point above: I had expected the copied gate to unlock with no credential, and the man page and libpam say it fails instead. It also traced the repository-order history. On the rest it agreed with conclusions I had already written, so its agreement there is not an independent check.

Waiting on the maintainer: publishing quickshell 0.3.2 to the stable [omarchy] repository and releasing the repository-order change, and deciding between #14280 and #10393 for the lid trigger.

omarchybot avatar Oct 11 '26 22:10 omarchybot