NationalSecurityAgency/ghidra · error · IOException

{}: {}

Error message

{}: {}

What it means

Thrown in sendSignaturesToServer when InsertRequest.execute(querydb) returns null (server-side failure) and the resulting BSimError category is neither Format nor Nonfatal. Format/Nonfatal errors are treated as per-file warnings and skipped; any other category (Fatal, etc.) aborts the whole ingest with an IOException naming the file and the server error.

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java:215

			InsertRequest insertreq = new InsertRequest();
			if (ghidraOverrideURL != null) {
				insertreq.repo_override =
					GhidraURL.getProjectURL(ghidraOverrideURL).toExternalForm();
				insertreq.path_override = GhidraURL.getProjectPathname(ghidraOverrideURL);
			}
			loadSignatureXml(file, insertreq.manage);
			if (insertreq.manage.numFunctions() == 0) {
				Msg.warn(this, file.getName() + ": does not define any functions");
				continue;
			}
			if (insertreq.execute(querydb) == null) {
				BSimError lastError = querydb.getLastError();
				if ((lastError.category == ErrorCategory.Format) ||
					(lastError.category == ErrorCategory.Nonfatal)) {
					Msg.warn(this, file.getName() + ": " + lastError.message);
				}
				else {
					throw new IOException(file.getName() + ": " + lastError.message);
				}
			}
		}
	}

	protected void sendUpdateToServer(File dir) throws IOException, SAXException, LSHException {
		establishQueryServerConnection(true);
		List<File> files = gatherXml("update_", dir);

		if (files.isEmpty()) {
			throw new IOException("No update files found in " + dir.getAbsolutePath());
		}

		for (File file : files) {
			Msg.info(this, "Updating metadata for " + file.getName());
			QueryUpdate update = new QueryUpdate();
			loadSignatureXml(file, update.manage);
			ResponseUpdate respup = update.execute(querydb);

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Read the file and message in the exception to identify the offending XML file and server reason.
  2. Regenerate the named signature file and retry; if one file is corrupt, excluding it lets the rest proceed.
  3. Check server logs for the Fatal/Connection cause.
  4. Ensure client and server versions match.

Example fix

// before
bsim.sendSignaturesToServer(dir, null, monitor);  // file X: Fatal -> aborts

// after
// move/fix the offending file out of dir, regenerate it, then re-run ingest
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-validate XML files load and define functions before sending
for (File f : dir.listFiles((d, n) -> n.startsWith("sigs_"))) {
    try {
        // parse-check: loadSignatureXml-equivalent smoke test
    } catch (Exception ex) { /* quarantine f */ }
}

Try / catch

try {
    bsim.sendSignaturesToServer(dir, null, monitor);
} catch (IOException e) {
    // e.getMessage() is "<file>: <server msg>"; isolate the named file and retry the rest
}

Prevention

When it happens

Trigger: Ingesting a signature XML file whose server-side insert fails with a non-recoverable error: schema/protocol Fatal error, connection lost mid-insert, duplicate/collision rejected as Fatal, or a server internal error.

Common situations: Corrupt or partial signature XML; server ran out of resources during insert; client/server version mismatch causing a Fatal protocol error; DB constraint violation surfaced as Fatal.

Related errors


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