{"record":{"id":"53cf04e53f75c4a8","repo":"nodejs/node","slug":"unable-to-create-an-empty-bundle-for-the-pool-keys","errorCode":null,"errorMessage":"unable to create an empty bundle for the pool keys: %s","messagePattern":"unable to create an empty bundle for the pool keys: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"deps/icu-small/source/tools/genrb/genrb.cpp","lineNumber":334,"sourceCode":"        CollationRoot::forceLoadFromFile(options[UCADATA].value, status);\n#else\n        fprintf(stderr, \"--ucadata was used with UCONFIG_NO_COLLATION\\n\");\n        return status;\n#endif\n    }\n\n    initParser();\n\n    /*added by Jing*/\n    if(options[LANGUAGE].doesOccur) {\n        language = options[LANGUAGE].value;\n    }\n\n    LocalPointer<SRBRoot> newPoolBundle;\n    if(options[WRITE_POOL_BUNDLE].doesOccur) {\n        newPoolBundle.adoptInsteadAndCheckErrorCode(new SRBRoot(nullptr, true, status), status);\n        if(U_FAILURE(status)) {\n            fprintf(stderr, \"unable to create an empty bundle for the pool keys: %s\\n\", u_errorName(status));\n            return status;\n        } else {\n            const char *poolResName = \"pool.res\";\n            char *nameWithoutSuffix = static_cast<char *>(uprv_malloc(uprv_strlen(poolResName) + 1));\n            if (nameWithoutSuffix == nullptr) {\n                fprintf(stderr, \"out of memory error\\n\");\n                return U_MEMORY_ALLOCATION_ERROR;\n            }\n            uprv_strcpy(nameWithoutSuffix, poolResName);\n            *uprv_strrchr(nameWithoutSuffix, '.') = 0;\n            newPoolBundle->fLocale = nameWithoutSuffix;\n        }\n    }\n\n    if(options[USE_POOL_BUNDLE].doesOccur) {\n        const char *poolResName = \"pool.res\";\n        FileStream *poolFile;\n        int32_t poolFileSize;","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/icu-small/source/tools/genrb/genrb.cpp#L316-L352","documentation":"While initializing a fresh pool bundle (the keys-only bundle written by --writePoolBundle), genrb constructs `new SRBRoot(nullptr, true, status)`. If that constructor reports a failure via the UErrorCode (typically U_MEMORY_ALLOCATION_ERROR), the message prints the human-readable code via u_errorName and returns it. The pool bundle is the shared key table that other .res files reference to reduce size.","triggerScenarios":"Running `genrb --writePoolBundle out/ *.txt` on a system under severe memory pressure, or with a corrupted/oversized input that causes the SRBRoot constructor to fail its internal allocations.","commonSituations":"Building ICU data inside a memory-limited container or CI runner; running many parallel genrb processes that exhaust RAM.","solutions":["Free memory or raise the container's memory limit before re-running.","Reduce parallelism in the data build so each genrb process has enough headroom.","Inspect the status string printed (e.g. U_MEMORY_ALLOCATION_ERROR) to confirm it is a memory problem rather than a logic error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Best-effort preflight: ensure enough free memory for the build\nmin_mb=512\nfree_mb=$(awk '/MemAvailable/ {print int($2/1024)}' /proc/meminfo 2>/dev/null || echo 0)\nif [ \"$free_mb\" -lt \"$min_mb\" ]; then\n  echo \"WARNING: only ${free_mb}MB free; pool bundle init may fail\" >&2\nfi","typeGuard":null,"tryCatchPattern":"genrb --writePoolBundle \"$OUT_DIR\" \"$@\" 2>err.log\nif grep -q 'unable to create an empty bundle' err.log; then\n  echo \"Pool bundle init failed; freeing memory or reducing parallelism\" >&2; exit 1\nfi","preventionTips":["Cap genrb parallelism in your build system to keep heap usage bounded.","Monitor RSS of build workers so OOM conditions surface before they hit genrb."],"tags":["icu","genrb","pool-bundle","memory","srbroot"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}