NationalSecurityAgency/ghidra · error · LSHException
Prewarm failed: {}
Error message
Prewarm failed: {} What it means
Thrown in prewarm when ResponsePrewarm response is null, i.e. the server rejected the PrewarmRequest. BulkSignatures wraps the server's BSimError into 'Prewarm failed: <message>' (LSHException). A non-null response with operationSupported=false is logged as an error rather than thrown, so this throw specifically indicates a null protocol-level response.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java:656
}
else {
Msg.info(this, "Successfully rebuilt index " + dbDetail);
}
}
/**
* Performs a prewarm command on the BSim database.
*
* @throws IOException if there's an error establishing the database connection
* @throws LSHException if there's an error issuing the query
*/
public void prewarm() throws IOException, LSHException {
DatabaseInformation info = establishQueryServerConnection(false);
PrewarmRequest request = new PrewarmRequest();
ResponsePrewarm response = request.execute(querydb);
if (response == null) {
BSimError lastError = querydb.getLastError();
throw new LSHException("Prewarm failed: " + lastError.message);
}
String dbDetail = "for database " + info.databasename + " (" + bsimServerInfo + ")";
if (!response.operationSupported) {
Msg.error(this, "Prewarm operation not supported " + dbDetail);
}
else {
Msg.info(this, "Successfully prewarmed " + Integer.toString(response.blockCount) +
" blocks of main index " + dbDetail);
}
}
/**
* Returns a list of all executable records meeting a set of search criteria.
*
* @param limit the maximum number of results to return
* @param md5Filter MD5 filter
* @param exeNameFilter executable name filter
* @param archFilter architecture filterView on GitHub (pinned to d5f144c24d)
Solutions
- Read the message to distinguish unsupported vs. transient failure.
- Only call prewarm on backends that support it and after an index exists.
- Retry on transient connection failures.
- Check server logs if the cause is unclear.
Example fix
// before bsim.prewarm(); // unsupported backend -> LSHException // after // only prewarm on a supported, populated backend
Defensive patterns
Strategy: try-catch
Validate before calling
// only prewarm on supported, populated backends after an index exists
Try / catch
try {
bsim.prewarm();
} catch (LSHException e) {
// message: "Prewarm failed: <server>"; if unsupported, skip; if transient, retry
} Prevention
- Only prewarm backends that support it (e.g. PostgreSQL with an index).
- Ensure an index exists before prewarming.
- Retry once on transient failures.
When it happens
Trigger: Prewarming a backend that rejects the request: unsupported storage engine returning null, connection failure, or no index/main table to prewarm.
Common situations: Prewarm is only meaningful for certain backends (e.g. PostgreSQL with an index); calling it on H2 or an unindexed DB can yield null; transient connection loss.
Related errors
- Could not drop index: {}
- Could not rebuild index: {}
- Could not perform delete: {}
- Could not perform getexeinfo: {}
- Could not change metadata: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/aad44aec51823045.
Report an issue: GitHub.