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

Open
#127 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.