Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Bazel projects started failing #9261

Closed
DavidKorczynski opened this issue Dec 21, 2022 · 4 comments
Closed

Some Bazel projects started failing #9261

DavidKorczynski opened this issue Dec 21, 2022 · 4 comments

Comments

@DavidKorczynski
Copy link
Collaborator

I was looking at why fuzztest-raksha is failing to build and I think it's a bazel issue. The samme issue happens in tcmalloc

Example log:

Step #3 - "compile-libfuzzer-address-x86_64": Loading: 0 packages loaded
Step #3 - "compile-libfuzzer-address-x86_64": Analyzing: 532 targets (0 packages loaded, 0 targets configured)
Step #3 - "compile-libfuzzer-address-x86_64": ERROR: /root/.cache/bazel/_bazel_root/3e38b3318287f280430274112260df30/external/bazel_tools/platforms/BUILD:84:6: in alias rule @bazel_tools//platforms:linux: Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms. See https://github.com/bazelbuild/bazel/issues/8622 for details.
Step #3 - "compile-libfuzzer-address-x86_64": ERROR: /root/.cache/bazel/_bazel_root/3e38b3318287f280430274112260df30/external/bazel_tools/platforms/BUILD:84:6: Analysis of target '@bazel_tools//platforms:linux' failed
Step #3 - "compile-libfuzzer-address-x86_64": ERROR:

It seems to be this issue bazelbuild/bazel#8622 and probably not something we should fix, but rather the projects themselves should fix. Other projects started observing this issue as well (e.g. google/googletest#4096). Am not entirely sure if we can do something but leaving this open for tracking.

AdamKorcz pushed a commit that referenced this issue Dec 28, 2022
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54490

Related to #9261

Raksha updated googletest to avoid an old version that referenced the
outdated platforms dependency.

Raksha still has some references to `@bazel_tools//platforms` e.g.
https://github.com/google-research/raksha/blob/3205399ca08af4b69bbd306a664181aca0b56e6e/gcb/rbe/configs/path/config/BUILD#L23
but we can avoid these by limiting the bazel query for targets to the
`src` folder using `export FUZZTEST_TARGET_FOLDER="//src/...`

Signed-off-by: David Korczynski <david@adalogics.com>

Signed-off-by: David Korczynski <david@adalogics.com>
DavidKorczynski added a commit that referenced this issue Dec 28, 2022
This resolves the current issues caused by
#9261

tcmalloc fails because of rules_fuzzing having issues with the above
issues.

Signed-off-by: David Korczynski <david@adalogics.com>
@DavidKorczynski
Copy link
Collaborator Author

The issue seems to be a bit project specific -- for projects that rely on rules_fuzzing (which will be at least all projects that use bazel_build_fuzz_tests) should downgrade to bazel 5.4.0 or wait until bazel-contrib/rules_fuzzing#222 is fixed. See an example for this in the following PR for tcmalloc: #9304

The issue may happen in other projects that use bazel. Downgrading to 5.4.0 is still an option there but may not be possible -- e.g. was the case in Raksha #9297

jonathanmetzman pushed a commit that referenced this issue Dec 28, 2022
This resolves the current issues caused by
#9261

tcmalloc fails because of rules_fuzzing having issues with the above
issues.

Signed-off-by: David Korczynski <david@adalogics.com>

Signed-off-by: David Korczynski <david@adalogics.com>
@DavidKorczynski
Copy link
Collaborator Author

DavidKorczynski commented Dec 28, 2022

for projects that rely on rules_fuzzing (which will be at least all projects that use bazel_build_fuzz_tests)

Going over the list of projects using rules_fuzzing I found that only one project (tcmalloc) failed, the rest was working or failing due to other reasons (now fixed in #9305).

@jonathanmetzman
Copy link
Contributor

Can this be closed then? :-)

@DavidKorczynski
Copy link
Collaborator Author

Can this be closed then? :-)

Yeah, I think so, thanks!

eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this issue Mar 15, 2023
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54490

Related to google#9261

Raksha updated googletest to avoid an old version that referenced the
outdated platforms dependency.

Raksha still has some references to `@bazel_tools//platforms` e.g.
https://github.com/google-research/raksha/blob/3205399ca08af4b69bbd306a664181aca0b56e6e/gcb/rbe/configs/path/config/BUILD#L23
but we can avoid these by limiting the bazel query for targets to the
`src` folder using `export FUZZTEST_TARGET_FOLDER="//src/...`

Signed-off-by: David Korczynski <david@adalogics.com>

Signed-off-by: David Korczynski <david@adalogics.com>
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this issue Mar 15, 2023
This resolves the current issues caused by
google#9261

tcmalloc fails because of rules_fuzzing having issues with the above
issues.

Signed-off-by: David Korczynski <david@adalogics.com>

Signed-off-by: David Korczynski <david@adalogics.com>
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

No branches or pull requests

2 participants