Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[lld] LLD Linker Deadlock #137779

Copy link
Copy link
Open
Open
Copy link
@zhangtianhao6

Description

@zhangtianhao6
Issue body actions

The link is suspended when the CMake testCCompiler is tested.

The call stack is as follows:

(gdb) bt
#0  0x00007fe103fb6376 in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fe103c3fe30 in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from target:/lib/x86_64-linux-gnu/libstdc++.so.6
#2  0x0000558a6bc003fb in llvm::parallelFor(unsigned long, unsigned long, llvm::function_ref<void (unsigned long)>) ()
#3  0x0000558a69dc70f8 in void lld::elf::OutputSection::writeTo<llvm::object::ELFType<(llvm::support::endianness)1, true> >(unsigned char*) ()
#4  0x0000558a69e64216 in void lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1, true> >() ()
#5  0x0000558a69d32e2c in lld::elf::LinkerDriver::link(llvm::opt::InputArgList&) ()
#6  0x0000558a69d1fd93 in lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) ()
#7  0x0000558a69d1e614 in lld::elf::link(llvm::ArrayRef<char const*>, llvm::raw_ostream&, llvm::raw_ostream&, bool, bool) ()
#8  0x0000558a69bb4b9c in ?? ()
#9  0x0000558a69bb4270 in main ()

link option

ld.lld --sysroot=/xx/bin/../sysroot -pie -EL -z relro --hash-style=gnu --eh-frame-hdr -m aarch64linux -dynamic-linker /lib/ld-linux-aarch64.so.1 -o cmTC_26a76 /xx/bin/../sysroot/usr/lib/../lib64/Scrt1.o /xx/bin/../sysroot/usr/lib/../lib64/crti.o /xx/lib64/clang/15.0.4/lib/linux/clang_rt.crtbegin-aarch64.o -L/xx/bin/../sysroot/usr/lib/../lib64 -L/xx/bin/../sysroot/usr/lib CMakeFiles/cmTC_26a76.dir/testCCompiler.c.o /xx/common/lib64/clang/15.0.4/lib/linux/libclang_rt.builtins-aarch64.a -lc /xx/lib64/clang/15.0.4/lib/linux/libclang_rt.builtins-aarch64.a /xx/lib64/clang/15.0.4/lib/linux/clang_rt.crtend-aarch64.o /xx/bin/../sysroot/usr/lib/../lib64/crtn.o

What kind of scenarios will cause the linker to freeze?

Metadata

Metadata

Assignees

No one assigned

    Labels

    hangCompiler hang (infinite loop)Compiler hang (infinite loop)lld:ELF

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.