
Issue #19386 has been updated by jprokop (Jarek Prokop). We have observed similar build failure on RHEL 9.1 system with Ruby 3.2. I executed a few builds, there were 2 kinds of issues: 1) tests got stuck as observed initially 2) tests failed after memory corruption (varying messages) when GC was interacting with OpenSSL memory. I observed the following messages in the logs just before build end: "double free or corruption (fasttop)", "corrupted double-linked list", "malloc chunk alignment error", "malloc_consolidate(): unaligned fastbin chunk detected" No other info to help debug was present in the logs. This happened on the OpenSSL 3.0.1 that Jun pointed out is on RHEL 9.1. These failures are no longer present with CentOS 9 Stream (preview for RHEL 9.2) where the openssl is in newer version: openssl-3.0.7. The environment is as follows: ``` <mock-chroot> sh-5.1$ cat /etc/os-release NAME="CentOS Stream" VERSION="9" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="9" PLATFORM_ID="platform:el9" PRETTY_NAME="CentOS Stream 9" ANSI_COLOR="0;31" LOGO="fedora-logo-icon" CPE_NAME="cpe:/o:centos:centos:9" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 9" REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream" <mock-chroot> sh-5.1$ rpm -qa openssl openssl-3.0.7-2.el9.x86_64 <mock-chroot> sh-5.1$ rpm -qa openssl-devel openssl-devel-3.0.7-2.el9.x86_64 ``` It is around OpenSSL memory management, as isolated OpenSSL tests fail the same as when you execute the whole test suite. To support this further, when I execute a build on RHEL 9.1, it either gets stuck or fails with the messages I outlined above. When I execute a build on an RHEL 9.2 equivalent, the build passes. There was no change in the contents of Ruby sources between these builds. Therefore I'd be inclined to believe that there was a problem with OpenSSL that was fixed in the rebase. ---------------------------------------- Bug #19386: `test_hmac.rb` of openssl is timeout on RHEL9 https://bugs.ruby-lang.org/issues/19386#change-101520 * Author: hsbt (Hiroshi SHIBATA) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I prepared new test instance of RHEL9 for https://rubyci.org/. But it stuck with openssl tests. see http://rubyci.s3.amazonaws.com/rhel9/ruby-master/log/20230127T003004Z.fail.h... I did bisect this issue. This issue caused by https://github.com/ruby/ruby/blob/master/test/openssl/test_hmac.rb#L23 ``` def test_dup h1 = OpenSSL::HMAC.new("KEY", "MD5") h1.update("DATA") h = h1.dup assert_equal(h1.digest, h.digest, "dup digest") end ``` Stuck is happened after running this test. /cc @vo.x @jaruga @rhenium -- https://bugs.ruby-lang.org/