-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
Segfault when used from rusoto and using sync functions #1174
Comments
This sounds like openssl/openssl#6214 - there's not really anything this library can do about it. You can use |
Ooof thanks. So all threads must be done before main ends? Presumably this is a problem for any lazy static tokio runtime that uses openssl? |
Yeah, it's not great :( I just went the |
where should that be called? the main thread before exit? |
Yep. |
Interesting thanks |
NOTE: During work on this patch, the application faulted very early in processing. This may have been due to a library issue around libssl setting an `_atexit()` handler that conflicts with the rust threading model. (see sfackler/rust-openssl#1174 and openssl/openssl#6214 for possibly related issues) Closes #645
openssl/openssl#6214 (comment):
@sfackler what do you think about setting that env var when building openssl? I'm not sure if |
That value is set at runtime, not compile time: https://github.com/sfackler/rust-openssl/blob/master/openssl-sys/src/lib.rs#L111 |
@sfackler hmm I'm not sure I follow - do users of |
It is called by the openssl crate automatically. |
I'm not sure where to ask about this.
Basically we have a simple program that is using rusoto to query aws. Rusoto's functions return futures but offer a
.sync()
function to run them in a lazy static runtime (https://docs.rs/rusoto_core/0.41.0/rusoto_core/struct.RusotoFuture.html#method.sync)roughly 10-30% of the time when the program is finished (ie after the last line of our main) we get this segfault
rusoto has a rustls option and if i switch to that nothing explodes
this is ubuntu 18.04 and open ssl
1.1.1-1ubuntu2.1~
also openssl is only coming from native-tls
The text was updated successfully, but these errors were encountered: