-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fix recent FuzzBench cloud experiment failures #2023
Conversation
/gcbrun run_experiment.py -a --experiment-config /opt/fuzzbench/service/experiment-config.yaml --experiment-name 2024-08-12-dg --fuzzers aflplusplus centipede honggfuzz libfuzzer --benchmarks stb_stbi_read_fuzzer openh264_decoder_fuzzer |
5247b68
to
cd18345
Compare
/gcbrun run_experiment.py -a --experiment-config /opt/fuzzbench/service/experiment-config.yaml --experiment-name 2024-08-12-2023 --fuzzers aflplusplus centipede honggfuzz libfuzzer --benchmarks stb_stbi_read_fuzzer openh264_decoder_fuzzer |
Experiment |
/gcbrun run_experiment.py -a --experiment-config /opt/fuzzbench/service/experiment-config.yaml --experiment-name 2024-08-13-2023-libfuzzer-1 --fuzzers libfuzzer |
Experiment |
Report is back : ) @addisoncrump |
Sure, I'll rebase. |
@DonggeLiu I am able to build both openh264 and stb_stbi fuzzers as in |
I see, thanks for the info! |
Report on this PR is still not ready, likely due to some VMs were preemptied. |
Ah, I was investigating the specific issue with the bug benchmark. I don't think I can offer much help with the CI or the fuzzbench infra directly. I can say, however, that the coverage benchmarks you removed do work as expected locally with test-run. I need to check if the coverage measurer works as anticipated; maybe this needs to be updated instead. |
Ah, @DonggeLiu, try running |
For me the same, they are working. I don't think they should be removed |
This reverts commit 50bdf34.
I see, thanks @addisoncrump and @tokatoka . The experiment is about to finish, I will merge this tmr morning. |
I confirmed the coverage measurers build locally as well. Will test when everything has finished building. |
Yup, I tested openh264 and stb benchmarks locally and they do perform measurements as anticipated. The issue is with the GCP runs, I would presume a build cache issue. |
I see, I reckon this could be due to impatible GCP vm environment and llvm? Just to double-check @addisoncrump : |
Thanks for the information again, @addisoncrump! |
This reverts commit 4eb4f3b.
TBR by @jonathanmetzman. The experiment that proving this works: |
Yes, I do a |
I see, thanks for confirming. |
Temporarily disable benchmark `stb_stbi_read_fuzzer` and `openh264_decoder_fuzzer`from cloud experiments, becaue they are [proven](#2023 (comment)) to be incompatible in cloud build/run environment. @addisoncrump kindly confirmed that they [work in local experiments](#2023 (comment)).
The same bug happened 1 year ago |
Thanks for noticing this, let me see if @jonathanmetzman has more insight once he is back. |
@@ -95,6 +95,8 @@ def _clean_seed_corpus(seed_corpus_dir): | |||
def get_clusterfuzz_seed_corpus_path(fuzz_target_path): | |||
"""Returns the path of the clusterfuzz seed corpus archive if one exists. | |||
Otherwise returns None.""" | |||
if not fuzz_target_path: | |||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an error log here because this is unexpected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, why is this function even called?
https://github.com/google/fuzzbench/blob/master/experiment/runner.py#L277
I think this is the line that eventually calls this line. But for example, when we observed the error for addison's experiment, the ossfuzz corpus was NOT used right? (unless they specified oss-fuzz-corpus: true
)
then why we would unpack the clusterfuzz seed corpus at all?
aren't the seed corpus already prepared in build.sh or Dockerfile in each of the benchmarks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if this env var CUSTOM_SEED_CORPUS_DIR
set in normal(?) run or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me these two lines seem wrong
elif not environment.get('CUSTOM_SEED_CORPUS_DIR'):
_unpack_clusterfuzz_seed_corpus(target_binary, input_corpus)
even if we don't use custom_seed_corpus_dir we don't necessarily need clusterfuzz seed corpus, do we??
although why this target_binary
is None is another problem that needs investigation
Just to reiterate, this is a major threat to validity -- especially when cached data is used. The cache completely overwrites the report, so the final report generated is simply showing only the last successful experiment. This effectively invalidates all future Fuzzbench reports until this issue is resolved. I think the report generation issue indicates that safeguards should be put in place that simply terminate the experiment in such degenerative cases, since the results are effectively guaranteed to be invalid. |
1. Fix `TypeError: expected str, bytes or os.PathLike object, not NoneType` in [`2024-08-10-test`](google#2020 (comment)). ```python Traceback (most recent call last): File "/src/experiment/runner.py", line 468, in experiment_main runner.conduct_trial() File "/src/experiment/runner.py", line 290, in conduct_trial self.set_up_corpus_directories() File "/src/experiment/runner.py", line 275, in set_up_corpus_directories _unpack_clusterfuzz_seed_corpus(target_binary, input_corpus) File "/src/experiment/runner.py", line 144, in _unpack_clusterfuzz_seed_corpus seed_corpus_archive_path = get_clusterfuzz_seed_corpus_path( File "/src/experiment/runner.py", line 98, in get_clusterfuzz_seed_corpus_path fuzz_target_without_extension = os.path.splitext(fuzz_target_path)[0] File "/usr/local/lib/python3.10/posixpath.py", line 118, in splitext p = os.fspath(p) TypeError: expected str, bytes or os.PathLike object, not NoneType ``` This happens on [many benchmarks+fuzzers](https://pantheon.corp.google.com/logs/query;query=%222024-08-10-test%22%0Aseverity%3E%3DERROR%0A--Hide%20similar%20entries%0A-%2528jsonPayload.message%3D~%22Error%20watching%20metadata:%20context%20canceled%22%2529%0A--End%20of%20hide%20similar%20entries;cursorTimestamp=2024-08-10T11:04:34.735815901Z;duration=P7D?project=fuzzbench&mods=logs_tg_prod). To be investigated later: 1. Why `fuzz_target_path` is `None`. 2. Why this did not happen in other recent experiments. 3. I thought I had seen this a long ago, Déjà vu? 2. Fixing `No such file or directory: '/work/measurement-folders/<benchmark>-<fuzzer>/merged.json`: ```python Traceback (most recent call last): File "/work/src/experiment/measurer/coverage_utils.py", line 74, in generate_coverage_report coverage_reporter.generate_coverage_summary_json() File "/work/src/experiment/measurer/coverage_utils.py", line 141, in generate_coverage_summary_json result = generate_json_summary(coverage_binary, File "/work/src/experiment/measurer/coverage_utils.py", line 269, in generate_json_summary with open(output_file, 'w', encoding='utf-8') as dst_file: FileNotFoundError: [Errno 2] No such file or directory: '/work/measurement-folders/lcms_cms_transform_fuzzer-centipede/merged.json' ``` 3. Remove incompatible benchmarks: `openh264_decoder_fuzzer`, `stb_stbi_read_fuzzer`
Temporarily disable benchmark `stb_stbi_read_fuzzer` and `openh264_decoder_fuzzer`from cloud experiments, becaue they are [proven](google#2023 (comment)) to be incompatible in cloud build/run environment. @addisoncrump kindly confirmed that they [work in local experiments](google#2023 (comment)).
Temporarily disable benchmark `stb_stbi_read_fuzzer` and `openh264_decoder_fuzzer`from cloud experiments, becaue they are [proven](google#2023 (comment)) to be incompatible in cloud build/run environment. @addisoncrump kindly confirmed that they [work in local experiments](google#2023 (comment)).
TypeError: expected str, bytes or os.PathLike object, not NoneType
in2024-08-10-test
.This happens on many benchmarks+fuzzers.
To be investigated later:
Why
fuzz_target_path
isNone
.Why this did not happen in other recent experiments.
I thought I had seen this a long ago, Déjà vu?
Fixing
No such file or directory: '/work/measurement-folders/<benchmark>-<fuzzer>/merged.json
:openh264_decoder_fuzzer
,stb_stbi_read_fuzzer