{"record":{"id":"9cbb04ea425a2381","repo":"NationalSecurityAgency/ghidra","slug":"error-9cbb04","errorCode":null,"errorMessage":"{}: {}","messagePattern":"\\{\\}: \\{\\}","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java","lineNumber":215,"sourceCode":"\t\t\tInsertRequest insertreq = new InsertRequest();\n\t\t\tif (ghidraOverrideURL != null) {\n\t\t\t\tinsertreq.repo_override =\n\t\t\t\t\tGhidraURL.getProjectURL(ghidraOverrideURL).toExternalForm();\n\t\t\t\tinsertreq.path_override = GhidraURL.getProjectPathname(ghidraOverrideURL);\n\t\t\t}\n\t\t\tloadSignatureXml(file, insertreq.manage);\n\t\t\tif (insertreq.manage.numFunctions() == 0) {\n\t\t\t\tMsg.warn(this, file.getName() + \": does not define any functions\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (insertreq.execute(querydb) == null) {\n\t\t\t\tBSimError lastError = querydb.getLastError();\n\t\t\t\tif ((lastError.category == ErrorCategory.Format) ||\n\t\t\t\t\t(lastError.category == ErrorCategory.Nonfatal)) {\n\t\t\t\t\tMsg.warn(this, file.getName() + \": \" + lastError.message);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new IOException(file.getName() + \": \" + lastError.message);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected void sendUpdateToServer(File dir) throws IOException, SAXException, LSHException {\n\t\testablishQueryServerConnection(true);\n\t\tList<File> files = gatherXml(\"update_\", dir);\n\n\t\tif (files.isEmpty()) {\n\t\t\tthrow new IOException(\"No update files found in \" + dir.getAbsolutePath());\n\t\t}\n\n\t\tfor (File file : files) {\n\t\t\tMsg.info(this, \"Updating metadata for \" + file.getName());\n\t\t\tQueryUpdate update = new QueryUpdate();\n\t\t\tloadSignatureXml(file, update.manage);\n\t\t\tResponseUpdate respup = update.execute(querydb);","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java#L197-L233","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the file and message in the exception to identify the offending XML file and server reason.","Regenerate the named signature file and retry; if one file is corrupt, excluding it lets the rest proceed.","Check server logs for the Fatal/Connection cause.","Ensure client and server versions match."],"exampleFix":"// before\nbsim.sendSignaturesToServer(dir, null, monitor);  // file X: Fatal -> aborts\n\n// after\n// move/fix the offending file out of dir, regenerate it, then re-run ingest","handlingStrategy":"try-catch","validationCode":"// pre-validate XML files load and define functions before sending\nfor (File f : dir.listFiles((d, n) -> n.startsWith(\"sigs_\"))) {\n    try {\n        // parse-check: loadSignatureXml-equivalent smoke test\n    } catch (Exception ex) { /* quarantine f */ }\n}","typeGuard":null,"tryCatchPattern":"try {\n    bsim.sendSignaturesToServer(dir, null, monitor);\n} catch (IOException e) {\n    // e.getMessage() is \"<file>: <server msg>\"; isolate the named file and retry the rest\n}","preventionTips":["Keep client and server versions aligned to avoid Fatal insert errors.","Regenerate corrupt signature files before ingest.","Process per-file warnings (Format/Nonfatal) as logs but react to Fatal aborts by isolating the named file."],"tags":["bsim","ingest","insert-failure","ioexception"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}