NationalSecurityAgency/ghidra · warning · LSHException
Database does not track callgraph
Error message
Database does not track callgraph
What it means
Thrown as an LSHException in queryCallgraph when info.trackcallgraph is false. The database was created without the callgraph tracking bit set in its settings, so call-graph relationship data was never stored. queryCallgraph is invoked by queries that request call-graph fill-in; if the database does not track callgraphs, the operation is unsupported.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java:2710
}
RowKeyElastic eKey = RowKeyElastic.parseExeIdString(exeId);
StringBuilder buffer = new StringBuilder();
eKey.generateLibraryFunctionId(buffer, funcName);
return buffer.toString();
}
/**
* For every function currently in the manager, fill in its call-graph information.
* This involves querying the database for child information, adding the cross-link
* information (CallgraphEntry) between FunctionDescriptions, and possibly querying
* for new library executables and functions
* @param manager is the collection of functions to link
* @throws LSHException for problems updating the container
* @throws ElasticException for communication problems with the server
*/
private void queryCallgraph(DescriptionManager manager) throws LSHException, ElasticException {
if (!info.trackcallgraph) {
throw new LSHException("Database does not track callgraph");
}
TreeMap<RowKey, FunctionDescription> funcmap = new TreeMap<>();
manager.generateFunctionIdMap(funcmap);
for (ExecutableRecord exeRec : manager.getExecutableRecordSet()) {
if (exeRec.isLibrary()) {
continue;
}
List<FunctionDescription> funclist = new ArrayList<>();
Iterator<FunctionDescription> iter = manager.listFunctions(exeRec);
while (iter.hasNext()) { // Build a static copy of the list of functions
funclist.add(iter.next());
}
for (FunctionDescription element : funclist) {
fillinChildren(element, manager, funcmap);
}
}
}
View on GitHub (pinned to d5f144c24d)
Solutions
- Check database.getInfo().trackcallgraph before issuing callgraph-related queries and skip gracefully if false.
- Recreate the database with callgraph tracking enabled by setting the appropriate settings flag during the generate/create command.
- Avoid requesting callgraph data (e.g., set the callgraph fill-in option to false) when the database does not support it.
Example fix
// before
database.query(query); // internally calls queryCallgraph, throws LSHException
// after
if (database.getInfo() != null && database.getInfo().trackcallgraph) {
database.query(query);
} else {
Msg.warn(this, "Database does not track callgraph; skipping callgraph query");
} Defensive patterns
Strategy: validation
Validate before calling
// Check callgraph support before issuing callgraph queries
if (!database.getInfo().trackcallgraph) {
Msg.warn(this, "Database does not track callgraph; callgraph data will not be populated.");
// Skip callgraph request or set query option to not request callgraph
query.fillcallgraph = false; // disable callgraph in the query
} Try / catch
try {
database.query(query);
} catch (LSHException e) {
if (e.getMessage().equals("Database does not track callgraph")) {
Msg.warn(this, "Callgraph not tracked — disable callgraph request and retry");
query.fillcallgraph = false;
database.query(query); // retry without callgraph
} else {
throw e;
}
} Prevention
- Check database.getInfo().trackcallgraph before requesting callgraph data.
- Create databases with callgraph tracking enabled if callgraph queries are needed.
- Make callgraph fill-in optional in query logic so it can be skipped gracefully.
When it happens
Trigger: Calling queryCallgraph (triggered by QueryNearest or other commands that request call-graph population) when the DatabaseInformation.trackcallgraph field is false. The check happens at the top of queryCallgraph before any network queries are issued.
Common situations: Database created with default settings that do not include the callgraph tracking flag; querying an existing database that was intentionally created without callgraph support to save space; settings mismatch between client expectation and database configuration.
Related errors
- SQL database does not have callgraph information enabled
- Unknown response trying to adjust number_of_replicas and ref
- Cluster did not accept settings for index:
- Elasticsearch database does not have callgraph information e
- Function tag does not exist: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/48ae2bac03a7fd97.
Report an issue: GitHub.