litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.44k stars 697 forks source link

bugfix: CIFuzz fail due to timeout on FuzzReadExperimentFile #4876

Closed sypark9646 closed 1 month ago

sypark9646 commented 2 months ago

Proposed changes

delete redundant code in FuzzReadExperimentFile: We are testing for a file that doesn't exist in our unit test.

If the timeout is consistently over 25 seconds, we want to delete FuzzReadExperimentFile test case.

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Dependency

Special notes for your reviewer:

namkyu1999 commented 2 months ago

can you check a build-pipeline?

sypark9646 commented 2 months ago

@namkyu1999 I've removed the FuzzReadExperimentFile testcase because it was consistently timing out, thank you.

namkyu1999 commented 2 months ago

Can you also fix the existing failure cases @sypark9646 ?

sypark9646 commented 2 months ago

Okay, I'll get started on this. When I checked, the FuzzProcessExperimentRunDelete function also timed out.

Also, the following error occurred in the FuzzTestGetEnvironment function. I'm not sure, but the other bug that's happening intermittently right now seems to be a bug in the libFuzzer we're using.

/github/workspace/build-out/FuzzTestGetEnvironment -timeout=25 -rss_limit_mb=2560 -len_control=0 -seed=1337 -artifact_prefix=/tmp/tmp0k7_f226/ -max_total_time=4 -print_final_stats=1 /github/workspace/cifuzz-corpus/FuzzTestGetEnvironment >fuzz-3.log 2>&1
================== Job 3 exited with exit code 77 ============
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 1337
AddressSanitizer:DEADLYSIGNAL
=================================================================
==881==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x56439db9d850 bp 0x7ffff020cb90 sp 0x7ffff020cb60 T0)
==881==The signal is caused by a READ memory access.
==881==Hint: address points to the zero page.
SCARINESS: 10 (null-deref)
    #0 0x56439db9d850 in operator() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:413:11
    #1 0x56439db9d850 in IterateCounterRegions<(lambda at /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:412:25)> /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.h:165:9
    #2 0x56439db9d850 in fuzzer::TracePC::ClearInlineCounters() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:412:3
    #3 0x56439db82223 in ResetMaps /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.h:87:5
    #4 0x56439db82223 in fuzzer::Fuzzer::Fuzzer(int (*)(unsigned char const*, unsigned long), fuzzer::InputCorpus&, fuzzer::MutationDispatcher&, fuzzer::FuzzingOptions const&) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:145:7
    #5 0x56439db73d13 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:815:17
    #6 0x56439dba0af2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:20:10
    #7 0x7f8b5f1f5082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 0702430aef5fa3dda43986563e9ffcc47efbd75e)

DEDUP_TOKEN: operator()--IterateCounterRegions<(lambda at /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:412:25)>--fuzzer::TracePC::ClearInlineCounters()
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:413:11 in operator()
==881==ABORTING
stat::number_of_executed_units: 0
stat::average_exec_per_sec:     0
stat::new_units_added:          0
stat::slowest_unit_time_sec:    0
stat::peak_rss_mb:              41