cloudflare / cloudflare/workerd

TCMalloc assumes a 48-bit virtual address space size; you may need to rebuild TCMalloc with TCMALLOC_ADDRESS_BITS

Open
#5,020 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

The issue:

16725 external/com_google_tcmalloc/tcmalloc/system-alloc.cc:769] MmapAligned() failed - unable to allocate with tag (hint=0x2d8200000000, size=1073741824, alignment=1073741824) - is something limiting address placement?
16725 external/com_google_tcmalloc/tcmalloc/system-alloc.cc:776] 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
16725 external/com_google_tcmalloc/tcmalloc/arena.cc:56] CHECK in Alloc: FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes=131072, object-size=16384); is something preventing mmap from succeeding (sandbox, VSS limitations)?

My system:
Termux on android with glibc enabled

Please address the issue and try to make a build for termux on android officially

Contributor guide

Open the contributing guide

Research direction

Start with external/com_google_tcmalloc/tcmalloc/system-alloc.cc around the MmapAligned() failure and external/com_google_tcmalloc/tcmalloc/arena.cc around the internal allocation check. Reproduce the failure on Termux with glibc and trace how TCMALLOC_ADDRESS_BITS and the project build configuration are set. Done means the relevant Termux-on-Android build no longer hits this address-space failure and an official build path is documented or provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.