Open mplanchard opened 3 years ago
I've hit the same issue using earthly with a (slim) debian buster docker image.
I will look into debugging this.
I was able to find the cause: setarch: failed to set personality to x86_64: Operation not permitted
.
This can be fixed by using the --privileged
flag with docker run.
For earthly the command is as follows: earthly --allow-privileged +my_bench
, and inside the Earthfile:RUN --privileged cargo bench my_benchmark
.
A good addition to iai might be to print the whole command output for a non-succesful status code. That would have made it easier to find the root cause for this issue.
Ah, I'm so glad you were able to figure it out! For Circle, I think we can look into running this job on a machine executor instead of a docker container, since to my knowledge Circle doesn't give you a way to run a privileged container.
I've got an issue where my benchmarks are not failing locally (ubuntu 20.04) but are failing in CI (debian buster). I've got valgrind installed there and have confirmed it's possible to run it directly, like:
However, when I run
cargo bench
, I get a failure like:the interesting portion of the backtrace is
I've tried getting more out of valgrind by running with the
VALGRIND_OPTS
environment variable set to"-v"
and"-d -v"
, but it doesn't appear to be useful, in that there's still no stdout, and thetarget/iai
directory doesn't exist.I'd really appreciate any suggestions on how to debug this further!