zoekt-indexserver: Detect Crashing ctags
dharesign opened this issue · comments
I was trying to index a large repository (chromium fork), and a custom built ctags-universal
from their master branch was crashing. zoekt-git-index
was not detecting the crashed process, and ctags
sat there being <defunct>
. zoekt-git-index
then just sat there until it eventually ran out of memory, and everything started over from the beginning again.
It would be good to have zoekt-git-index
and zoekt-indexserver
recover when ctags
crashes.
do you have the commit SHA1s for
- chromium
- universal-ctags
- zoekt
so I can repro this?
(I fixed a similar issue at
dd7d981 )
universal-ctags
is 92b2f21a575d64a85dcdadbdaacdca06cc29908d
If go get
for zoekt
fetches the latest master, then I at the current tip of zoekt
.
For chromium
it's a bit harder, as I don't think we have the exact sha available yet in our public version, but you could try indexing the current tip of https://github.com/bloomberg/chromium.bb and seeing whether that caused any issues.
The particular crash I was getting in ctags
was that getEntryInCorkQueue
was returning a nullptr
here. I built with the following change locally and I managed to get indexing to complete:
diff --git a/parsers/moose.c b/parsers/moose.c
index 4f67404..eed35b1 100644
--- a/parsers/moose.c
+++ b/parsers/moose.c
@@ -213,8 +213,9 @@ static void leaveMoose (struct mooseSubparser *moose)
moose->notContinuousExtendsLines = true;
tagEntryInfo *e = getEntryInCorkQueue (moose->classCork);
- Assert (e);
- e->extensionFields.endLine = getInputLineNumber ();
+ if (e) {
+ e->extensionFields.endLine = getInputLineNumber ();
+ }
moose->classCork = CORK_NIL;
moose->notInMoose = true;
I think this parser runs on .pl files. Maybe you can dig out which file is the offending one ?
chromium.bb/src/third_party/perl/perl/vendor/lib/Parse/Method/Signatures.pm
I haven't been able to repro the hang.