Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lockfile handling doesn't account for an already-terminated pid #515

Open
lycurgus opened this issue Sep 18, 2023 · 0 comments
Open

Lockfile handling doesn't account for an already-terminated pid #515

lycurgus opened this issue Sep 18, 2023 · 0 comments

Comments

@lycurgus
Copy link

See urbit/urbit#6795 - when u3_disk_acquire attempts to kill the pid it finds in the lockfile, it doesn't account for the pid already being gone. In such a case kill will return -1 with ESRCH and vere can (presumably) delete the lockfile and proceed. Currently the operator has to investigate, determine that the lockfile's pid is already gone, and delete the lockfile manually in order to boot.

It seems like disk.c needs another check that handles ESRCH coming back from kill. Potentially just amending line 780 to read if ( -1 != ret || errno != ESRCH ) { - but that seems somewhat like a loss of legibility. I figured I'd raise an issue since my u3 isn't really at a level to raise a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant