Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1618713[details]
A patch based on the upstream patch that resolves the issue
Description of problem:
A deadlock occurs when connecting to Postgresql using SSL with postgresql-libs in a multi-threaded environment with other threads performing SSL independently. This issue has been causing Module Build Service (https://pagure.io/fm-orchestrator) outages, which is deployed on RHEL 7.4 but with the latest postgresql-libs package installed.
You can find a reproducer script and a more in-depth description of the issue here:
https://postgrespro.com/list/thread-id/1861629
The upstream patch that resolves this issue is here:
https://commitfest.postgresql.org/4/140/
The patch does not apply cleanly, but I attached a patch that worked for our team.
Version-Release number of selected component (if applicable):
postgresql-libs-9.2.24-1.el7_5.x86_64
How reproducible:
Easily reproducible. See the reproducer script in this upstream discussion:
https://postgrespro.com/list/thread-id/1861629
Actual results:
A deadlock occasionally occurs.
Expected results:
A deadlock does not occur.
Hi,
I was trying to reproduce this bug on various version of RHEL(7.4,7.7,7.8) by using attached reproducer, but I am not able to attain deadlock. Are you able to add here Your configuration? (openssl package version and pg_hba.conf).
Hi Filip,
I attached a short video that shows the deadlock and I attached a slightly modified version of the Python 2 reproducer script that I used. It usually takes less than a couple of minutes for the deadlock to occur, but it took only a few seconds in the video I shared.
We are currently using openssl-1.0.2k-16.el7_6.1.x86_64 on the server that ran the reproducer script and on the server with Postgresql. As for the contents of pg_hba.conf, there is nothing special. We have one `hostssl` entry for MBS to connect to using a password.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:1182