MaskRay / vscode-ccls

ccls plugin for Visual Studio Code
123 stars 37 forks source link

Adding a .ccls file to a project makes ccls stuck in loading state #107

Open svillar opened 4 years ago

svillar commented 4 years ago

Observed behavior

Whenever I add a .ccls file to a project which is already using compile_commands.json then ccls becomes stuck during the initialization (VSCode shows a persistent ccls: loading on the bottom right). This isn't a UI thing as I don't have indexing, completion etc...

Expected behavior

ccls is loaded normally

System information

I'm attaching ccls.log after enabling logging and verbose output for ccls. As you can see it's stuck just before spawing the indexers.

svillar commented 4 years ago

I've attached a gdb session and it turns out that ccls is inspecting files in some remote webdav locations I have bind mounted in the projects' tree (not sure why that is not a problem without the .ccls file).

(gdb) bt
#0  __GI___lxstat (vers=1, 
    name=0x559748e91fa0 "/home/sergio/checkout/WebKit/WebKitBuild/UserFlatpak/var/run/user/1000/gvfs/dav:host=..."..., buf=0x7ffddf7465b8) at ../sysdeps/unix/sysv/linux/wordsize-64/lxstat.c:35
#1  0x00007f0b19ff8509 in llvm::sys::fs::status(llvm::Twine const&, llvm::sys::fs::file_status&, bool) () from /usr/lib/x86_64-linux-gnu/libLLVM-9.so.1
#2  0x0000559744508931 in ?? ()
#3  0x0000559744559d58 in ?? ()
#4  0x000055974455c202 in ?? ()

I've that particular directory listed in ccsls.index.blacklist BTW

svillar commented 3 years ago

Any idea? Anything I could do to help debugging the issue?

svillar commented 3 years ago

This is the kind of things I see with -v=2

23:52:24 ccls              project.cc:284 I use /home/sergio/checkout/WebKit/.ccls: %compile_commands.json %h -x %h c++-header %h --include=config.h %cpp --include=config.h
23:52:26 stdin            pipeline.cc:571 V(2) receive RequestMessage: 1 $ccls/info
23:52:28 stdin            pipeline.cc:571 V(2) receive RequestMessage: 2 $ccls/info
23:52:30 stdin            pipeline.cc:571 V(2) receive RequestMessage: 3 $ccls/info
23:52:32 stdin            pipeline.cc:571 V(2) receive RequestMessage: 4 $ccls/info
23:52:34 stdin            pipeline.cc:571 V(2) receive RequestMessage: 5 $ccls/info
23:52:36 stdin            pipeline.cc:571 V(2) receive RequestMessage: 6 $ccls/info
23:52:38 stdin            pipeline.cc:571 V(2) receive RequestMessage: 7 $ccls/info
23:52:40 stdin            pipeline.cc:571 V(2) receive RequestMessage: 8 $ccls/info

and it keeps going like that forever