From 4cba63fb94fd9e4c0c15776d43740b77106cb13c Mon Sep 17 00:00:00 2001 From: Daniel Pupius Date: Mon, 16 Mar 2026 03:30:03 +0000 Subject: [PATCH] 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 --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index f04ded7..5c0b3d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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