Skip to content

Cod 1008 benchmark run fails on macro runner with systemd run#89

Merged
not-matthias merged 5 commits intomainfrom
cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run
Jun 30, 2025
Merged

Cod 1008 benchmark run fails on macro runner with systemd run#89
not-matthias merged 5 commits intomainfrom
cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run

Conversation

@not-matthias
Copy link
Member

@not-matthias not-matthias commented Jun 17, 2025

Fix 1: Turns out that runuser doesn't work without sudo in the macro-runner:

runner@ip-172-31-0-162:~$ runuser -u runner ls
runuser: may not be used by non-root users
runner@ip-172-31-0-162:~$ sudo runuser -u runner whoami
runner

I decided to use the uid and gid parameters in systemd-run since we don't have to rely on runuser in that case.

Fix 2: We also have to pass the environment variables to the process, since the benchmarks are running with systemd.

Fix 3: Perf can't trace a process that's running with root privileges. We have to run perf with root, which makes the child processes also run with root. I also updated the splitting, since we can't kill a root process, from a non-root process.

EDIT: @art049 should've waited with the merge, the last 3 commits aren't related to this PR (they are from the other one that was stacked on top of this one). Please ignore them since the review was already done

@not-matthias not-matthias requested a review from art049 June 17, 2025 12:59
@not-matthias not-matthias force-pushed the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch 2 times, most recently from 9da248d to 4a524d8 Compare June 19, 2025 08:46
@not-matthias not-matthias force-pushed the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch 4 times, most recently from 80f06b3 to 2f2cb0d Compare June 30, 2025 14:26
@not-matthias not-matthias force-pushed the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch 2 times, most recently from cb30b27 to 0fa16ae Compare June 30, 2025 16:29
Most of the changes are related to formatting and moving variables into `println` or log stmts. They have been automatically converted using `cargo fmt`, `cargo fix` and `cargo clippy fix`
@not-matthias not-matthias force-pushed the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch from 0fa16ae to 8a9c894 Compare June 30, 2025 16:41
@not-matthias not-matthias force-pushed the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch from 8a9c894 to 0578848 Compare June 30, 2025 16:49
@art049 art049 self-requested a review June 30, 2025 16:51
@not-matthias not-matthias merged commit 0578848 into main Jun 30, 2025
6 checks passed
@not-matthias not-matthias deleted the cod-1008-benchmark-run-fails-on-macro-runner-with-systemd-run branch June 30, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments