Now that we moved libunwind to its own repository, and have made it compile and run on buildbots around, we need to make sure we get all dependencies correct: 1. No hard-coded dependencies on any other component. Most relevant are compiler-rt and libc++abi. 2. No cyclic dependency between all three low-level libraries, with both compiler-rt and libc++abi using libunwind and not each other. 3. Build systems / CMake files need to be aware of the existence, so libunwind can be used inside LLVM (projects/libunwind) and be used directly by compiler-rt/libc+abi in case CMake options allow for this. 4. Different systems will have different defaults. For example, it's perfectly valid for GNU systems to rely on libgcc / libgcc_s by default and BSD systems to rely on compiler-rt / libunwind. There should be CMake settings for either to change their behaviour. 5. All tests must pass in the targets they were passing before, namely x86_64/ARM on linux/darwin.
Just to note also here, looks like some libc++ tests like std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp started to fail with libunwind: Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007ffff73d00ce in unw_get_proc_info (cursor=0x7fffffffd940, info=0x7fffffffd520) at ../projects/libunwind/src/libunwind.cpp:237 #2 0x00007ffff73d4b83 in _Unwind_GetLanguageSpecificData (context=0x7fffffffd940) at ../projects/libunwind/src/UnwindLevel1.c:417 #3 0x00007ffff7bd2cc8 in __cxxabiv1::scan_eh_tab (results=..., actions=_UA_CLEANUP_PHASE, native_exception=true, unwind_exception=0x60b1e8, context=0x7fffffffd940) at ../projects/libcxxabi/src/cxa_personality.cpp:591 #4 0x00007ffff7bd2b0a in __gxx_personality_v0 (version=<optimized out>, actions=<optimized out>, exceptionClass=<optimized out>, unwind_exception=<optimized out>, context=<optimized out>) at ../projects/libcxxabi/src/cxa_personality.cpp:1005 #5 0x00000000004056a3 in _Unwind_RaiseException_Phase2 (exc=exc@entry=0x60b1e8, context=context@entry=0x7fffffffd940) at ../../../libgcc/unwind.inc:62 #6 0x0000000000405e97 in _Unwind_Resume (exc=0x60b1e8) at ../../../libgcc/unwind.inc:230 #7 0x00000000004030e8 in std::__1::list<int, std::__1::allocator<int> >::insert<int*> () #8 0x0000000000401da2 in main () (gdb) frame 1 #1 0x00007ffff73d00ce in unw_get_proc_info (cursor=0x7fffffffd940, info=0x7fffffffd520) at ../projects/libunwind/src/libunwind.cpp:237 237 co->getInfo(info); (gdb) print info $1 = (unw_proc_info_t *) 0x7fffffffd520 (gdb) print *info $2 = {start_ip = 140737343503848, end_ip = 140733193388033, lsda = 4223808, handler = 140737488344512, gp = 0, flags = 140737354131160, format = 4194368, unwind_info_size = 0, unwind_info = 9, extra = 8} This is on Linux x86-64.
Were those running against libunwind previously? Or is that what is now causing this to show up?
(In reply to comment #2) > Were those running against libunwind previously? Or is that what is now > causing this to show up? My builds was using libunwind since forever, and even after libunwind moved to its own toplevel project it was fine. But it seems to be failing for the last 2-3 days or so.
(In reply to comment #3) > (In reply to comment #2) > > Were those running against libunwind previously? Or is that what is now > > causing this to show up? > > My builds was using libunwind since forever, and even after libunwind moved > to its own toplevel project it was fine. But it seems to be failing for the > last 2-3 days or so. Hmm.. that at least means that the changes causing the new failures is pretty limited: SVN r236585, SVN r236154. Could you check if reverting either makes those tests pass again? If I get a chance, Ill see if I can test locally.
(In reply to comment #1) > Just to note also here, looks like some libc++ tests like > std/containers/sequences/list/list.modifiers/insert_iter_iter_iter.pass.cpp > started to fail with libunwind: > > This is on Linux x86-64. Hi Ismail, May you provide more details on your environment, e.g. distribution, compiler toolchain, and etc? I can't reproduce your crash report on Ubuntu 14.04 LTS (x86-64.) Here is my attempt to reproduce the problem: #!/bin/bash -e ## 0. Setup environment variable export ROOT="$(pwd)" export NUM_JOBS=20 ## 1. Checkout the source code: git clone http://llvm.org/git/llvm.git cd llvm git checkout c7c44fa cd "${ROOT}/llvm/tools" git clone http://llvm.org/git/clang.git cd clang git checkout 9b03bac ## 2. Build bootstrap clang cd "${ROOT}" mkdir llvm-bootstrap-build cd llvm-bootstrap-build cmake -G Ninja "${ROOT}/llvm" \ -DCMAKE_INSTALL_PREFIX="${ROOT}/llvm-bootstrap" \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_C_COMPILER="gcc" \ -DCMAKE_CXX_COMPILER="g++" \ -DLLVM_ENABLE_ASSERTIONS=1 ninja -j${NUM_JOBS} && ninja -j${NUM_JOBS} install ## 3. Checkout libc++, libc++abi, libunwind, compiler-rt cd "${ROOT}/llvm/projects" git clone http://llvm.org/git/compiler-rt.git cd compiler-rt git checkout dc32e4a cd "${ROOT}/llvm/projects" git clone http://llvm.org/git/libcxx.git cd libcxx git checkout 0ad232a cd "${ROOT}/llvm/projects" git clone http://llvm.org/git/libcxxabi.git cd libcxxabi git checkout f662666 cd "${ROOT}/llvm/projects" git clone http://llvm.org/git/libunwind.git cd libunwind git checkout 7e9c948 ## 4. Rebuild LLVM/Clang with the bootstrap clang cd "${ROOT}" mkdir llvm-build cd llvm-build export PATH="${ROOT}/llvm-bootstrap/bin:${PATH}" cmake -G Ninja "${ROOT}/llvm" \ -DCMAKE_INSTALL_PREFIX="${ROOT}/llvm-install" \ -DCMAKE_BUILD_TYPE="Release" \ -DCMAKE_C_COMPILER="clang" \ -DCMAKE_CXX_COMPILER="clang++" \ -DLLVM_ENABLE_ASSERTIONS=1 \ -DLIBCXXABI_USE_LLVM_UNWINDER=1 \ -DLIBCXXABI_LIBUNWIND_INCLUDES="${ROOT}/llvm/projects/libunwind/include" \ -DLIBCXXABI_LIBUNWIND_SOURCES="${ROOT}/llvm/projects/libunwind/src" ninja -j${NUM_JOBS} && ninja -j${NUM_JOBS} install ninja -j${NUM_JOBS} check-all ./bin/llvm-lit projects/libcxx/test # this should pass all tests
With r237099 all tests pass as expected again. I'll keep an eye on this and let you know if it fails again.
The ARM build bot libcxx-libcxxabi-arm-linux has been fixed by: http://reviews.llvm.org/rL237518 build log: http://lab.llvm.org:8011/builders/libcxx-libcxxabi-arm-linux/builds/419
Can we mark this one fixed?
(In reply to comment #8) > Can we mark this one fixed? No. I don't think so. The libc++abi + libgcc build is still broken for ARM. I will fix the problem before the creation of 3.7 release branch.
(In reply to comment #9) > (In reply to comment #8) > > Can we mark this one fixed? > > No. I don't think so. The libc++abi + libgcc build is still broken for > ARM. I will fix the problem before the creation of 3.7 release branch. Fixed in rL243073. http://reviews.llvm.org/rL243073
Hi Logan, Can we close this, then?
This issue has been resolved. 1. The buildbot is running without problems. 2. The circular dependency between libc++abi and libunwind has been fixed. 3. The libc++abi/libgcc build has been fixed.
(In reply to comment #11) > Hi Logan, > > Can we close this, then? Sure. I have just closed this issue. Feel free to re-open if I have missed anything.)