NationalSecurityAgency/ghidra · error · SQLException
Error querying vectorid: {vecResult.vectorid}
Error message
Error querying vectorid: {vecResult.vectorid} What it means
In the bulk/multi-result query loop (line ~1847), after each vector result the code queries `descTable` for matching function rows. `queryVectorIdMatch` returning null signals an internal query error (not an empty result, which is handled separately and `continue`s on filter). A null return causes SQLException with the vectorid. This is the bulk-path twin of error 749.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java:1847
vectorList.add(vecResult);
}
int count = 0;
DescriptionManager manage = query.matchresponse.manage;
for (VectorResult vecResult : vectorList) {
if (count >= query.max) {
break;
}
SignatureRecord srec = manage.newSignature(vecResult.vec, vecResult.hitcount);
List<DescriptionRow> descres;
if (filter == null) {
descres = descTable.queryVectorIdMatch(vecResult.vectorid, query.max - count);
}
else {
descres = descTable.queryVectorIdMatchFilter(vecResult.vectorid,
filter.tableClause(), filter.whereClause(), query.max - count);
}
if (descres == null) {
throw new SQLException(
"Error querying vectorid: " + Long.toString(vecResult.vectorid));
}
if (descres.size() == 0) {
if (filter != null) {
continue; // Filter may have eliminated all results
}
// Otherwise this is a sign of corruption in the database
throw new SQLException(
"No functions matching vectorid: " + Long.toString(vecResult.vectorid));
}
count += descres.size();
convertDescriptionRows(null, descres, vecResult, manage, srec);
}
if (query.fillinCategories && (info.execats != null)) {
fillinExecutableCategories(manage);
}
}
View on GitHub (pinned to d5f144c24d)
Solutions
- Retry the query -- this is typically transient.
- Check DB connectivity, pool health, and query latency.
- If persistent, investigate the vectorid and descTable consistency.
Defensive patterns
Strategy: retry
Try / catch
// Bulk-path internal query error -- transient; retry the whole query with backoff.
SQLException last = null;
for (int attempt = 0; attempt < 3; attempt++) {
try { return db.queryNearestBulk(query); }
catch (SQLException e) {
if (!e.getMessage().startsWith("Error querying vectorid:")) throw e;
last = e;
Thread.sleep(150L * (1L << attempt));
}
}
throw last; Prevention
- Keep the DB connection healthy; size the pool for bulk queries.
- Monitor latency on multi-result scans.
- Retry transient internal-query errors with backoff; escalate if persistent.
When it happens
Trigger: An internal failure during result resolution in the bulk loop -- connection drop mid-iteration, transient DB error, or a null inside the query method while processing many vector results.
Common situations: Transient connection issues on large multi-result queries; DB under heavy load; driver timeout during a long scan; partial failure partway through a batch.
Related errors
- Error querying vectorid:
- No functions matching vectorid:
- No functions matching vectorid: {vecResult.vectorid}
- Could not resolve filter specifying executable:
- Could not resolve filter specifying function: [
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/9245db7413bd74bd.
Report an issue: GitHub.