Add missing exec to non-root branch of svc-qbittorrent s6 run script#436
Merged
Conversation
Without exec, bash spawns s6-notifyoncheck -d as a child; the -d flag causes s6-notifyoncheck to daemonize, the bash script exits, and the s6-rc supervisor tears down the service group — SIGTERMing the orphaned qBittorrent process within ~1s of every start when LSIO_NON_ROOT_USER is set. The root branch has used exec since c828bd5 (2022-09-20, "Exec notify"). The else branch was added in 016be7b (2024-12-20, "Support nonroot operation") without the matching exec. Restore symmetry. Closes linuxserver#435 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Thanks for opening this pull request! Be sure to follow the pull request template!
thespad
approved these changes
May 13, 2026
Member
|
Thanks for catching this. |
1 task
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Add the missing
execkeyword to the non-root branch of the svc-qbittorrent s6 run script. Without it, bash spawnss6-notifyoncheck -d ...as a child; the-dflag causes s6-notifyoncheck to daemonize, the bash script exits, and the s6-rc supervisor tears down the service group — SIGTERMing the orphaned qBittorrent process within ~1s of every start.The root branch has used
execsince c828bd5c (2022-09-20, "Exec notify"). The else branch was added in 016be7b8 (2024-12-20, "Support nonroot operation") without the matchingexec. The bug was latent for ~17 months, likely made deterministic by 5152b908 (2026-05-04, "Switch to static builds for v2") which changed startup timing.Closes #435
Benefits of this PR and context:
Restores non-root operation (k8s
securityContext.runAsUser, Podman rootless, any environment that setsLSIO_NON_ROOT_USER). Currently-affected users have to pin to5.1.4-r2-ls443or earlier.Distinct from #430 / #432 / #433 / #434 (upstream qBittorrent lockfile race, resolved by deleting the lockfile) — those reports describe "WebUI not accessible" or "container hangs" without exit signal. This bug terminates the container with exit 137 within ~1s and tight-loops.
How Has This Been Tested?
Root-cause established by static analysis:
root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/runonmaster— confirmed asymmetricexec(root branch has it, else branch doesn't).016be7b8viagit log -- root/etc/s6-overlay/s6-rc.d/svc-qbittorrent/run— the else branch was added without the matchingexec.Triggering symptom observed in production:
qBittorrent termination initiatedlog line within ~1s of startup, exit 137, tight pod restart loop on5.2.0_v2.0.12-ls455in a k8s cluster withsecurityContext.runAsUserset to a non-zero UID. Workaround currently in place is pinning to5.1.4-r2-ls443.End-to-end validation of the patch (build the fixed image, deploy to the affected k8s cluster, watch a non-root pod run cleanly) has not yet been performed — submitting on the strength of the static analysis since the asymmetry is unambiguous and the fix is the minimal change to restore symmetry with the working root branch. Happy to test against a CI build of the patched branch if that's preferred before merge.
Source / References:
exec notifyon root branch: c828bd5c