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.

Bug 1981001

Summary: postgresql-jdbc: FTBFS because tests cannot connect to database server on localhost
Product: Red Hat Enterprise Linux 9 Reporter: Florian Weimer <fweimer>
Component: postgresql-jdbcAssignee: Ondrej Dubaj <odubaj>
Status: CLOSED NOTABUG QA Contact: RHEL CS Apps Subsystem QE <rhel-cs-apps-subsystem-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, databases-maint, fjanus, jwboyer, pkubat, praiskup
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-21 14:17:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1981013    
Bug Blocks:    
Attachments:
Description Flags
build.log.xz
none
build.log.xz from second type of failure none

Description Florian Weimer 2021-07-10 12:05:40 UTC
Created attachment 1800250 [details]
build.log.xz

A rebuild of postgresql-jdbc-42.2.18-4.el9 failed. I'm attaching the build log.

This may be a glibc/kernel problem. I will try to reproduce and investigate.

Comment 1 Florian Weimer 2021-07-10 12:12:05 UTC
I can reproduce with kernel-4.18.0-240.15.1.el8_3.x86_64. Probably same cause as bug 1980990.

Comment 2 Florian Weimer 2021-07-10 13:19:21 UTC
Sadly the pending glibc-2.33.9000-39.el9.i686 build does not fix this issue.

Comment 3 Florian Weimer 2021-07-10 14:04:34 UTC
The tests throw this Java exception:

Caused by: java.net.ConnectException: Function not implemented (connect failed)
        at org.postgresql.jdbc.NoColumnMetadataIssue1613Test.setUp(NoColumnMetadataIssue1613Test.java:30)

clock_gettime in glibc started clobbering errno, exposing an OpenJDK bug.

Comment 4 Florian Weimer 2021-07-13 18:03:34 UTC
I managed to run a scratch build of postgresql-jdbc-42.2.18-4.el9 on an i686 builder, this time with glibc-2.33.9000-42.el9. The build passed, so this was really the glibc vDSO/ENOSYS issue.

However, a second build failed with a different error (“Connection refused”, not “Function not implemented”). Is the test suite known to be flaky?

The database password isn't random, so if a different buildroot running on the same builder picks the same buildroot, the tests could interfere with each other, without a clear error.

Comment 5 Florian Weimer 2021-07-13 18:04:18 UTC
Created attachment 1801250 [details]
build.log.xz from second type of failure

Comment 6 Ondrej Dubaj 2021-07-19 06:37:13 UTC
The testsuite should not be flaky. It is probably caused by glibc issues, but let me investigate the problems.

Comment 7 Ondrej Dubaj 2021-07-19 07:19:31 UTC
Currently I got 2 failed builds from 8. The problem does not seem to be bind to postgresql-jdbc as you said. Th problem is simple, during the testsuite, each test tries to connect to psql database and it fails. From this reason each test fails.

Comment 8 Ondrej Dubaj 2021-07-21 14:17:02 UTC
Made another ~20 builds and none of them failed. This issue seems to be resolved by postgresql update or fixing the glibc issue or something different, closing as NOTABUG. If the problem will be present and reproducible, please reopen this issue.