fatal error: out of memory allocating heap arena map.

2,077 views
Skip to first unread message

Raja Murugan

unread,
Apr 30, 2021, 12:25:37 PM4/30/21
to golang-nuts
fatal error: out of memory allocating heap arena mapruntime stack: runtime.throw(0xb580a0, 0x27) /usr/lib/golang/src/runtime/panic.go:1116 +0x72 fp=0x7ffde7fd3380 sp=0x7ffde7fd3350 pc=0x436132 runtime.(*mheap).sysAlloc(0xfef4a0, 0x400000, 0x0, 0x4) /usr/lib/golang/src/runtime/malloc.go:737 +0x76d fp=0x7ffde7fd3428 sp=0x7ffde7fd3380 pc=0x40d0ad runtime.(*mheap).grow(0xfef4a0, 0x1, 0x0) /usr/lib/golang/src/runtime/mheap.go:1344 +0x85 fp=0x7ffde7fd3490 sp=0x7ffde7fd3428 pc=0x428865 runtime.(*mheap).allocSpan(0xfef4a0, 0x1, 0x612d636a73002a00, 0x100a988, 0x412d) /usr/lib/golang/src/runtime/mheap.go:1160 +0x6b6 fp=0x7ffde7fd3510 sp=0x7ffde7fd3490 pc=0x428616 runtime.(*mheap).alloc.func1() /usr/lib/golang/src/runtime/mheap.go:907 +0x65 fp=0x7ffde7fd3568 sp=0x7ffde7fd3510 pc=0x461fe5 runtime.(*mheap).alloc(0xfef4a0, 0x1, 0x12a, 0x0) /usr/lib/golang/src/runtime/mheap.go:901 +0x85 fp=0x7ffde7fd35b8 sp=0x7ffde7fd3568 pc=0x427ae5 runtime.(*mcentral).grow(0x1002358, 0x0) /usr/lib/golang/src/runtime/mcentral.go:506 +0x7a fp=0x7ffde7fd3600 sp=0x7ffde7fd35b8 pc=0x418cda runtime.(*mcentral).cacheSpan(0x1002358, 0x40000) /usr/lib/golang/src/runtime/mcentral.go:177 +0x3e5 fp=0x7ffde7fd3678 sp=0x7ffde7fd3600 pc=0x418a65 runtime.(*mcache).refill(0x7fafd6440108, 0x2a) /usr/lib/golang/src/runtime/mcache.go:142 +0xa5 fp=0x7ffde7fd3698 sp=0x7ffde7fd3678 pc=0x418405 runtime.(*mcache).nextFree(0x7fafd6440108, 0xfd7f2a, 0x7fafd6440108, 0x7fafb1b20000, 0x7ffde7fd3728) /usr/lib/golang/src/runtime/malloc.go:880 +0x8d fp=0x7ffde7fd36d0 sp=0x7ffde7fd3698 pc=0x40d3ad runtime.mallocgc(0x180, 0xb3a7c0, 0x7ffde7fd3701, 0x7ffde7fd37d0) /usr/lib/golang/src/runtime/malloc.go:1061 +0x834 fp=0x7ffde7fd3770 sp=0x7ffde7fd36d0 pc=0x40dd94 runtime.newobject(0xb3a7c0, 0x460d20) /usr/lib/golang/src/runtime/malloc.go:1195 +0x38 fp=0x7ffde7fd37a0 sp=0x7ffde7fd3770 pc=0x40e238 runtime.malg(0x8000, 0x0) /usr/lib/golang/src/runtime/proc.go:3514 +0x31 fp=0x7ffde7fd37e0 sp=0x7ffde7fd37a0 pc=0x440cd1 runtime.mpreinit(0xfd7f40) /usr/lib/golang/src/runtime/os_linux.go:340 +0x29 fp=0x7ffde7fd3800 sp=0x7ffde7fd37e0 pc=0x432d29 runtime.mcommoninit(0xfd7f40, 0xffffffffffffffff) /usr/lib/golang/src/runtime/proc.go:663 +0xf7 fp=0x7ffde7fd3848 sp=0x7ffde7fd3800 pc=0x439f37 runtime.schedinit() /usr/lib/golang/src/runtime/proc.go:565 +0xa5 fp=0x7ffde7fd38a0 sp=0x7ffde7fd3848 pc=0x439ac5 runtime.rt0_go(0x7ffde7fd38d8, 0xb, 0x7ffde7fd38d8, 0x0, 0x0, 0xb, 0x7ffde7fd3de0, 0x7ffde7fd3df0, 0x7ffde7fd3df7, 0x7ffde7fd3dff, ...) /usr/lib/golang/src/runtime/asm_amd64.s:214 +0x125 fp=0x7ffde7fd38a8 sp=0x7ffde7fd38a0 pc=0x4696a5


golang version : go 1.15
OS : Centos 8

How to debug this issue, any troubleshooting tips

Raja Murugan

unread,
Apr 30, 2021, 12:35:24 PM4/30/21
to golang-nuts
attached stacktrace 
stack_trace_oom.txt

Ian Lance Taylor

unread,
Apr 30, 2021, 12:51:27 PM4/30/21
to Raja Murugan, golang-nuts
The error suggests that your program has run out of memory. So I
would start by doing a memory profile. Search for "Go memory
profiling" and you will see a lot of helpful tutorials and articles.

Ian

Raja Murugan

unread,
May 3, 2021, 11:49:35 AM5/3/21
to golang-nuts
I see ulimit is not set to unlimited to this processs, caused this error.

please close this conversation.

Reply all
Reply to author
Forward
0 new messages