run the bench from the repository instead of a copy
The bench used to be a copy kept in /root/load, run as root, driven from
outside the container. The paths were written into the scripts and the
copy went stale more than once. They now run straight out of the working
tree, unprivileged, and read common.sh for the three settings they share.
BRISK_WORK holds the working files, /var/tmp/brisk-load by default. Not
/tmp, which is a tmpfs here and gets wiped by a restart of the container
in the middle of a session - that is why the scripts had been moved to
/root/load to begin with - and not the script directory either, or
auth.txt and the captured streams would be left lying in the git tree.
BRISK_LEGAL is where the daemon keeps its log and its pid file, and SUDO
covers the few things that still need root: restarting the service, and
reading the open descriptors of a daemon that runs as another user.
brisk_step.sh no longer starts the daemon by hand. It went through a raw
screen invocation of its own, which is precisely how orphaned instances
used to pile up: the newcomer unlinks the socket files and binds its own
while the first one stays alive on its own shared memory. It restarts the
service now. Its two log counts also become deltas: both logs are
cumulative, so the totals said nothing about the step that just ran.
The trap that reaps the background loops changes shape. It was
"trap 'kill 0'", which signals the whole process group - almost always
wider than the script. It killed the script itself on the way out, so the
exit status was always a death by signal, and it reached whatever else
shared the group: the caller, or the other half of a pipeline, so that
"brisk_step.sh | tail" printed nothing at all. Running everything through
"incus exec" gave each script a session of its own and hid all of it.
bench_reap walks our own descendants instead, which reaches the loops
inside "( ... ) &" and the curls under them and nothing else.
Checked from the working tree: brisk_step.sh completes through a pipe
with its output intact and exit status 0, the sampler reads the daemon
descriptors through sudo, game.sh forms the table, stop.sh reports a
clean machine, and INSTALL.sh installs and restarts from here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fseposbqj9mBbQXoT8KnBj