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.
DescriptionEdjunior Barbosa Machado
2022-03-16 19:44:41 UTC
Description of problem:
Some go tests that pass when executed plainly fail when using '-exec valgrind' on rhel-9 aarch64 and s390x:
[root@hpe-apollo-cn99xx-15-vm-27 ~]# OPENSSL_FORCE_FIPS_MODE=1 GOLANG_FIPS=1 go test -count=1 -v -v -v crypto/des -run ^TestWeakKeys$
=== RUN TestWeakKeys
--- PASS: TestWeakKeys (0.00s)
PASS
ok crypto/des 0.014s
[root@hpe-apollo-cn99xx-15-vm-27 ~]# OPENSSL_FORCE_FIPS_MODE=1 GOLANG_FIPS=1 go test -count=1 -v -v -v crypto/des -run ^TestWeakKeys$ -exec valgrind
==153912== Memcheck, a memory error detector
==153912== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==153912== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==153912== Command: /tmp/go-build1096396586/b001/des.test -test.paniconexit0 -test.timeout=10m0s -test.count=1 -test.v=true -test.v=true -test.v=true -test.run=^TestWeakKeys$
==153912==
==153912== Invalid write of size 8
==153912== at 0x75C84: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffcd8 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x59294: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc78 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x58F74: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc58 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid read of size 8
==153912== at 0x59170: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc58 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid read of size 8
==153912== at 0x59608: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc78 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 4
==153912== at 0x75D10: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffcb8 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x58BC4: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc98 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x41D74: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff840 is on thread 1's stack
==153912== 1120 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x41D7C: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff838 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x41FB4: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff808 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x72214: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff768 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid read of size 8
==153912== at 0x72294: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff768 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid read of size 8
==153912== at 0x420B0: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff808 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid read of size 8
==153912== at 0x41EE0: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefff838 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Use of uninitialised value of size 8
==153912== at 0x41EE4: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912==
==153912== Invalid read of size 8
==153912== at 0x58C20: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc98 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x42224: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffefffc98 is on thread 1's stack
==153912== 8 bytes below stack pointer
==153912==
==153912== Invalid write of size 8
==153912== at 0x41A90: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== Address 0x1ffeffdc70 is not stack'd, malloc'd or (recently) free'd
==153912==
==153912==
==153912== Process terminating with default action of signal 11 (SIGSEGV)
==153912== Access not within mapped region at address 0x1FFEFFDC70
==153912== at 0x41A90: ??? (in /tmp/go-build1096396586/b001/des.test)
==153912== If you believe this happened as a result of a stack
==153912== overflow in your program's main thread (unlikely but
==153912== possible), you can try to increase the size of the
==153912== main thread stack using the --main-stacksize= flag.
==153912== The main thread stack size used in this run was 8388608.
==153912==
==153912== HEAP SUMMARY:
==153912== in use at exit: 0 bytes in 0 blocks
==153912== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==153912==
==153912== All heap blocks were freed -- no leaks are possible
==153912==
==153912== Use --track-origins=yes to see where uninitialised values come from
==153912== For lists of detected and suppressed errors, rerun with: -s
==153912== ERROR SUMMARY: 56 errors from 18 contexts (suppressed: 0 from 0)
FAIL crypto/des 0.247s
FAIL
[root@hpe-apollo-cn99xx-15-vm-27 ~]#
The same test using valgrind passes on x86_64.
Below is the list of suites and testcases failing with with valgrind:
* both aarch64 and s390x
crypto/des (all tests)
crypto/ed25519/internal/edwards25519 (all tests)
crypto/ed25519/internal/edwards25519/field: TestAliasing TestMultiplyDistributesOverAdd
crypto/internal/subtle (all tests)
crypto/rc4 (all tests)
crypto/subtle (all tests)
crypto/x509: TestImports
* s390x only
crypto/dsa: TestParameterGeneration TestSignAndVerifyWithBadPublicKey
crypto/ecdsa: TestEqual
crypto/elliptic: TestInfinity TestMarshal TestMarshalCompressed
crypto/rsa: TestPSSSigning
crypto/x509: TestPKCS8 TestParseECPrivateKey
crypto/tls (all TestBoring*)
Version-Release number of selected component (if applicable):
RHEL-9.0.0-20220313.2
golang-1.17.7-1.el9_0
valgrind-3.18.1-9.el9
Steps to Reproduce:
1. OPENSSL_FORCE_FIPS_MODE=1 GOLANG_FIPS=1 go test -count=1 -v -v -v <suite> -run <testcase> -exec valgrind