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

Nix sometimes creates lock files that persist upon process death. #12142

Open
2 tasks
elikoga opened this issue Jan 6, 2025 · 1 comment
Open
2 tasks

Nix sometimes creates lock files that persist upon process death. #12142

elikoga opened this issue Jan 6, 2025 · 1 comment
Labels

Comments

@elikoga
Copy link
Contributor

elikoga commented Jan 6, 2025

Describe the bug

Nix sometimes creates lock files that persist upon process death.

I have encountered this on a colleagues system before sometimes, but not reproducibly.

Someone also encountered this on #de:nixos.org today (Jan 6)

Relevant line for the lock:

fmt("waiting for lock on %s", Magenta(showPaths(lockFiles))));

This is unrelated to #1015 (different lock)

Steps To Reproduce

Expected behavior

Metadata

Additional context

Checklist


Add 👍 to issues you find important.

@elikoga elikoga added the bug label Jan 6, 2025
@Mic92
Copy link
Member

Mic92 commented Jan 7, 2025

The lock file might still exists but flock should still work regardless as it's based on the liveness of the lock holder process. It shouldn't matter for the correctness if the file exist. Are you sure the other process didn't exist at the time? This would be a kernel bug otherwise:

while (flock(desc, type) != 0) {

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

No branches or pull requests

2 participants