Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

crashing if multi-process indexing is disabled #617

Closed
TTimo opened this issue Aug 28, 2018 · 6 comments
Closed

crashing if multi-process indexing is disabled #617

TTimo opened this issue Aug 28, 2018 · 6 comments
Labels

Comments

@TTimo
Copy link
Contributor

TTimo commented Aug 28, 2018

While investigating #616, if I turn off multi-processing indexing, sourcetrail crashes shortly after starting indexing:

(gdb) bt
#0  0x000000000196216c in clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const ()
#1  0x0000000001959254 in clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) ()
#2  0x00000000010152d3 in clang::driver::Driver::ParseArgStrings(llvm::ArrayRef<char const*>, bool&) ()
#3  0x000000000102aeff in clang::driver::Driver::BuildCompilation(llvm::ArrayRef<char const*>) ()
#4  0x0000000000acd139 in ?? ()
#5  0x0000000000ad1b41 in CxxParser::runTool(clang::tooling::CompilationDatabase*, FilePath const&) ()
#6  0x0000000000ad2a89 in CxxParser::buildIndex(std::shared_ptr<IndexerCommandCxxCdb>) ()
#7  0x0000000000ac661a in IndexerCxx<IndexerCommandCxxCdb, CxxParser>::doIndex(std::shared_ptr<IndexerCommandCxxCdb>) ()
#8  0x0000000000ac5401 in Indexer<IndexerCommandCxxCdb>::index(std::shared_ptr<IndexerCommand>) ()
#9  0x0000000000caa3e6 in IndexerComposite::index(std::shared_ptr<IndexerCommand>) ()
#10 0x0000000000da4e33 in InterprocessIndexer::work() ()
#11 0x0000000000cb18a5 in TaskBuildIndex::runIndexerThread(int) ()
#12 0x0000000002737eb0 in ?? ()
#13 0x00007fc12a52c6db in start_thread (arg=0x7fc101345700) at pthread_create.c:463
#14 0x00007fc127e3088f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
@egraether
Copy link
Contributor

Not sure what might cause this. There were also no related changes since 2018.3.13 that I can think of. Maybe the indexer commands are malformed. Can you please enable logging and send the log file to [email protected]?

Is this happening for every project?

@TTimo
Copy link
Contributor Author

TTimo commented Aug 28, 2018

Logs sent. tictactoe is working fine .. I don't have any other project at hand atm.

@mlangkabel
Copy link
Contributor

I don't see anything unusual in the logs, but the callstack you posted shows that the crash is in the Clang code. I guess that this is caused by some combination of command line arguments passed to the Clang tool. Are you using a JSON compilation database file for the project setup? If so, would it be possible for you to send us the entry for the first X compilation unit of that file (where X equals the number of threads that you use for indexing)? I guess, that those will be enough for us to reproduce the issue, because it crashes for you right on start,

@TTimo
Copy link
Contributor Author

TTimo commented Aug 29, 2018

Sent a stripped compile database that triggers the crash.

@mlangkabel
Copy link
Contributor

Thank you very much! We managed to reproduce your issue using the compilation database you sent!

@egraether
Copy link
Contributor

Fixed with 2018.3.55
New build is available for download: https://www.sourcetrail.com/downloads

The crash occurred for some compiler flags in the compile commands that for some reason caused clang internal errors, that we didn't properly deal with.

Thanks again for reporting this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants