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

stack path tries to acquire lock #872

Closed
thomasvnoort opened this issue Aug 28, 2015 · 9 comments
Closed

stack path tries to acquire lock #872

thomasvnoort opened this issue Aug 28, 2015 · 9 comments
Milestone

Comments

@thomasvnoort
Copy link

Our build environment uses stack path to figure out where to get the binaries to archive. Right now this causes builds to be slow since this step waits for other stack instances in concurrent build jobs to release their lock.

I'd expect stack path to not require any locking at all since it just prints some path information, but I might be overlooking something here.

@thomasvnoort thomasvnoort changed the title stack --path tries to acquire lock stack path tries to acquire lock Aug 28, 2015
@chrisdone
Copy link
Member

Is that on master?

@thomasvnoort
Copy link
Author

Sorry, forgot to mention a version. But yes, this happens both with the 0.1.3.1 release and master.

@snoyberg
Copy link
Contributor

@rrnewton any thoughts on the locking issue here?

@snoyberg snoyberg added this to the 0.3.0.0 milestone Aug 30, 2015
@rrnewton
Copy link
Contributor

Sure, if it doesn't side effect the snapshot it should be another exception. I was conservative about locking things.

I'm pretty busy here at ICFP this week, and then PPoPP next week, but if it's not urgent I can get to these little fixes after next week.

@snoyberg
Copy link
Contributor

This should be much less of a problem now that locking is disabled by default, closing.

@thomasvnoort
Copy link
Author

I'm a bit confused here, isn't locking required to stay safe when running multiple instances of stack? If so, this issue remains an issue for us and our build environment.

@snoyberg
Copy link
Contributor

Not that I'm aware of, see: #950 (comment)

In any event, stack path definitely is safe without locking.

@thomasvnoort
Copy link
Author

Thanks for clarifying, we'll see how this works out in practice :)

@rrnewton
Copy link
Contributor

rrnewton commented Oct 6, 2015

Hi @thomasvnoort,

I wrote a tiny patch that includes stack path in the opt-out-of-locking exceptions, together with the original set of non-locking commands, which are enumerated in the pull request here.

I made a pull request (#1112) with the patch.

snoyberg added a commit that referenced this issue Oct 6, 2015
Allow stack path to release the lock immediately.  Fixes #872
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

4 participants