Open exastion opened 3 years ago
I am running into the same issue. I was hoping to be able to use iai
in my ci like advertised in the readme but I guess it does not work because gitlab ci uses docker containers to run the CI in :(
@exastion what would be an alternative to setarch
? the freebsd solution does not work for other linux distros, right?
@extrawurst I haven't looked into it further.
I guess one solution would be to put ASLR disabling behind a feature flag, so that setarch
could be skipped for CI builds.
Hey, thanks for the bug report, and thanks for the patience.
Yeah, I didn't know setarch was so restricted. Disabling ASLR is helpful for stability of the measurements. Unfortunately, it sounds as if it's not possible to disable it in docker, so having some option to prevent Iai from trying to enable it is probably necessary.
I've pushed a version to the main branch that adds an environment variable (IAI_ALLOW_ASLR
) that you can set. I'm not really sure an environment variable is the right way to configure this, but this is much lighter-weight than bringing in a CLI parsing library like clap. I was kinda hoping I could get away with not needing configuration of any sort in Iai. Anyway, let me know if this works for you folks.
@bheisler I finally had time to check this out: it works like a charm! lets have a release please :) it is part of my CI now: https://github.com/extrawurst/ip2country
In an unprivileged Docker container,
setarch
is not allowed to run. From #9 it seemssetarch
isn't the best tool anyway.