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

Crash while indexing #157

Closed
gicmo opened this issue Dec 11, 2018 · 5 comments
Closed

Crash while indexing #157

gicmo opened this issue Dec 11, 2018 · 5 comments
Labels
question Further information is requested

Comments

@gicmo
Copy link

gicmo commented Dec 11, 2018

ccls --version
ccls version 7.0.0 (Fedora 7.0.0-2.fc29)

Built using system clang/llvm (llvm-7.0.0-2.fc29.src.rpm); configured via cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -BRelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On -DUSE_SHARED_LLVM=On -GNinja ..

I get a crash when indexing bolt, reproducible on the commandline via cls -index=/home/gicmo/Code/src/bolt:

0  0x00007ffff2bfa53f in raise () from /lib64/libc.so.6
1  0x00007ffff2be4895 in abort () from /lib64/libc.so.6
2  0x00007ffff684b3c8 in std::__replacement_assert (__file=__file@entry=0x7ffff6936d30 "/usr/include/c++/8/bits/shared_ptr_base.h", __line=__line@entry=983, __function=__function@entry=0x7ffff6971b80 <std::__shared_ptr_access<llvm::sys::fs::detail::DirIterState, (__gnu_cxx::_Lock_policy)2, false, false>::operator*() const::__PRETTY_FUNCTION__> "std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = llvm::sys::fs::detail::DirIter"..., __condition=__condition@entry=0x7ffff6936d15 "_M_get() != nullptr") at /usr/include/c++/8/x86_64-redhat-linux/bits/c++config.h:2391
3  0x00007ffff68c4b2d in std::__shared_ptr_access<llvm::sys::fs::detail::DirIterState, (__gnu_cxx::_Lock_policy)2, false, false>::operator* (this=0x5c6c20) at /usr/include/llvm/ADT/StringRef.h:90
4  llvm::sys::fs::directory_iterator::directory_iterator (follow_symlinks=true, ec=..., path=..., this=0x5c6c20) at /usr/include/llvm/Support/FileSystem.h:1163
5  (anonymous namespace)::RealFSDirIter::RealFSDirIter (EC=..., Path=..., this=0x5c6bc0) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Basic/VirtualFileSystem.cpp:302
6  __gnu_cxx::new_allocator<(anonymous namespace)::RealFSDirIter>::construct<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> (this=<optimized out>, __p=0x5c6bc0) at /usr/include/c++/8/ext/new_allocator.h:136
7  std::allocator_traits<std::allocator<(anonymous namespace)::RealFSDirIter> >::construct<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> (__a=..., __p=0x5c6bc0) at /usr/include/c++/8/bits/alloc_traits.h:475
8  std::_Sp_counted_ptr_inplace<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<llvm::Twine const&, std::error_code&> (__a=..., this=0x5c6bb0) at /usr/include/c++/8/bits/shared_ptr_base.h:543
9  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:656
10 std::__shared_ptr<(anonymous namespace)::RealFSDirIter, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>, __tag=...) at /usr/include/c++/8/bits/shared_ptr_base.h:1322
11 std::shared_ptr<(anonymous namespace)::RealFSDirIter>::shared_ptr<std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=..., this=<optimized out>, __tag=...) at /usr/include/c++/8/bits/shared_ptr.h:360
12 std::allocate_shared<(anonymous namespace)::RealFSDirIter, std::allocator<(anonymous namespace)::RealFSDirIter>, llvm::Twine const&, std::error_code&> (__a=...) at /usr/include/c++/8/bits/shared_ptr.h:707
13 std::make_shared<(anonymous namespace)::RealFSDirIter, llvm::Twine const&, std::error_code&> () at /usr/include/c++/8/bits/shared_ptr.h:723
14 (anonymous namespace)::RealFileSystem::dir_begin (this=this@entry=0x608a40, Dir=..., EC=...) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Basic/VirtualFileSystem.cpp:332
15 0x00007ffff6b4dcaa in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple (this=0x61ae90, TargetTriple=..., Args=..., LibDir="/../lib64", CandidateTriple=..., NeedsBiarchSuffix=false) at /usr/include/llvm/ADT/Twine.h:516
16 0x00007ffff6b4fd87 in clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init (this=this@entry=0x61ae90, TargetTriple=..., Args=..., ExtraTripleAliases=...) at /usr/include/c++/8/bits/basic_string.h:2293
17 0x00007ffff6b60400 in clang::driver::toolchains::Linux::Linux (this=0x61a950, D=..., Triple=..., Args=...) at /usr/include/llvm/ADT/ArrayRef.h:64
18 0x00007ffff6aa3bb0 in llvm::make_unique<clang::driver::toolchains::Linux, clang::driver::Driver const&, llvm::Triple const&, llvm::opt::ArgList const&> () at /usr/include/llvm/ADT/STLExtras.h:1069
19 clang::driver::Driver::getToolChain (this=0x7fffffffb9d0, Args=..., Target=...) at /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/Driver.cpp:4327
20 0x00007ffff6ab2586 in clang::driver::Driver::BuildCompilation (this=this@entry=0x7fffffffb9d0, ArgList=...) at /usr/include/c++/8/bits/unique_ptr.h:342
21 0x0000000000496740 in ccls::(anonymous namespace)::ProjectProcessor::Process (this=0x7fffffffc510, entry=...) at /usr/include/c++/8/bits/stl_vector.h:1059
22 0x000000000049a1ca in ccls::(anonymous namespace)::LoadEntriesFromDirectory (opt_compdb_dir=..., project=0x7fffffffc570) at ../src/project.cc:370
23 ccls::Project::Load (this=0x7fffffffd180, root="/home/gicmo/Code/src/bolt/") at ../src/project.cc:401
24 0x000000000050e1f0 in ccls::Initialize (m=0x7fffffffd2a0, param=..., reply=...) at ../src/messages/initialize.cc:324
25 0x00000000005105fa in ccls::StandaloneInitialize (handler=..., root="/home/gicmo/Code/src/bolt") at ../src/messages/initialize.cc:360
26 0x000000000048926c in ccls::pipeline::Standalone (root="/home/gicmo/Code/src/bolt") at ../src/pipeline.cc:571
27 0x0000000000455b20 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/c++/8/bits/basic_string.h:252
@gicmo
Copy link
Author

gicmo commented Dec 11, 2018

Since we seem to get ENOENT I ran it through strace:

strace -ff -e openat ccls -index=/home/gicmo/Code/src/bolt
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangIndex.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangFormat.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangTooling.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangToolingInclusions.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangToolingCore.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangRewrite.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangFrontend.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangParse.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangSerialization.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangSema.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangAnalysis.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangEdit.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangAST.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangLex.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangDriver.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangBasic.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libLLVM-7.so", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libncurses.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libtinfo.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libform.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libclangASTMatchers.so.7", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libffi.so.6", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
openat(AT_FDCWD, "/proc/cpuinfo", O_RDONLY|O_CLOEXEC) = 3
strace: Process 3002 attached
strace: Process 3003 attached
strace: Process 3004 attached
[pid  3001] openat(AT_FDCWD, "/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
[pid  3001] openat(AT_FDCWD, "/home/gicmo/Code/src/bolt/compile_flags.txt", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/home/gicmo/Code/src/bolt/compile_commands.json", O_RDONLY|O_CLOEXEC) = 3
[pid  3001] openat(AT_FDCWD, "/etc/lsb-release", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/redhat-release", O_RDONLY|O_CLOEXEC) = 3
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-unknown-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-redhat-linux6E", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-redhat-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-suse-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-slackware-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-manbo-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-amazon-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-unknown-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-pc-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-unknown-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-x86_64-unknown-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i386-redhat-linux6E", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i686-redhat-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i586-redhat-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i386-redhat-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i586-suse-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i486-slackware-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i686-montavista-linux", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i686-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i686-pc-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i486-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i386-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i586-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3001] openat(AT_FDCWD, "/etc/env.d/gcc/config-i386-unknown-linux-gnu", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
/usr/include/c++/8/bits/shared_ptr_base.h:983: std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type& std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::operator*() const [with _Tp = llvm::sys::fs::detail::DirIterState; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2; bool <anonymous> = false; bool <anonymous> = false; std::__shared_ptr_access<_Tp, _Lp, <anonymous>, <anonymous> >::element_type = llvm::sys::fs::detail::DirIterState]: Assertion '_M_get() != nullptr' failed.
[pid  3001] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=3001, si_uid=1000} ---
[pid  3001] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=3001, si_uid=1000} ---
[pid  3001] openat(AT_FDCWD, "/dev/urandom", O_RDONLY) = 3
[pid  3001] openat(AT_FDCWD, "/tmp/symbolizer-input-42749e", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 3
[pid  3001] openat(AT_FDCWD, "/tmp/symbolizer-output-8fceb5", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 4
strace: Process 3005 attached
[pid  3005] openat(AT_FDCWD, "/tmp/symbolizer-input-42749e", O_RDONLY) = 0
[pid  3005] openat(AT_FDCWD, "/tmp/symbolizer-output-8fceb5", O_WRONLY|O_CREAT, 0666) = 1
[pid  3005] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libLLVM-7.so", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libffi.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libedit.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libtinfo.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/proc/cpuinfo", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libLLVM-7.so", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib64/libLLVM-7.so-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib64/.debug/libLLVM-7.so-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libLLVM-7.so-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libLLVM-7.so-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib64/libpthread-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib64/.debug/libpthread-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libpthread-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib64/libc-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib64/.debug/libc-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libc-2.28.so.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/lib64/libclangBasic.so.7", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib64/libclangBasic.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib64/.debug/libclangBasic.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libclangBasic.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libclangBasic.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/lib64/libclangDriver.so.7", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib64/libclangDriver.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib64/.debug/libclangDriver.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libclangDriver.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "/usr/lib/debug/usr/lib64/libclangDriver.so.7-7.0.0-2.fc29.x86_64.debug", O_RDONLY|O_CLOEXEC) = 3
[pid  3005] openat(AT_FDCWD, "ccls", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
LLVMSymbolizer: error reading file: No such file or directory
[pid  3005] +++ exited with 0 +++
[pid  3001] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3005, si_uid=1000, si_status=0, si_utime=158, si_stime=20} ---
[pid  3001] openat(AT_FDCWD, "/tmp/symbolizer-output-8fceb5", O_RDONLY|O_CLOEXEC) = 3
0 0x00007f11b5fd795e llvm::sys::PrintStackTrace(llvm::raw_ostream&) /usr/src/debug/llvm-7.0.0-2.fc29.x86_64/_build/../lib/Support/Unix/Signals.inc:494:3
1 0x00007f11b5fd5e14 llvm::sys::RunSignalHandlers() /usr/src/debug/llvm-7.0.0-2.fc29.x86_64/_build/../lib/Support/Signals.cpp:67:5
2 0x00007f11b5fd5f95 SignalHandler /usr/src/debug/llvm-7.0.0-2.fc29.x86_64/_build/../lib/Support/Unix/Signals.inc:343:31
3 0x00007f11b53c2070 __restore_rt (/lib64/libpthread.so.0+0x13070)
4 0x00007f11b522153f __GI_raise (/lib64/libc.so.6+0x3853f)
5 0x00007f11b520b895 __GI_abort (/lib64/libc.so.6+0x22895)
6 0x00007f11b8e723c8 (/lib64/libclangBasic.so.7+0x1693c8)
7 0x00007f11b8eebb2d /usr/include/c++/8/bits/shared_ptr_base.h:983:2
8 0x00007f11b9174caa /usr/include/c++/8/bits/basic_string.h:218:7
9 0x00007f11b9174caa /usr/include/c++/8/bits/basic_string.h:220:6
10 0x00007f11b9174caa clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::ScanLibDirForGCCTriple(llvm::Triple const&, llvm::opt::ArgList const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, llvm::StringRef, bool) /usr/include/c++/8/bits/basic_string.h:657:9
11 0x00007f11b9176d87 clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::init(llvm::Triple const&, llvm::opt::ArgList const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >) /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/ToolChains/Gnu.cpp:1720:29
12 0x00007f11b9187400 clang::driver::MultilibSet::operator=(clang::driver::MultilibSet const&) /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/ToolChains/Linux.cpp:212:3
13 0x00007f11b9187400 clang::driver::toolchains::Linux::Linux(clang::driver::Driver const&, llvm::Triple const&, llvm::opt::ArgList const&) /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/ToolChains/Linux.cpp:212:44
14 0x00007f11b90cabb0 _ZN4llvm11make_uniqueIN5clang6driver10toolchains5LinuxEJRKNS2_6DriverERKNS_6TripleERKNS_3opt7ArgListEEEENSt9enable_ifIXntsrSt8is_arrayIT_E5valueESt10unique_ptrISH_St14default_deleteISH_EEE4typeEDpOT0_ /usr/include/llvm/ADT/STLExtras.h:1070:29
15 0x00007f11b90cabb0 clang::driver::Driver::getToolChain(llvm::opt::ArgList const&, llvm::Triple const&) const /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/Driver.cpp:4327:50
16 0x00007f11b90d9586 /usr/include/c++/8/bits/basic_string.h:211:26
17 0x00007f11b90d9586 /usr/include/c++/8/bits/basic_string.h:220:6
18 0x00007f11b90d9586 /usr/include/c++/8/bits/basic_string.h:657:9
19 0x00007f11b90d9586 /usr/include/llvm/ADT/Triple.h:44:7
20 0x00007f11b90d9586 clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) /usr/src/debug/clang-7.0.0-2.fc29.x86_64/lib/Driver/Driver.cpp:1015:34
21 0x0000000000496740 (ccls+0x496740)
22 0x000000000049a1ca (ccls+0x49a1ca)
23 0x000000000050e1f0 (ccls+0x50e1f0)
24 0x00000000005105fa (ccls+0x5105fa)
25 0x000000000048926c (ccls+0x48926c)
26 0x0000000000455b20 (ccls+0x455b20)
27 0x00007f11b520d413 __libc_start_main (/lib64/libc.so.6+0x24413)
28 0x0000000000455e9e (ccls+0x455e9e)
[pid  3001] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=3001, si_uid=1000} ---
[pid  3004] +++ killed by SIGABRT (core dumped) +++
[pid  3003] +++ killed by SIGABRT (core dumped) +++
[pid  3002] +++ killed by SIGABRT (core dumped) +++
+++ killed by SIGABRT (core dumped) +++
zsh: abort (core dumped)  strace -ff -e openat ccls -index=/home/gicmo/Code/src/bolt

@Riatre
Copy link
Contributor

Riatre commented Dec 11, 2018

From Getting started

You may use -DSYSTEM_CLANG=on if you have clang and llvm installed somewhere (can be a releases.llvm.org prebuilt archive, not necessarily installed via the system package manager). But caution is that you need to identify whether the clang library is compiled with -DLLVM_ENABLE_RTTI=on

@gicmo
Copy link
Author

gicmo commented Dec 11, 2018

Ups. Sorry, should have read that more carefully. Using cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -BRelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DSYSTEM_CLANG=On -DUSE_SHARED_LLVM=On -DLLVM_ENABLE_RTTI=On -GNinja .. fixed it.

@gicmo gicmo closed this as completed Dec 11, 2018
@MaskRay MaskRay added the question Further information is requested label Dec 15, 2018
@MaskRay
Copy link
Owner

MaskRay commented Dec 15, 2018

Can you delete #0 #1 ... from the stack trace? It confuses github as it thinks this issue references #0 #1 ...

@gicmo
Copy link
Author

gicmo commented Dec 16, 2018

Done. Sorry about the spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants