Page MenuHomePhabricator

[libFuzzer] Increase timeouts on fork tests and skip one on aarch64
ClosedPublic

Authored by peter.smith on May 2 2019, 9:50 AM.

Details

Summary

The tests fork.text, fork.sigusr.test and fork-ubsan.test intermittently fail on the aarch64 buildbots. Input gathered from the fork.sigusr.test implies that when the builder is under load the sleep and timeout values used in fork.sigusr.test and fork-ubsan.test are not sufficient. This change doubles the sleep in fork.sigusr.test and the timeout value in fork.test The fork-ubsan.test doesn't have a timeout and I think is not always finding the error after 10000 runs so I've marked as unsupported on aarch64 for now.

The only useful input I got from the --dump-input-on-failure was from fork.sigusr.test, it was all of the form:

/home/buildslave/buildslave/clang-cmake-aarch64-full/llvm/projects/compiler-rt/test/fuzzer/fork-sigusr.test:14:8: error: CHECK: expected string not found in input
CHECK: libFuzzer: {{.*}}exiting
       ^
<stdin>:1:1: note: scanning from here
INFO: Seed: 442182642
^
<stdin>:5:71: note: possible intended match here
INFO: -fork=3: 0 seed inputs, starting to fuzz in /tmp/lit_tmp_2nvgvn/libFuzzerTemp.31336.dir
                                                                      ^

Input file: <stdin>
Check file: /home/buildslave/buildslave/clang-cmake-aarch64-full/llvm/projects/compiler-rt/test/fuzzer/fork-sigusr.test

-dump-input=help describes the format of the following dump.

Full input was:
<<<<<<
            1: INFO: Seed: 442182642
check:14'0     X~~~~~~~~~~~~~~~~~~~~
            2: INFO: Loaded 1 modules (7 inline 8-bit counters): 7 [0x540ec0, 0x540ec7), 
check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            3: INFO: Loaded 1 PC tables (7 PCs): 7 [0x50f098,0x50f108), 
check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            4: INFO: -fork=3: fuzzing in separate process(s)
check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            5: INFO: -fork=3: 0 seed inputs, starting to fuzz in /tmp/lit_tmp_2nvgvn/libFuzzerTemp.31336.dir
check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:14'1                                                                           ?                       possible intended match
            6: INFO: signal received, trying to exit gracefully
check:14'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
>>>>>>

The next line should be

31336== INFO: libFuzzer: exiting as requested

The last output in the file is from Fuzzer::MaybeExitGracefully() which sets a flag that is later checked to see if the loop should exit and print the final exiting as requested, it looks like this could have at least some delay.

If increasing the timeouts isn't acceptable I suggest marking all the fork tests as unsupported on aarch64

Diff Detail

Event Timeline

peter.smith created this revision.May 2 2019, 9:50 AM
This revision is now accepted and ready to land.May 6 2019, 11:29 AM
This revision was automatically updated to reflect the committed changes.
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 7 2019, 2:33 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript