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

Improve debuggability in case of a stale LockFile #232

Open
league opened this issue Apr 18, 2024 · 3 comments · May be fixed by #234
Open

Improve debuggability in case of a stale LockFile #232

league opened this issue Apr 18, 2024 · 3 comments · May be fixed by #234
Assignees
Labels

Comments

@league
Copy link
Collaborator

league commented Apr 18, 2024

As noted in the comment on the LockFile constructor, it quietly busy-waits if a stale lock file is left behind after abnormal exit.

Should be relatively easy just to emit a message after a few seconds of busy waiting (Greg's suggestion).

In addition, if we store the PID (+hostname?) as suggested in the comment, then there is more information available for troubleshooting.

Issue pointed out as part of this ng-dp issue.

@league league added the feature label Apr 18, 2024
@league league self-assigned this Apr 18, 2024
@dentalfloss1 dentalfloss1 self-assigned this May 14, 2024
@dentalfloss1
Copy link
Collaborator

I'm working on this a bit since it is affecting some of my code

@dentalfloss1
Copy link
Collaborator

I should have looked at this more carefully, I see @league has already made some progress

@dentalfloss1 dentalfloss1 removed their assignment May 14, 2024
@league
Copy link
Collaborator Author

league commented May 19, 2024

@dentalfloss1 Thanks, it's okay. I saw something from you on Slack involving chrono, did you delete that branch?

I think my solution works and will help, but we can compare notes. The only question I have is whether this type of message on cerr would have been useful in figuring out that the "stuck" behavior is due to a leftover lock file. (We likely wouldn't have cerr redirected somewhere less visible, right?) I'll make a PR for visibility.

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

Successfully merging a pull request may close this issue.

2 participants