Community
Participate
Working Groups
Eclipse C++ indexer gets to 7% complete when attempting to index the gcc source, but makes no further progress. I am running Eclipse on a RHEL7.5 system. I have given Eclipse 16GB of heap. gcc source code is available here https://ftp.gnu.org/gnu/gcc/ ; versions 8.2.0 and 8.2.1 show the problem, maybe other versions show it too.
The indexer has the same problem with the code for gcc 7.3.1
Thanks for the report. The next step to get this resolved is to reduce the problematic codebase to a minimal example that triggers the hang. Unfortunately, I don't have the time to do that sort of thing any more, but if someone else does it, I'm happy to debug the resulting example.
How do I go about reducing the problematic codebase ? I have a little time which I could put to the effort, but I don't know how to go about it .
(In reply to Chris Ward from comment #3) > How do I go about reducing the problematic codebase ? I have a little time > which I could put to the effort, but I don't know how to go about it . See e.g. bug 535548 comment 3.
I don't think a binary chop is practical; however I see https://www.eclipse.org/lists/cdt-dev/msg11365.html , which with any luck will indicate which file is causing the indexer to hang. I'll try following those instructions.
The indexer debug trace hangs with the last few lines being Indexer: adding file:/home/tjcw/workspace/gcc-7.3.1-AME/gcc/testsuite/g++.dg/pr64688-2.C Indexer: processed /gcc-7.3.1-AME/gcc/testsuite/g++.dg/pr64688-2.C [89 ms] Indexer: parsing /gcc-7.3.1-AME/gcc/testsuite/g++.dg/pr64688.C so I take it that the file causing the problem is pr64688.C . Instructions for reproducing the problem are therefore: download the gcc source from https://ftp.gnu.org/gnu/gcc/ , select version 8.2.1 attempt to index the file gcc/testsuite/g++.dg/pr64688.C in this package observe that the indexer hangs This also gives me a workaround; I don't need the gcc testsuite to build my application, and if I move the testsuite out of the source tree, the indexer runs to completion.
Created attachment 276742 [details] Files showing eclipse indexer errors On further checking, there were several files giving indexer errors. I have attached a tarball of the failures. I don't know if the errors are caused by these source files or by files included by them.
(In reply to Chris Ward from comment #6) > so I take it that the file causing the problem is pr64688.C . Ah, yeah, compiler testcases causing problems for the indexer are somewhat expected. See also bug 514035. > This also gives me a workaround; I don't need the gcc testsuite to build my > application, and if I move the testsuite out of the source tree, the indexer > runs to completion. You don't need to move the testsuite out of the source tree to avoid indexing it, you can just exclude it from the build via Properties.