https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111298

            Bug ID: 111298
           Summary: time-profiler-2.c flaky on glibc RISC-V
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Created attachment 55845
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55845&action=edit
Excerpt from the debug log

Failures:
FAIL: gcc.dg/tree-prof/time-profiler-2.c scan-ipa-dump-times profile "Read
tp_first_run: 0" 2
FAIL: gcc.dg/tree-prof/time-profiler-2.c scan-ipa-dump-times profile "Read
tp_first_run: 2" 1
FAIL: gcc.dg/tree-prof/time-profiler-2.c scan-ipa-dump-times profile "Read
tp_first_run: 3" 1

Observed on at least one of the 7 tested glibc targets ~50/78 times (~65%).
Separated out this gives a ~14% chance that a given testsuite run fails.

Example where failures change when comparing across a daily-bump commit:
https://github.com/patrick-rivos/riscv-gnu-toolchain/issues/290

Observed on all tested targets:
rv32gcv-ilp32d
rv32gc_zba_zbb_zbc_zbs-ilp32d
rv32gcv_zicond_zawrs_zbc_zvkng_zvksg_zvbb_zvbc_zicsr_zba_zbb_zbs_zicbom_zicbop_zicboz_zfhmin_zkt-ilp32d
rv64gc-lp64d
rv64gcv-lp64d
rv64gc_zba_zbb_zbc_zbs-lp64d
rv64gcv_zvbb_zvbc_zvkg_zvkn_zvknc_zvkned_zvkng_zvknha_zvknhb_zvks_zvksc_zvksed_zvksg_zvksh_zvkt-lp64d

Not observed using when using newlib.

Replicated locally using
https://github.com/patrick-rivos/riscv-gnu-toolchain/tree/6feacbc3d00a11a94f1f8fdc7226b4b908462579
../configure --prefix=$(pwd) --with-arch=rv64gcv --with-abi=lp64
make report-linux -j32

Upstream riscv-gnu-toolchain has the test allowlisted which is likely why
nobody has mentioned it before:
https://github.com/riscv-collab/riscv-gnu-toolchain/blob/master/test/allowlist/gcc/glibc.log#L8-L10

>From searching the https://gcc.gnu.org/pipermail/gcc-testresults/ mailing list
(May 1st - September 5th), the only other occurrence is
https://inbox.sourceware.org/gcc-testresults/87zg23qmwp.fsf@Rainer.invalid/
This is likely specific to the risc-v target.

I'm guessing that this is likely due to some conflict between time-profiler-1.c
and time-profiler-2.c and filing this under testsuite framework issue, but feel
free to move it if it's likely caused by a specific component.

Reply via email to