NationalSecurityAgency/ghidra · error · LSHException

Cannot allocate new function tag: ${tag_name} - Column space

Error message

Cannot allocate new function tag: ${tag_name} - Column space is full

What it means

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").

Source

Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/elastic/ElasticDatabase.java:2971

	 * @throws ElasticException for communication problems with the server
	 */
	private void fdbInstallTag(InstallTagRequest query) throws LSHException, ElasticException {
		final ResponseInfo response = query.installresponse;
		if (!CategoryRecord.enforceTypeCharacters(query.tag_name)) {
			throw new LSHException("Bad characters in proposed function tag");
		}
		// Check for existing tag
		if (info.functionTags != null) {
			if (info.functionTags.contains(query.tag_name)) {
				throw new LSHException("Function tag already exists");
			}
		}
		if (info.functionTags == null) {
			info.functionTags = new ArrayList<>();
		}
		// There are only 32-bits of space in the function record reserved for storing the presence of tags
		if (info.functionTags.size() >= FunctionTagBSimFilterType.MAX_TAG_COUNT) {
			throw new LSHException(
				"Cannot allocate new function tag: " + query.tag_name + " - Column space is full");
		}
		info.functionTags.add(query.tag_name);
		writeFunctionTags();
		response.info = info;
	}

	/**
	 * Entry point for the Elasticsearch version of InstallMetadataRequest command:
	 *   Change some of the global meta-data labels for the database.
	 * @param query is command parameters
	 * @throws ElasticException for communication problems with the server
	 */
	private void fdbInstallMetadata(InstallMetadataRequest query) throws ElasticException {
		final ResponseInfo response = query.installresponse;
		if (query.dbname != null) {
			info.databasename = query.dbname;
		}

View on GitHub (pinned to d5f144c24d)

Solutions

  1. Remove unused function tags first to free a slot.
  2. Reconsider the tagging scheme to stay within 29 tags.
  3. Use executable categories for additional dimensions instead of more function tags.

Example fix

// before
for (String t : desiredTags) installTag(db, t); // fails at the 30th
// after
int room = FunctionTagBSimFilterType.MAX_TAG_COUNT - currentTagCount(db);
for (String t : desiredTags) {
    if (room-- <= 0) break;
    installTag(db, t);
}
Defensive patterns

Strategy: validation

Validate before calling

int max = FunctionTagBSimFilterType.MAX_TAG_COUNT;
int current = db.getInfo().functionTags == null ? 0 : db.getInfo().functionTags.size();
if (current >= max) throw new IllegalStateException("Function tag space is full (" + max + ")");

Type guard

boolean roomForTag = (db.getInfo().functionTags == null ? 0 : db.getInfo().functionTags.size())
    < FunctionTagBSimFilterType.MAX_TAG_COUNT;

Prevention

When it happens

Trigger: Installing a function tag when the database already has 29 tags registered.

Common situations: A long-lived database that has accumulated many tags; a bulk tag-install script.

Related errors


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