[Help] Antigravity CLI (agy) crashing in Termux/PRoot (TCMalloc 48-bit VA error)
Hi everyone,
I’m trying to install and run the new Antigravity CLI (agy) inside an Ubuntu PRoot environment on Termux (ARM64) Samsung Tab S8+, but I've hit a wall with a persistent memory allocation error.
Whenever I try to run agy --version, the binary crashes immediately with this error:
1 third_party/tcmalloc/internal/system_allocator.h:595] MmapAligned() failed -unable to allocate with tag ...
2 third_party/tcmalloc/internal/system_allocator.h:602] Note: the allocation may have failed because TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc with TCMALLOC_ADDRESS_BITS defined to your system's virtual address space size
3 third_party/tcmalloc/arena.cc:61] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data
The Problem:
It seems the binary is compiled with Google's tcmalloc, which is hard-coded to expect a 48-bit virtual address space. My Android kernel (like most) is limited to a 39-bit VA space. When tcmalloc tries to map metadata to high addresses, the kernel rejects it.
What I’ve already tried (none worked):
- Setting
PROOT_NO_SECCOMP=1before login. - Using
export TCMALLOC_SKIP_MMAP=true. - Attempting to
LD_PRELOADdifferent allocators (libc.so.6, libjemalloc.so). - Running the
x86_64version of the CLI viaqemu-x86_64(fails with the same VSS error). - Using a custom C shim to intercept
mmapcalls and strip high-address hints.
My Questions:
* Is there any way to force a pre-compiled tcmalloc binary to respect a 39-bit address space without having the source code to recompile it?
* Has anyone found a workaround for this specific "48-bit assumption" in other Google-distributed binaries (like Envoy or Bazel) when running in Termux?
* Is there a "compatible" build of agy available that I might have missed?
Any help or crazy workarounds would be much appreciated!