NationalSecurityAgency/ghidra · error · SQLException

No functions matching vectorid: {vecResult.vectorid}

Error message

No functions matching vectorid: {vecResult.vectorid}

What it means

In the bulk query loop, a vector was returned by nearest-neighbor search but zero DescriptionRows reference it and no filter was applied (a filter would have triggered `continue`). The comment marks this as 'a sign of corruption in the database' -- an orphaned vector lacking function metadata. Bulk-path twin of error 750.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java:1855

			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);
		}
	}

	/**
	 * @param query the query to execute
	 * @param filter the function filter 
	 * @param response the response object
	 * @param descMgr the executable descriptor 
	 * @param iter the function iterator 
	 * @return the number of unique results found
	 * @throws SQLException if there is an error issuing the query

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Audit the DB for orphaned vectors (vector rows lacking a descTable entry).
  2. Re-ingest the affected executables to restore consistency.
  3. Run DB integrity checks and consider a rebuild if orphans are widespread.
Defensive patterns

Strategy: validation

Validate before calling

// Periodic integrity audit: flag vectors whose id has no descTable row.
String sql = "SELECT v.id FROM vectors v LEFT JOIN description d ON d.vector_id = v.id " +
    "WHERE d.id IS NULL";
try (Connection c = ds.getConnection();
     Statement s = c.createStatement();
     ResultSet rs = s.executeQuery(sql)) {
    List<Long> orphans = new ArrayList<>();
    while (rs.next()) orphans.add(rs.getLong(1));
    if (!orphans.isEmpty()) log.warn("orphaned vectors: {}", orphans);
}

Try / catch

try {
    return db.queryNearestBulk(query);
} catch (SQLException e) {
    if (e.getMessage().startsWith("No functions matching vectorid:")) {
        // corruption in the bulk path -- trigger maintenance / re-ingest
        triggerMaintenance();
        throw new DatabaseCorruptException(e.getMessage(), e);
    }
    throw e;
}

Prevention

When it happens

Trigger: A vector row exists but its descTable entries were deleted or never committed (aborted/partial ingest left an orphan). The bulk nearest-neighbor search surfaced the vector, but metadata resolution yields nothing.

Common situations: Aborted ingest leaving partial state; manual deletion of function rows without cleaning vectors; DB inconsistency after a crash; widespread orphans after a failed bulk load.

Related errors


AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14). Data as JSON: /api/errors/16e582840b04a5fb. Report an issue: GitHub.