-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Panic if called within a tokio runtime on Linux #132
Comments
Fixes #184792 Reported on hwchen/keyring-rs#132
I hate to say this, but with the way the blocking interface in secret-service works, this is pretty much "as designed." I will take a note to mention this issue (and the workaround of using a separate thread for all keyring calls) in the docs for the secret-service keystore. Feel free to submit a PR for a suggested doc change. @landhb and I have talked about maybe building a "native" dbus keystore (based on the I've never really considered exposing an async interface to keyring because so many of the platform native keystores are synchronous. It feels like it would be disingenuous to claim the API was async when every call to every keystore other than secret-service would either block the runtime or spin up a separate thread to do the work. We might as well force the async client to spin up that thread (like we do now with secret service), so the client has control. |
tunnel: fix keyring panic on Linxu Fixes #184792 Reported on hwchen/keyring-rs#132
Yea, that's understandable. It's just unfortunate that this is a hidden problem that only pops up at runtime on Linux. Maybe something that could be done in secret-service, if using tokio as a runtime, is calling |
Feel free to file a secret-service issue and PR if you think you have an idea about how this could be done safely. |
Thanks to @connor4312 for the discoveries. Fixes hwchen#132. Fixes hwchen#133.
@brotskydotcom Could you possibly add this to the ReadMe? I was caught out with this on Linux now as since v3 I've specified keyring to use the same runtime as my application uses. Before v3, I just used the default feature set which used async-io. |
Yes, I will add this info to the ReadMe, together with advice to consider using |
Using the sync version was actually my solution in the end anyway. |
Calling
.get_password()
from within a Tokio runtime panics on Linux, using thelinux-secret-service-rt-tokio-crypto-openssl
feature.One workaround, which I'll probably take on my end, is to spawn the operation on another thread. A better but viral change would be exposing async methods to avoid zbus' blocking API.
microsoft/vscode#184792
The text was updated successfully, but these errors were encountered: