Bug 525792
Summary: | segmentation fault in openssl tests | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nikolai Lugovoi <nlugovoi> |
Component: | ruby | Assignee: | Jeroen van Meeuwen <vanmeeuwen+fedora> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 12 | CC: | jeremy, mtasaka, tagoh, vanmeeuwen+fedora |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-05-14 07:23:43 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Nikolai Lugovoi
2009-09-25 18:38:44 UTC
Looks like it is ruby garbage collection issue: sometimes SSLContext is freed in GC earlier than SSLSocket which still references such context. As ugly workaround, this patch seems to work: diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 4a4e60f..321132c 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -127,6 +127,8 @@ int ossl_ssl_ex_tmp_dh_callback_idx; static void ossl_sslctx_free(SSL_CTX *ctx) { + /* skip cleanup, if still referenced from one SSL socket, delay it to implicit calls from ossl_ssl_free */ + if(ctx && ctx->references == 3) return; if(ctx && SSL_CTX_get_ex_data(ctx, ossl_ssl_ex_store_p)== (void*)1) ctx->cert_store = NULL; SSL_CTX_free(ctx); This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping It seems that with current openssl-1.0.0-1.fc13 this issue does not happen. Perhaps this was bug in openssl. Once closing. |