-
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
Archive coverage data alongside corpus archives #2020
Conversation
Forgot to format... |
It doesn't seem that the saving works as expected. I'm going to keep trying with this, but it's quite difficult to debug. |
Okay, this should work now. I got confused as to the direction of the copy originally. |
Thanks @addisoncrump! |
Sure, and also to collect the corresponding coverage data for the "standard" fuzzers. I'll make that change shortly. |
Also, a local experiment shows that we also get warning info in the JSON (!):
Should we remove this? |
Do you happen to know the cause of this? |
To be honest, I've looked around a bit now and do not see the root cause. It seems to be using |
It seems to be a known issue btw; |
That seems to have done it. The Running a quick local test and then will stage the cloud test. |
Okay, so I spent quite a while debugging a weird change that was occurring when presubmit was applied; namely, This also implies to me that the test should be failing, but isn't. I think this is a minor difference in how seaborn now emits heatmaps (seems to be some offset change). |
Also, experimenting with compression, because the coverage dumps are quite large and easily compressible. |
Well, the version of llvm-cov used is too old. I'll revert this now. |
Compression reduces 15MB => 1MB, so seems worth it. This is now in a stable state and ready for a test run! |
Nice! Let's start with a simple one.
Then we collect these. |
/gcbrun run_experiment.py -a --experiment-config /opt/fuzzbench/service/experiment-config.yaml --experiment-name 2024-08-09-dg-2020 --fuzzers libfuzzer --benchmarks libxml2_xml |
If none of the measurements have happened yet, it won't have created a report, no? |
i guess we need to update libafl |
@DonggeLiu Any complaints if I make the libafl change in this PR as well? |
Ah we would really appreciate it if you could do it in a different PR, given it is a stand-alone change. Thanks! |
Thanks for the info, @tokatoka.
What is the preferred commit to use? |
i'd say we can just use the latest |
@DonggeLiu, was the root cause ever discovered? |
I think this is the reason: #2023. There are other warnings/errors, but I reckon this is the reason. |
Also seeing a lot of this, but I presume that's unrelated to your PR? 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' |
I don't think so -- the modifications which were applied were done by the formatter. I can just revert that whole file if needed. |
No need, I've addressed this in #2023. |
Oh, thanks for doing this. |
/gcbrun run_experiment.py -a --experiment-config /opt/fuzzbench/service/experiment-config.yaml --experiment-name 2024-08-12-2020 --fuzzers aflplusplus centipede honggfuzz libfuzzer |
👍 I figure since I didn't make any meaningful changes to that file anyway, better to leave it untouched. If the experiment magically starts working, I have no idea what that means, but I'll be happy about it lol |
Experiment |
Yeah, looks like it's not working. This run should probably be cancelled, if nothing but to save some CPU time. |
Superceded by #2028. |
1. Fix `TypeError: expected str, bytes or os.PathLike object, not NoneType` in [`2024-08-10-test`](#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`
…2028) Supercedes #2020. Moving so we (AFL++ people) can collaborate on this PR. From the original: > Currently, only corpora are saved in the archive and the summaries of coverage are provided at the end of the experiment. This change simply incorporates the saving of the coverage data snapshots next to the trial corpus snapshots. --------- Co-authored-by: Toka <[email protected]>
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`
Changing forks so @tokatoka can collab with me on this. Supercedes google#2021. As requested in google#2020.
…oogle#2028) Supercedes google#2020. Moving so we (AFL++ people) can collaborate on this PR. From the original: > Currently, only corpora are saved in the archive and the summaries of coverage are provided at the end of the experiment. This change simply incorporates the saving of the coverage data snapshots next to the trial corpus snapshots. --------- Co-authored-by: Toka <[email protected]>
Changing forks so @tokatoka can collab with me on this. Supercedes As requested in google#2020.
Currently, only corpora are saved in the archive and the summaries of coverage are provided at the end of the experiment. This change simply incorporates the saving of the coverage data snapshots next to the trial corpus snapshots.