Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 1618713 Details for
Bug 1755154
postgresql-libs - Deadlocks occur when using SSL in a multi-threaded environment
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh92 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
A patch based on the upstream patch that resolves the issue
fix-libpq-ssl-deadlocks.patch (text/plain), 1.42 KB, created by
Matt Prahl
on 2019-09-24 21:42:30 UTC
(
hide
)
Description:
A patch based on the upstream patch that resolves the issue
Filename:
MIME Type:
Creator:
Matt Prahl
Created:
2019-09-24 21:42:30 UTC
Size:
1.42 KB
patch
obsolete
>diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c >index f0a8f4e..9c5d695 100644 >--- a/src/interfaces/libpq/fe-secure.c >+++ b/src/interfaces/libpq/fe-secure.c >@@ -941,9 +941,12 @@ init_ssl_system(PGconn *conn) > > if (ssl_open_connections++ == 0) > { >- /* These are only required for threaded libcrypto applications */ >- CRYPTO_set_id_callback(pq_threadidcallback); >- CRYPTO_set_locking_callback(pq_lockingcallback); >+ /* These are only required for threaded libcrypto applications, but >+ * make sure we don't stomp on them if they're already set. */ >+ if (CRYPTO_get_id_callback() == NULL) >+ CRYPTO_set_id_callback(pq_threadidcallback); >+ if (CRYPTO_get_locking_callback() == NULL) >+ CRYPTO_set_locking_callback(pq_lockingcallback); > } > } > #endif /* HAVE_CRYPTO_LOCK */ >@@ -997,9 +1000,12 @@ destroy_ssl_system(void) > > if (pq_init_crypto_lib && ssl_open_connections == 0) > { >- /* No connections left, unregister libcrypto callbacks */ >- CRYPTO_set_locking_callback(NULL); >- CRYPTO_set_id_callback(NULL); >+ /* No connections left, unregister libcrypto callbacks, if no one >+ * registered different ones in the meantime. */ >+ if (CRYPTO_get_id_callback() == pq_threadidcallback) >+ CRYPTO_set_id_callback(NULL); >+ if (CRYPTO_get_locking_callback() == pq_lockingcallback) >+ CRYPTO_set_locking_callback(NULL); > > /* > * We don't free the lock array. If we get another connection in
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1755154
: 1618713 |
1629194
|
1629195