Describe the bug
While looking at enabling libpfm support in Fedora’s google-benchmark package, we’ve found that PerfCountersTest.MultiThreaded fails flakily on the ppc64le architecture relatively frequently (perhaps 1/4 to 1/2 of the time), and rarely on some other architectures, at least aarch64.
System
Which OS, compiler, and compiler version are you using:
- OS: Fedora (Rawhide)
- Compiler and version:
gcc (GCC) 16.0.1 20260416 (Red Hat 16.0.1-0)
To reproduce
We see this while building the google-benchmark package, but there should not be anything unique here: I expect it will be possible to reproduce it in any ppc64le environment with -DBENCHMARK_ENABLE_LIBPFM:BOOL=ON.
I can do test-builds of Fedora packages on ppc64le in Fedora infrastructure, but I do not have interactive access to real ppc64le hardware.
Expected behavior
All tests pass.
Screenshots
74/84 Test #79: perf_counters_gtest ........................***Failed 0.20 sec
Running main() from gmock_main.cc
[==========] Running 9 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 9 tests from PerfCountersTest
[ RUN ] PerfCountersTest.Init
[ OK ] PerfCountersTest.Init (0 ms)
[ RUN ] PerfCountersTest.OneCounter
[ OK ] PerfCountersTest.OneCounter (0 ms)
[ RUN ] PerfCountersTest.NegativeTest
A performance counter name was the empty string
Unknown performance counter name: not a counter name
A performance counter name was the empty string
Unknown performance counter name: not a counter name
Unknown performance counter name: bad event name
[ OK ] PerfCountersTest.NegativeTest (0 ms)
[ RUN ] PerfCountersTest.Read1Counter
[ OK ] PerfCountersTest.Read1Counter (0 ms)
[ RUN ] PerfCountersTest.Read2Counters
[ OK ] PerfCountersTest.Read2Counters (0 ms)
[ RUN ] PerfCountersTest.ReopenExistingCounters
[ OK ] PerfCountersTest.ReopenExistingCounters (0 ms)
[ RUN ] PerfCountersTest.CreateExistingMeasurements
Error reading lead 9 errno:2 No such file or directory
[ OK ] PerfCountersTest.CreateExistingMeasurements (0 ms)
[ RUN ] PerfCountersTest.MultiThreaded
/builddir/build/BUILD/google-benchmark-1.9.5-build/benchmark-1.9.5/test/perf_counters_gtest.cc:269: Failure
Value of: Elapsed4Threads[0] / Elapsed2Threads[0]
Expected: (is > 0.1) and (is < 10)
Actual: 20.085135325112532 (of type double), which doesn't match (is < 10)
[ FAILED ] PerfCountersTest.MultiThreaded (191 ms)
[ RUN ] PerfCountersTest.HardwareLimits
[ OK ] PerfCountersTest.HardwareLimits (0 ms)
[----------] 9 tests from PerfCountersTest (192 ms total)
[----------] Global test environment tear-down
[==========] 9 tests from 1 test suite ran. (192 ms total)
[ PASSED ] 8 tests.
[ FAILED ] 1 test, listed below:
[ FAILED ] PerfCountersTest.MultiThreaded
1 FAILED TEST
In ten scratch builds, this test failed three times. Failing values of Elapsed4Threads[0] / Elapsed2Threads[0] were (approximately) 20.1, 11.1, and 17.1.
Additional context
N/A
Describe the bug
While looking at enabling
libpfmsupport in Fedora’sgoogle-benchmarkpackage, we’ve found thatPerfCountersTest.MultiThreadedfails flakily on theppc64learchitecture relatively frequently (perhaps 1/4 to 1/2 of the time), and rarely on some other architectures, at leastaarch64.System
Which OS, compiler, and compiler version are you using:
gcc (GCC) 16.0.1 20260416 (Red Hat 16.0.1-0)To reproduce
We see this while building the
google-benchmarkpackage, but there should not be anything unique here: I expect it will be possible to reproduce it in anyppc64leenvironment with-DBENCHMARK_ENABLE_LIBPFM:BOOL=ON.I can do test-builds of Fedora packages on
ppc64lein Fedora infrastructure, but I do not have interactive access to realppc64lehardware.Expected behavior
All tests pass.
Screenshots
In ten scratch builds, this test failed three times. Failing values of
Elapsed4Threads[0] / Elapsed2Threads[0]were (approximately) 20.1, 11.1, and 17.1.Additional context
N/A