-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime: TestPageAllocScavenge/AllFreeUnscavExhaust fails on OpenBSD with 2.5GB RAM #36210
Comments
This is all WAI as of Go 1.14 (see #35568). From #35568 my understanding is that even if you have I'd like to avoid disabling these tests on OpenBSD, but perhaps it makes sense to disable them for non-builders so folks can run @aclements @bradfitz WDYT? |
Note that |
See also #33986, which discusses the need for a documented minimum RAM requirement for |
@bcmills the requirement is only virtual memory, not RAM. We only reserve the pages as That's the tricky bit. This only qualifies as "intensive" on OpenBSD (and maybe AIX? though I haven't seen any problems there after we made some fixes). |
Maybe use a combination of |
(And I'm assuming that the |
@bcmills OK, I'll put up a change for that. Linux's overcommit rules in all settings (even the very strict ones!) are totally OK with large |
Change https://golang.org/cl/212177 mentions this issue: |
@mpx could you please verify that https://golang.org/cl/212177 lets you run |
Adding a Skipping the tests helps, but there is also a noticeable increase in the actual memory requirements for building the compiler under go1.14beta1 with OpenBSD. 2GB memory continues to work for FreeBSD, but not OpenBSD:
Stack traceruntime stack: runtime.throw(0xe53ea3, 0x16) /home/buildsrv/go1.14beta1/src/runtime/panic.go:1112 +0x72 runtime.sysMap(0xc040000000, 0x4000000, 0x1612158) /home/buildsrv/go1.14beta1/src/runtime/mem_bsd.go:73 +0xc5 runtime.(*mheap).sysAlloc(0x15fbe60, 0x400000, 0x20807afff, 0x1c00) /home/buildsrv/go1.14beta1/src/runtime/malloc.go:713 +0x1cd runtime.(*mheap).grow(0x15fbe60, 0x1, 0x0) /home/buildsrv/go1.14beta1/src/runtime/mheap.go:1282 +0x11c runtime.(*mheap).allocSpan(0x15fbe60, 0x1, 0xc0003d1000, 0x1612168, 0x20b7c94e8) /home/buildsrv/go1.14beta1/src/runtime/mheap.go:1120 +0x65d runtime.(*mheap).alloc.func1() /home/buildsrv/go1.14beta1/src/runtime/mheap.go:867 +0x64 runtime.systemstack(0x45fd24) /home/buildsrv/go1.14beta1/src/runtime/asm_amd64.s:370 +0x66 runtime.mstart() /home/buildsrv/go1.14beta1/src/runtime/proc.go:1077
|
Good catch. I'll add that one.
What are you doing to determine if 2 GiB or 2.5 GiB of RAM is enough? Are you trying different machines? Are you varying I suspect this is a combination of the virtual memory use increase (because OpenBSD treats virtual memory like physical memory and limits it per-process) and that the Go compiler might simply be using a little bit more memory than last release. I don't think we're going to take additional steps to curb virtual memory use for this release. |
I have 2GB RAM VMs. I increased the memory allocation to 2.5GB for testing.
To help quantify the differences I've tried compiling 1.13.5 and 1.14beta1 with different data segment limits, decrementing 64MB each time until the build started failing (default GOGC).
There have been some efforts in the past to slow the growth in requirements so Go can be built on smaller machines. Hopefully there is some way to maintain advantages of the new allocator but reduce requirements on smaller machines? I understand this may not be practical for 1.14. |
go env
OutputCompiling go1.14beta1 via all.bash on OpenBSD 6.6 (amd64, 2.5GB RAM, 4 procs, no swap) fails. This can be reproduced with:
go1.13.5 builds fine with 2GB RAM.
I added some trace writes found
mem_bsd.go:sysReserve
mmap
fails withENOMEM
trying to allocate 536870912 bytes (levelShift[4]
inmpagealloc_64bit.go:sysInit
).Cc @mknyszek
The text was updated successfully, but these errors were encountered: