{"record":{"id":"035e6b5348039969","repo":"NationalSecurityAgency/ghidra","slug":"cannot-allocate-new-function-tag-tag-name-co","errorCode":null,"errorMessage":"Cannot allocate new function tag: ${tag_name} - Column space is full","messagePattern":"Cannot allocate new function tag: (.+?) - Column space is full","errorType":"validation","errorClass":"LSHException","httpStatus":null,"severity":"error","filePath":"Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java","lineNumber":2971,"sourceCode":"\t * @throws ElasticException for communication problems with the server\n\t */\n\tprivate void fdbInstallTag(InstallTagRequest query) throws LSHException, ElasticException {\n\t\tfinal ResponseInfo response = query.installresponse;\n\t\tif (!CategoryRecord.enforceTypeCharacters(query.tag_name)) {\n\t\t\tthrow new LSHException(\"Bad characters in proposed function tag\");\n\t\t}\n\t\t// Check for existing tag\n\t\tif (info.functionTags != null) {\n\t\t\tif (info.functionTags.contains(query.tag_name)) {\n\t\t\t\tthrow new LSHException(\"Function tag already exists\");\n\t\t\t}\n\t\t}\n\t\tif (info.functionTags == null) {\n\t\t\tinfo.functionTags = new ArrayList<>();\n\t\t}\n\t\t// There are only 32-bits of space in the function record reserved for storing the presence of tags\n\t\tif (info.functionTags.size() >= FunctionTagBSimFilterType.MAX_TAG_COUNT) {\n\t\t\tthrow new LSHException(\n\t\t\t\t\"Cannot allocate new function tag: \" + query.tag_name + \" - Column space is full\");\n\t\t}\n\t\tinfo.functionTags.add(query.tag_name);\n\t\twriteFunctionTags();\n\t\tresponse.info = info;\n\t}\n\n\t/**\n\t * Entry point for the Elasticsearch version of InstallMetadataRequest command:\n\t *   Change some of the global meta-data labels for the database.\n\t * @param query is command parameters\n\t * @throws ElasticException for communication problems with the server\n\t */\n\tprivate void fdbInstallMetadata(InstallMetadataRequest query) throws ElasticException {\n\t\tfinal ResponseInfo response = query.installresponse;\n\t\tif (query.dbname != null) {\n\t\t\tinfo.databasename = query.dbname;\n\t\t}","sourceCodeStart":2953,"sourceCodeEnd":2989,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java#L2953-L2989","documentation":"Function tags are bit-packed into 32 bits minus 3 reserved bits = 29 slots (FunctionTagBSimFilterType.MAX_TAG_COUNT). At install time, if info.functionTags.size() >= MAX_TAG_COUNT it throws LSHException(\"Cannot allocate new function tag: <name> - Column space is full\").","triggerScenarios":"Installing a function tag when the database already has 29 tags registered.","commonSituations":"A long-lived database that has accumulated many tags; a bulk tag-install script.","solutions":["Remove unused function tags first to free a slot.","Reconsider the tagging scheme to stay within 29 tags.","Use executable categories for additional dimensions instead of more function tags."],"exampleFix":"// before\nfor (String t : desiredTags) installTag(db, t); // fails at the 30th\n// after\nint room = FunctionTagBSimFilterType.MAX_TAG_COUNT - currentTagCount(db);\nfor (String t : desiredTags) {\n    if (room-- <= 0) break;\n    installTag(db, t);\n}","handlingStrategy":"validation","validationCode":"int max = FunctionTagBSimFilterType.MAX_TAG_COUNT;\nint current = db.getInfo().functionTags == null ? 0 : db.getInfo().functionTags.size();\nif (current >= max) throw new IllegalStateException(\"Function tag space is full (\" + max + \")\");","typeGuard":"boolean roomForTag = (db.getInfo().functionTags == null ? 0 : db.getInfo().functionTags.size())\n    < FunctionTagBSimFilterType.MAX_TAG_COUNT;","tryCatchPattern":null,"preventionTips":["Track tag count against MAX_TAG_COUNT before batch install.","Prefer categories for high-cardinality dimensions."],"tags":["bsim","tag","limits","capacity"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}