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

Possible bug reacquiring lock in 372 agent #76

Open
jlashner opened this issue May 18, 2020 · 3 comments
Open

Possible bug reacquiring lock in 372 agent #76

jlashner opened this issue May 18, 2020 · 3 comments
Labels
agent: ls372 bug Something isn't working

Comments

@jlashner
Copy link
Collaborator

I was just looking through the 372 agent usage of release_and_acquire and I'm confused by this behavior:

if not self._lock.release_and_acquire(timeout=10):
self.log.warn(f"Failed to re-acquire sampling lock, "
f"currently held by {self._lock.job}.")
continue

This continue seems a bit sketchy as on the next iteration of the loop it'll try to release_and_acquire a second time, but having never actually re-acquired the lock...

@mhasself
Copy link
Member

Agreed. Not sure what the right fix is. Probably needs to return xxx rather than continue. One could imagine trying to reacquire again, later... but really this shouldn't be happening so failing out is probably advisable.

@jlashner
Copy link
Collaborator Author

I agree, maybe return False with that warning message instead of logging it?

@BrianJKoopman BrianJKoopman added the bug Something isn't working label Jun 22, 2020
@sanahabhimani
Copy link
Contributor

Was this fixed in the agent?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent: ls372 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants