Fix esbuild crash in Docker build with MALLOC_ARENA_MAX=2

esbuild ships a pre-compiled Go binary that crashes with
"lfstack.push invalid packing" on Linux kernels with 5-level paging
or high-entropy ASLR, which place memory above 47-bit addresses.
Limiting glibc arena count keeps allocations in the lower address range.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel Pupius
2026-03-16 03:30:03 +00:00
parent be2857727f
commit 4cba63fb94
+4
View File
@@ -31,6 +31,10 @@ ENV VITE_API_BASE_URL=${MESHSTREAM_API_BASE_URL} \
VITE_SITE_TITLE=${MESHSTREAM_SITE_TITLE} \
VITE_SITE_DESCRIPTION=${MESHSTREAM_SITE_DESCRIPTION}
# Prevent esbuild's Go runtime from crashing on kernels with high-entropy ASLR
# or 5-level paging, which places memory at addresses above 47 bits.
ENV MALLOC_ARENA_MAX=2
# Build the web app
RUN pnpm build