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

resource temporarily unavailable needs a better error #1958

Closed
jackzampolin opened this issue Aug 10, 2018 · 3 comments
Closed

resource temporarily unavailable needs a better error #1958

jackzampolin opened this issue Aug 10, 2018 · 3 comments
Labels

Comments

@jackzampolin
Copy link
Member

This error currently happens when the lcd is running and you try to use gaiacli on the same machine to access the keystore. Perhaps list the resource and mention that its likely being used by a running process. Suggest fixes to the issue such as shutting down the process (likely the lcd)

@mslipper
Copy link
Contributor

I took at look at this one. resource temporarily unavailable is coming from LevelDB's underlying filesystem lock. That lock is created by the flock(2) Linux syscall. We can determine if that lock is in place via the following methods:

  1. EWOULDBLOCK is returned by the kernel when attempting a flock of our own. We'd need to unlock the FS again afterwards.
  2. We run a regex (or something similar) over the error message.

Both cases are tough from a portability/maintainability perspective. I recommend adding documentation around this outside of the daemon itself.

@alexanderbez
Copy link
Contributor

Nice digging @mslipper 👍

@jackzampolin
Copy link
Member Author

Agreed @mslipper Thanks for digging into this. I've opened an issue to track that.

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

4 participants