question-streaks lock: release removes a lock it no longer owns
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 62/100
Research direction
Start in bin/question-streaks.sh at the age check [ "$age" -gt 120 ] that reclaims $LOCK, then follow the release path that calls rmdir without checking ownership. Read the owner-token fix referenced from PR #191 and port that token write/check pattern here, re-checking the token before each rename under the lock. Add a test where holder A stalls past 120 s, B reclaims, and A's release leaves B's lock intact; done when that test and the existing script tests pass.
Written by the indexing model from the issue text.
Description
bin/question-streaks.sh reclaims a lock older than 120 s by age ([ "$age" -gt 120 ] && { rmdir "$LOCK"), and its release removes the lock without checking who holds it. A holder that stalls past 120 s then deletes the reclaimer's lock, and a third writer can race the second.
Same class as the P0 found in the thread index on https://github.com/STRML/autodream/pull/191, fixed there with an owner token that release checks before rmdir, and a token re-check before every rename under the lock. Port that pattern here, with a test where A's aged lock is reclaimed by B and A's release must leave B's lock alone.
- Dominant language
- Shell
- Stars
- 0
- Forks
- 2
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 26
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from STRML/autodream
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
tmo fallback fails when the caller's stdin is closedPossibly taken @STRML claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 32/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
humblemuzzu/dumbtv#206 ·
Maintainers usually reply within 2 days
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug infrastructure testing
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
agens-field/nuvrail#217 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
fosrl/windows-linux#91 ·
Maintainers usually reply within 1 day