From 4b39055bbacc01a57a9f61aad10cf44c5d18b5e5 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 22 Jun 2026 15:58:21 +0200 Subject: [PATCH 1/5] Revert "wip: use latest runner to fix samply" This reverts commit 2bc9a1c71e863ad24794d23d825b20f8db1303b0. --- .github/workflows/codspeed.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index b2c359018..6514e1edf 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -103,4 +103,3 @@ jobs: with: mode: walltime config: bench/codspeed.yml - runner-version: 4.17.7-alpha.1 From c4ac4263fe738ade0f183982c7605643b46953d0 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 22 Jun 2026 15:58:54 +0200 Subject: [PATCH 2/5] ci: remove CODSPEED_WALLTIME_PROFILER samply env var --- .github/workflows/codspeed.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 6514e1edf..9aa7dbaa4 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -98,8 +98,6 @@ jobs: - name: Run the benchmarks uses: CodSpeedHQ/action@main - env: - CODSPEED_WALLTIME_PROFILER: samply with: mode: walltime config: bench/codspeed.yml From 4327254ca0d50e28b0c59dfb5e1c890c9cc3e28f Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 22 Jun 2026 16:39:30 +0200 Subject: [PATCH 3/5] ci: lower CodSpeed Benchmarks timeout to 15 minutes --- .github/workflows/codspeed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 9aa7dbaa4..b0c4810ea 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -10,7 +10,7 @@ on: jobs: benchmarks: runs-on: codspeed-macro - timeout-minutes: 30 + timeout-minutes: 15 strategy: fail-fast: false matrix: From 1a12a565822e6dd37b7d57abb1e90129984d2374 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 22 Jun 2026 16:47:29 +0200 Subject: [PATCH 4/5] fix(ci): cache capstone prefix so install survives a cache hit On a cache hit the Build Capstone step is skipped, so .capstone is absent and 'just install local' fails when make recompiles cycledecode.o (capstone/capstone.h not found). Cache .capstone alongside the build tree and bump the cache key to repopulate. --- .github/workflows/codspeed.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index b0c4810ea..afbc045db 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -40,8 +40,14 @@ jobs: uses: actions/cache@v4 id: valgrind-cache with: - path: /tmp/valgrind-build - key: valgrind-${{ matrix.valgrind }}-${{ runner.os }}-${{ matrix.valgrind == 'local' && hashFiles('coregrind/**', 'include/**', 'VEX/**', 'cachegrind/**', 'callgrind/**', 'dhat/**', 'drd/**', 'helgrind/**', 'lackey/**', 'massif/**', 'memcheck/**', 'none/**', 'exp-bbv/**', 'auxprogs/**', '*.ac', '*.am', '*.in', 'autogen.sh', 'configure*') || 'build' }} + # `.capstone` is the cycle-estimation decoder prefix; its absolute path + # is baked into the Makefile's -I flags, so `make install` (which may + # recompile cycledecode.o) needs it present. It is built outside + # /tmp/valgrind-build, so cache it too or a cache hit breaks install. + path: | + /tmp/valgrind-build + .capstone + key: valgrind-${{ matrix.valgrind }}-${{ runner.os }}-v2-${{ matrix.valgrind == 'local' && hashFiles('coregrind/**', 'include/**', 'VEX/**', 'cachegrind/**', 'callgrind/**', 'dhat/**', 'drd/**', 'helgrind/**', 'lackey/**', 'massif/**', 'memcheck/**', 'none/**', 'exp-bbv/**', 'auxprogs/**', '*.ac', '*.am', '*.in', 'autogen.sh', 'configure*') || 'build' }} # Build and install Valgrind - name: Update apt-get cache From e0e62db42437334e3fd5ff78d8027286795156f0 Mon Sep 17 00:00:00 2001 From: not-matthias Date: Mon, 22 Jun 2026 17:28:54 +0200 Subject: [PATCH 5/5] fix(bench): drop stress-ng benchmarks The local 'CodSpeed Benchmarks' job kept hitting its job timeout on the stress-ng rows. stress-ng is the only forking workload in the suite and deadlocks under 'callgrind --trace-children=yes' on a lost pause() wakeup. Root cause is an application-level race in stress-ng, not our code and not a Valgrind signal-delivery bug. Its termination wait while (stress_continue(args)) (void)shim_pause(); can miss the SIGALRM that clears the continue flag if the signal lands between the flag check and pause(), so pause() blocks on a signal that already arrived. stress-ng's alarm(1) re-alarm mitigation fails here because alarm() is per-process (a forked worker that already lost its SIGALRM has no self-armed alarm) and Valgrind serializes all guest threads onto one scheduler lock, widening the check->pause() window from nanoseconds to milliseconds. It reproduces on stock upstream Valgrind 3.26.0/3.25.1 too; the only thing special about 'local' is that it is slower and runs extra configs, so it trips the race far more often. In practice only the full-* configs (--trace-children + cache-sim, the slowest) hang; take_strings/echo/python3 are unaffected. stress-ng adds little value as a callgrind throughput benchmark, so remove it rather than work around an upstream bug. The 'timeout --kill-after=10s 120s' wrapper from the previous commit stays as a backstop. (--fair-sched=yes was tried and regressed the hang onto take_strings full-with-inline, so it was reverted.) --- bench/generate_config.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/bench/generate_config.py b/bench/generate_config.py index 40cb1862b..453b38874 100755 --- a/bench/generate_config.py +++ b/bench/generate_config.py @@ -22,8 +22,6 @@ "testdata/take_strings-aarch64 varbinview_non_null", "echo Hello, World!", "python3 testdata/test.py", - "stress-ng --cpu 1 --cpu-ops 10", - "stress-ng --cpu 4 --cpu-ops 10", ] # Callgrind configurations: (extra args, config name, requires_codspeed). The