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

When there is a lockfile timeout, show the pid of the process that holds the lock #201

Open
thaljef opened this issue Mar 24, 2015 · 7 comments

Comments

@thaljef
Copy link
Owner

thaljef commented Mar 24, 2015

Maybe even offer to steal the lock if the process appears dead. Beware of NFS situations, where the process could be on another server.

@celogeek
Copy link

Also a good option could be --retry-forever
So if we can't get the lock, we retry until we got it.

We have made automatic injection system, that grep the error and loop until it works.
We a --retry-forever option it would ease that situation.

@thaljef
Copy link
Owner Author

thaljef commented Apr 22, 2015

Retrying forever seems a bit dubious to me. There is a PINTO_LOCKFILE_TIMEOUT environment variable you can set though. Not sure if that is documented.

@celogeek
Copy link

can we set PINTO_LOCKFILE_TIMEOUT=-1 or =0 mean forever ?

The forever is more because we have numerous to work on pinto, and it has no queue for processing. So trying to steal lock as soon as possible could be great. But we need to complete the operation under an automatic process.

@cakirke
Copy link
Contributor

cakirke commented May 5, 2015

looks like File::NFSLock supports stale_lock_timeout, could expose it via PINTO_ env and document interaction if ultimate goal is not "wait forever" but "wait suitably long, then steal the lock"

also, with a (very) quick look at File::NFSLock internals, i don't see it setting the holder pid on failure - a chicken/egg issue for reporting it on failure

@thaljef
Copy link
Owner Author

thaljef commented May 5, 2015

can we set PINTO_LOCKFILE_TIMEOUT=-1 or =0 mean forever ?

Yes, it looks like 0 means forever.

@thaljef
Copy link
Owner Author

thaljef commented May 5, 2015

i don't see it setting the holder pid on failure - a chicken/egg issue for reporting it on failure.

I think we'll just have to parse that from the contents of the lock file itself (or patch File::NFSLock).

@cakirke
Copy link
Contributor

cakirke commented May 8, 2015

proposed hookbot/File-NFSLock#3, if accepted, it should cover the reporting issue.
continuing with the stale lock/steal lock portion of this.

@cakirke cakirke mentioned this issue May 10, 2015
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

3 participants