[lldb-dev] Trouble with ScriptInterpreter unit tests
Hi there, I've been working on a patch for LLDB but have been having an issue running the test suite (even on a clean checkout of trunk) where the ScriptInterpreter tests are hitting SIGSEGV. From what I understand, the unit test involves an embedded Python interpreter and it's happening when we try to import the LLDB module. I was wondering whether anyone has encountered this before. I'm new to LLDB and LLVM in general so I figured I'd check if there's something obvious I'm doing wrong before going too far down the rabbit hole. In case it's important, my CMake and Ninja invocations look like this: cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="clang;lldb;libcxx;libcxxabi" -DCMAKE_CXX_COMPILER="g++-5" -DLLVM_PARALLEL_LINK_JOBS=1 -DBUILD_SHARED_LIBS=ON ../llvm LD_LIBRARY_PATH=/home/alexc/work/llvm-project/build/lib ninja check-lldb-unit And each stack trace looks like this: [==] Running 1 test from 1 test case. [--] Global test environment set-up. [--] 1 test from PythonExceptionStateTest [ RUN ] PythonExceptionStateTest.TestExceptionStateChecking #0 0x7efeaf557e4d llvm::sys::PrintStackTrace(llvm::raw_ostream&) /home/alexc/work/llvm-project/llvm/lib/Support/Unix/Signals.inc:532:0 #1 0x7efeaf557ee0 PrintStackTraceSignalHandler(void*) /home/alexc/work/llvm-project/llvm/lib/Support/Unix/Signals.inc:593:0 #2 0x7efeaf555da8 llvm::sys::RunSignalHandlers() /home/alexc/work/llvm-project/llvm/lib/Support/Signals.cpp:68:0 #3 0x7efeaf557801 SignalHandler(int) /home/alexc/work/llvm-project/llvm/lib/Support/Unix/Signals.inc:384:0 #4 0x7efeaeec7890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) #5 0x7efe9a63c6ee _init (/usr/lib/x86_64-linux-gnu/libLLVM-6.0.so.1+0x6db6ee) #6 0x7efeb74aa733 call_init /build/glibc-OTsEL5/glibc-2.27/elf/dl-init.c:72:0 #7 0x7efeb74aa733 _dl_init /build/glibc-OTsEL5/glibc-2.27/elf/dl-init.c:119:0 #8 0x7efeb74af1ff dl_open_worker /build/glibc-OTsEL5/glibc-2.27/elf/dl-open.c:525:0 #9 0x7efeab7642df _dl_catch_exception /build/glibc-OTsEL5/glibc-2.27/elf/dl-error-skeleton.c:197:0 #10 0x7efeb74ae7ca _dl_open /build/glibc-OTsEL5/glibc-2.27/elf/dl-open.c:605:0 #11 0x7efeaecb1f96 __asprintf /build/glibc-OTsEL5/glibc-2.27/dlfcn/dlopen.c:66:0 #12 0x7efeab7642df _dl_catch_exception /build/glibc-OTsEL5/glibc-2.27/elf/dl-error-skeleton.c:197:0 #13 0x7efeab76436f _dl_catch_error /build/glibc-OTsEL5/glibc-2.27/elf/dl-error-skeleton.c:216:0 #14 0x7efeaecb2735 _dlerror_run /build/glibc-OTsEL5/glibc-2.27/dlfcn/dlerror.c:162:0 #15 0x7efeaecb2051 dlopen /build/glibc-OTsEL5/glibc-2.27/dlfcn/dlopen.c:87:0 #16 0x7efeac1a0950 _PyImport_GetDynLoadFunc (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1ba950) #17 0x7efeac143e30 _PyImport_LoadDynamicModule (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15de30) #18 0x7efeac1bb3ee (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1d53ee) #19 0x7efeac145041 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15f041) #20 0x7efeac145326 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15f326) #21 0x7efeac145715 PyImport_ImportModuleLevel (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15f715) #22 0x7efeac09b274 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xb5274) #23 0x7efeac03a4a3 PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x544a3) #24 0x7efeac1c5127 PyEval_CallObjectWithKeywords (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1df127) #25 0x7efeac0913cc PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xab3cc) #26 0x7efeac1c5bf8 PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1dfbf8) #27 0x7efeac08d409 PyEval_EvalCode (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xa7409) #28 0x7efeac1b5abc PyImport_ExecCodeModuleEx (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1cfabc) #29 0x7efeac1bad52 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1d4d52) #30 0x7efeac1bb32e (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1d532e) #31 0x7efeac1bb63a (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1d563a) #32 0x7efeac145041 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15f041) #33 0x7efeac145542 PyImport_ImportModuleLevel (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x15f542) #34 0x7efeac09b274 (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xb5274) #35 0x7efeac03a4a3 PyObject_Call (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x544a3) #36 0x7efeac1c5127 PyEval_CallObjectWithKeywords (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1df127) #37 0x7efeac0913cc PyEval_EvalFrameEx (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xab3cc) #38 0x7efeac1c5bf8 PyEval_EvalCodeEx (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0x1dfbf8) #39 0x7efeac08d409 PyEval_EvalCode (/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0+0xa7409) #40 0x7efeac13d6d6 PyRun_StringFlags (/usr/li
Re: [lldb-dev] [Release-testers] [9.0.0 Release] Release Candidate 5 is here
On 13 Sep 2019, at 14:06, Hans Wennborg via Release-testers wrote: > > 9.0.0-rc5 was just tagged from the release_90 branch at r371837. In > the Git monorepo, it's tagged as llvmorg-9.0.0-rc5. For this rc, I used two patches, from: * https://bugs.llvm.org/show_bug.cgi?id=42892 - After r356631, Sanitizer-i386-Test faills to link on FreeBSD * https://bugs.llvm.org/show_bug.cgi?id=42894 - FreeBSD needs -pthread link flag for dynamic ASan tests Uploaded: SHA256 (clang+llvm-9.0.0-rc5-amd64-unknown-freebsd11.tar.xz) = 0908ebd68ebcb98981b5ee04de0b5bd934646bbe7d19d6f98b8149f8ca301c13 SHA256 (clang+llvm-9.0.0-rc5-i386-unknown-freebsd11.tar.xz) = f163d9557005049e0be05b630196319e936d32d59e186e33c56f41a47e268586 Main test results on amd64-freebsd11: Unexpected Passing Tests (6): AddressSanitizer-i386-freebsd-dynamic :: TestCases/interception_failure_test.cc AddressSanitizer-x86_64-freebsd-dynamic :: TestCases/interception_failure_test.cc lldb-Suite :: api/multiple-targets/TestMultipleTargets.py lldb-Suite :: functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py lldb-Suite :: lang/cpp/namespace/TestNamespaceLookup.py lldb-Suite :: python_api/thread/TestThreadAPI.py Failing Tests (400): AddressSanitizer-Unit :: ./Asan-i386-calls-Dynamic-Test/AddressSanitizer.ShadowGapTest AddressSanitizer-Unit :: ./Asan-i386-inline-Dynamic-Test/AddressSanitizer.ShadowGapTest AddressSanitizer-i386-freebsd :: TestCases/Posix/fread_fwrite.cc AddressSanitizer-i386-freebsd-dynamic :: TestCases/Posix/fread_fwrite.cc Builtins-i386-freebsd :: floatundixf_test.c LLDB :: ExecControl/StopHook/stop-hook-threads.test LLDB :: ExecControl/StopHook/stop-hook.test LLDB :: SymbolFile/DWARF/find-basic-function.cpp LLDB :: SymbolFile/DWARF/find-basic-namespace.cpp LLDB :: SymbolFile/DWARF/find-basic-type.cpp LLDB :: SymbolFile/DWARF/find-basic-variable.cpp LLDB :: SymbolFile/DWARF/find-variable-file.cpp LLDB :: tools/lldb-mi/exec/exec-step-instruction.test LLVM :: tools/yaml2obj/elf-override-shoffset.yaml LLVM :: tools/yaml2obj/elf-override-shsize.yaml MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.SmallPreAllocatedStackThread MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.bind_getsockname MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.confstr MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.mbrtowc MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.swprintf MemorySanitizer-Unit :: ./Msan-x86_64-Test/MemorySanitizer.valloc MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.SmallPreAllocatedStackThread MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.bind_getsockname MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.confstr MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.mbrtowc MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.swprintf MemorySanitizer-Unit :: ./Msan-x86_64-with-call-Test/MemorySanitizer.valloc MemorySanitizer-X86_64 :: dtls_test.c SanitizerCommon-asan-i386-FreeBSD :: Posix/devname_r.cc SanitizerCommon-asan-i386-FreeBSD :: Posix/weak_hook_test.cc SanitizerCommon-asan-x86_64-FreeBSD :: Posix/weak_hook_test.cc SanitizerCommon-msan-x86_64-FreeBSD :: FreeBSD/capsicum.cc SanitizerCommon-msan-x86_64-FreeBSD :: Posix/dedup_token_length_test.cc SanitizerCommon-msan-x86_64-FreeBSD :: Posix/weak_hook_test.cc SanitizerCommon-tsan-x86_64-FreeBSD :: FreeBSD/capsicum.cc SanitizerCommon-tsan-x86_64-FreeBSD :: FreeBSD/fdevname.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/arc4random.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/dedup_token_length_test.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/devname.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/devname_r.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/dump_instruction_bytes.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fpe.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fputc_putc_putchar.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fputs_puts.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fseek.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fts.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/funopen.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/getfsent.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/getmntinfo.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/getpass.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/getusershell.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/illegal_read_test.cc SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/illegal_write_test.cc SanitizerCo