[llvm-bugs] [Bug 34806] New: lld hangs in pthread_cond_wait@@GLIBC_2.3.2 ()
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Oct 2 10:40:37 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34806
Bug ID: 34806
Summary: lld hangs in pthread_cond_wait@@GLIBC_2.3.2 ()
Product: lld
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: jr98 at hotmail.de
CC: llvm-bugs at lists.llvm.org
Hello,
i have the problem that lld hangs about half the time.
You can find a coredump at: https://gitlab.com/snsmac/lld-hang
Im not sure, but i think the bug was introduced after Sep 23, 2017
Stacktrace:
#0 pthread_cond_wait@@GLIBC_2.3.2 () at
../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1 0x00007f5d243bc80c in __gthread_cond_wait (__mutex=<optimized out>,
__cond=<optimized out>)
at
/build/gcc-6-TDW5sa/gcc-6-6.3.0/build/x86_64-linux-gnu/libstdc++-v3/include/x86_64-linux-gnu/bits/gthr-default.h:864
#2 std::condition_variable::wait (this=<optimized out>, __lock=...) at
../../../../../src/libstdc++-v3/src/c++11/condition_variable.cc:53
#3 0x00000000005b83c1 in
std::condition_variable::wait<llvm::parallel::detail::Latch::sync()
const::{lambda()#1}>(std::unique_lock<std::mutex>&,
llvm::parallel::detail::Latch::sync() const::{lambda()#1})
(this=0x7ffc2925f2d8, __lock=..., __p=...) at
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/condition_variable:99
#4 0x00000000005b82fe in llvm::parallel::detail::Latch::sync
(this=0x7ffc2925f2a8) at
/home/jr/src/clang-build/llvm/include/llvm/Support/Parallel.h:71
#5 0x00000000005b8269 in llvm::parallel::detail::Latch::~Latch
(this=0x7ffc2925f2a8) at
/home/jr/src/clang-build/llvm/include/llvm/Support/Parallel.h:56
#6 0x00000000005b81f5 in llvm::parallel::detail::TaskGroup::~TaskGroup
(this=0x7ffc2925f2a8) at
/home/jr/src/clang-build/llvm/include/llvm/Support/Parallel.h:75
#7 0x0000000000821b88 in
llvm::parallel::detail::parallel_for_each<__gnu_cxx::__normal_iterator<lld::elf::OutputSection**,
std::vector<lld::elf::OutputSection*, std::allocator<lld::elf::OutputSection*>
> >, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}>(__gnu_cxx::__normal_iterator<lld::elf::OutputSection**,
std::vector<lld::elf::OutputSection*, std::allocator<lld::elf::OutputSection*>
> >, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}) (Begin=0x6002320,
End=0x5ee1850, Fn=...) at
/home/jr/src/clang-build/llvm/include/llvm/Support/Parallel.h:166
#8 0x000000000082191d in
llvm::parallel::for_each<__gnu_cxx::__normal_iterator<lld::elf::OutputSection**,
std::vector<lld::elf::OutputSection*, std::allocator<lld::elf::OutputSection*>
> >, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}>(llvm::parallel::parallel_execution_policy,
__gnu_cxx::__normal_iterator<lld::elf::OutputSection**,
std::vector<lld::elf::OutputSection*, std::allocator<lld::elf::OutputSection*>
> >, llvm::parallel::parallel_execution_policy, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}) (policy=...,
Begin=0x5fff0c0, End=0x5ee1850, Fn=...)
at /home/jr/src/clang-build/llvm/include/llvm/Support/Parallel.h:234
#9 0x00000000008210da in
lld::elf::parallelForEach<std::vector<lld::elf::OutputSection*,
std::allocator<lld::elf::OutputSection*> >&, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}>(std::vector<lld::elf::OutputSection*,
std::allocator<lld::elf::OutputSection*> >&, (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections()::{lambda(lld::elf::OutputSection*)#2}) (Range=std::vector of
length 43, capacity 64 = {...}, Fn=...)
at /home/jr/src/clang-build/llvm/tools/lld/ELF/Threads.h:72
#10 0x0000000000819735 in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::writeSections (this=0x7ffc2925f5b0)
at /home/jr/src/clang-build/llvm/tools/lld/ELF/Writer.cpp:1917
#11 0x00000000007f6409 in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
>::run (this=0x7ffc2925f5b0)
at /home/jr/src/clang-build/llvm/tools/lld/ELF/Writer.cpp:231
#12 0x000000000082f585 in
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1, true>
> () at /home/jr/src/clang-build/llvm/tools/lld/ELF/Writer.cpp:123
#13 0x0000000000643c00 in
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
true> > (this=0x5daf7c0, Args=...)
at /home/jr/src/clang-build/llvm/tools/lld/ELF/Driver.cpp:1109
#14 0x00000000006309f2 in lld::elf::LinkerDriver::main (this=0x5daf7c0,
ArgsArr=..., CanExitEarly=true) at
/home/jr/src/clang-build/llvm/tools/lld/ELF/Driver.cpp:394
#15 0x000000000062ff1c in lld::elf::link (Args=..., CanExitEarly=true,
Error=...) at /home/jr/src/clang-build/llvm/tools/lld/ELF/Driver.cpp:91
#16 0x0000000000476517 in main (Argc=35, Argv=0x7ffc29260558) at
/home/jr/src/clang-build/llvm/tools/lld/tools/lld/lld.cpp:116
Invocation:
clang++ -v -fprofile-instr-generate -fcoverage-mapping -fuse-ld=lld -fPIC -o
test main.o
clang version 6.0.0 (http://llvm.org/git/clang.git
4e0b56c202361f464daadc14e860a7842f7edbb2) (http://llvm.org/git/llvm.git
5295aa52c19464921cd5557547d265ed75619889)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.3.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
"/usr/local/bin/ld.lld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0
-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../.. -L/usr/local/bin/../lib -L/lib
-L/usr/lib main.o -u__llvm_profile_runtime
/usr/local/lib/clang/6.0.0/lib/linux/libclang_rt.profile-x86_64.a -lstdc++ -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/6.3.0/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../x86_64-linux-gnu/crtn.o
^C
clang++ --version
clang version 6.0.0 (http://llvm.org/git/clang.git
4e0b56c202361f464daadc14e860a7842f7edbb2) (http://llvm.org/git/llvm.git
5295aa52c19464921cd5557547d265ed75619889)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
I build llvm/clang/rt/lld withthe following command:
mkdir clang-build \
&& cd clang-build \
&& git clone --depth 1 https://llvm.org/git/llvm.git \
&& cd llvm/tools/ \
&& git clone --depth 1 https://llvm.org/git/clang.git \
&& git clone --depth 1 https://llvm.org/git/lld.git \
&& cd .. \
&& cd projects \
&& git clone --depth 1 https://llvm.org/git/compiler-rt.git \
&& cd .. \
&& cd .. \
&& mkdir build \
&& cd build/ \
&& cmake -G Ninja -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_EH=ON
-DCLANG_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_GO_TESTS=OFF
-DCOMPILER_RT_INCLUDE_TESTS=OFF -DLLVM_BUILD_LLVM_DYLIB=ON
-DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86
-DCMAKE_C_COMPILER=/usr/bin/clang-4.0 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-4.0
../llvm/ \
&& ninja \
&& ninja install
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171002/9f2915ca/attachment-0001.html>
More information about the llvm-bugs
mailing list