void-linux / void-linux/void-runit
zzz reports `zzz: another instance of zzz is running` with mounted external hard drive because `/sys/power` cannot be locked
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 245
- Forks
- 67
- Avg merge
- 2d
- Merged PRs (30d)
- 2
Description
I have a setup with a 2TB Intenso HDD connected externally and when the disk is mounted, zzz will report
sudo zzz
zzz: another instance of zzz is running
Unmounting the disk through a /etc/zzz.d/suspend script has no effect because zzz never gets there, it fails to get the lock on /sys/power. Unmounting the disk prior to executing zzz allows the lock to be acquired.
Changing the script to
echo "yawn."
) 9>/var/lock/zzz.lock
always works and there are no issues. I also do not understand the very specific choice of /sys/power as a lock target.
Contributor guide
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.
Research direction
Start by locating where zzz acquires its lock on /sys/power and compare that path with the /var/lock/zzz.lock workaround shown in the report. Reproduce with the external HDD mounted and unmounted; done should mean zzz no longer reports another instance incorrectly and the existing suspend hook behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100