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

"helper.py reproduce" fails with AttributeError #3229

Closed
rlohning opened this issue Jan 14, 2020 · 10 comments · Fixed by #3246
Closed

"helper.py reproduce" fails with AttributeError #3229

rlohning opened this issue Jan 14, 2020 · 10 comments · Fixed by #3246
Assignees

Comments

@rlohning
Copy link
Contributor

Trying to run
python infra/helper.py reproduce qt readnext testcase-file
fails with:

Traceback (most recent call last):
File "infra/helper.py", line 868, in
sys.exit(main())
File "infra/helper.py", line 187, in main
return reproduce(args)
File "infra/helper.py", line 747, in reproduce
return reproduce_impl(args.project_name, args.fuzzer_name, args.valgrind, args.env_to_add,
AttributeError: 'Namespace' object has no attribute 'env_to_add'

Looks like this attribute is never set or created. Might 2c05fb2 have broken this?

@inferno-chromium
Copy link
Collaborator

@Leo-Neat @jonathanmetzman - fyi, please take a look soon!

@Leo-Neat
Copy link
Contributor

Looking into it.

@Leo-Neat
Copy link
Contributor

https://github.com/google/oss-fuzz/tree/reproduce-fix should fix it. I haven't had a chance to test it, but will when I come in today.

@Leo-Neat
Copy link
Contributor

Leo-Neat commented Jan 14, 2020

Fixed at #3230

`python3 infra/helper.py reproduce qt readnext clusterfuzz-testcase-readnext-5767355087192064
Running: docker run --rm -i --privileged -v /usr/local/google/home/lneat/Documents/oss-fuzz/build/out/qt:/out -v /usr/local/google/home/lneat/Downloads/clusterfuzz-testcase-readnext-5767355087192064:/testcase -t gcr.io/oss-fuzz-base/base-runner reproduce readnext -runs=100

  • DEBUGGER=
  • FUZZER=readnext
  • shift
  • TESTCASE=/testcase
  • '[' '!' -f /testcase ']'
  • export PATH=/out:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/out
  • PATH=/out:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/out
  • cd /out
  • /out/readnext -rss_limit_mb=2048 -timeout=25 -runs=100 /testcase
    INFO: Seed: 1699307585
    INFO: Loaded 1 modules (75635 inline 8-bit counters): 75635 [0x11ae358, 0x11c0acb),
    INFO: Loaded 1 PC tables (75635 PCs): 75635 [0x11c0ad0,0x12e8200),
    /out/readnext: Running 1 inputs 100 time(s) each.
    Running: /testcase
    ALARM: working on the last Unit for 25 seconds
    and the timeout value is 25 (use -timeout=N to change)
    ==7== ERROR: libFuzzer: timeout after 25 seconds
    #0 0x515cc1 in __sanitizer_print_stack_trace /src/llvm-project/compiler-rt/lib/asan/asan_stack.cpp:86:3
    [infra] some changes #1 0x474f38 in fuzzer::PrintStackTrace() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerUtil.cpp:205:5
    Added re2 #2 0x45a0f9 in fuzzer::Fuzzer::AlarmCallback() /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:300:5
    Port sqlite3 fuzzer #3 0x7f3f82be738f (/lib/x86_64-linux-gnu/libpthread.so.0+0x1138f)
    Remove leading blank line #4 0x57a623 in QStringView::QStringView<QChar, true>(QChar const*, long long) /work/qtbase/src/corelib/../../include/QtCore/../../../../src/qt/qtbase/src/corelib/text/qstringview.h:175
    Add fuzzer for libchewing #5 0x5b8814 in operator==(QStringRef const&, QStringRef const&) /src/qt/qtbase/src/corelib/text/qstring.cpp:10524:61
    [IDEA][WIP] Fix location of build scripts, define project meta-vars. #6 0x8262d3 in QXmlStreamReaderPrivate::resolveTag() /src/qt/qtbase/src/corelib/serialization/qxmlstream.cpp:1650:49
    [infra] fixed /src/build.sh script location #7 0x81a81c in QXmlStreamReaderPrivate::parse() /src/qt/qtbase/src/corelib/serialization/qxmlstream_p.h:1776:13
    libchewing: avoid /out/.libs #8 0x82c2d1 in QXmlStreamReader::readNext() /src/qt/qtbase/src/corelib/serialization/qxmlstream.cpp:610:12
    Leak detection doesn't work #9 0x53914a in LLVMFuzzerTestOneInput /src/qt/qtbase/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp:34:16
    Migrate to k18s jenkins #10 0x45b881 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerLoop.cpp:556:15
    [infra] checkout command: automatic code checkout and compiling #11 0x4466d1 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:292:6
    [WIP] Add libnss build and 15 fuzzers from crrev.com/1677803002. #12 0x44c38e in fuzzer::FuzzerDriver(int*, char***, int ()(unsigned char const, unsigned long)) /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerDriver.cpp:774:9
    chewing_fuzzer didn't run with data files #13 0x4754e2 in main /src/llvm-project/compiler-rt/lib/fuzzer/FuzzerMain.cpp:19:10
    "Setting up fuzzers for a new library" doc is unclear #14 0x7f3f81f0182f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    fix spelling in new_library.md #15 0x41ff38 in _start (/out/readnext+0x41ff38)

SUMMARY: libFuzzer: timeout`

@Dor1s
Copy link
Contributor

Dor1s commented Jan 14, 2020

Thanks @rlohning for reporting and sorry for the trouble

@Dor1s Dor1s closed this as completed Jan 14, 2020
@rlohning
Copy link
Contributor Author

I confirm it's fixed.

Thank you for the swift reaction!

@rlohning
Copy link
Contributor Author

@jonathanmetzman Looks like bf3592d broke this again.

@jonathanmetzman
Copy link
Contributor

Wow. Don't know how I managed to do that. Fixing now.

@jonathanmetzman
Copy link
Contributor

Should be fixed.

@rlohning
Copy link
Contributor Author

Yes, it is. Thank you! :-)

(...and sorry for my late reaction)

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

Successfully merging a pull request may close this issue.

5 participants