Open iphydf opened 4 years ago
Is this something specific to the Bazel container or can it be reproduced just with Bazel 3.0?
Also, to debug I would suggest examining the LD_LIBRARY_PATH environment variables between the actions which work vs which don't when running executables built using the --config=msan
flag. This is most likely a case of LD_LIBRARY_PATH not including the directory with the msan flavor of libc++ when running the action that's trying to use a binary built using --config=msan
.
It can be reproduced with docker-sandbox, I think. Thanks for the pointer to LD_LIBRARY_PATH. I considered adding that, and I think at one point I tried and got segfaults or missing symbols, so I stopped going along that path, but I'll investigate it a bit more.
This is a reproducing Dockerfile:
The first bazel test works, the second one fails with
Also see https://github.com/bazelbuild/bazel/issues/7026, not sure it's relevant, but it's about the same strict action env flag.
Why this is important: while this is a simple repro, and you may say "just don't use that flag", the same problem occurs when running without that flag and using a
rule
with a tool built in the same bazel build.