Skip to content
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: VirtualAlloc of 0 bytes failed with errno=1455 #33716

Open
ayanamist opened this issue Aug 19, 2019 · 4 comments

Comments

@ayanamist
Copy link

commented Aug 19, 2019

What version of Go are you using (go version)?

$ go version
go version go1.12.9 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ayanamist\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\ayanamist\Documents\Projects
set GOPROXY=
set GORACE=
set GOROOT=c:\go
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\AYANAM~1\AppData\Local\Temp\go-build065836494=/tmp/go-build -gno-record-gcc-switches

What did you do?

My quite complex proxy program

What did you expect to see?

Works fine

What did you see instead?

runtime: VirtualAlloc of 0 bytes failed with errno=1455
fatal error: runtime: failed to commit pages

runtime stack:
runtime.throw(0x8d1d68, 0x1f)
        c:/go/src/runtime/panic.go:617 +0x79
runtime.sysUsed(0xc0046ae000, 0x18000)
        c:/go/src/runtime/mem_windows.go:77 +0x198
runtime.(*mheap).allocSpanLocked(0xc87fe0, 0xc, 0xca2028, 0x203001100000000)
        c:/go/src/runtime/mheap.go:1199 +0x146
runtime.(*mheap).alloc_m(0xc87fe0, 0xc, 0x101, 0x155ffff)
        c:/go/src/runtime/mheap.go:977 +0xd0
runtime.(*mheap).alloc.func1()
        c:/go/src/runtime/mheap.go:1048 +0x53
runtime.(*mheap).alloc(0xc87fe0, 0xc, 0x1000101, 0x4d6eee0)
        c:/go/src/runtime/mheap.go:1047 +0x91
runtime.largeAlloc(0x16184, 0x450100, 0x4d6eee0)
        c:/go/src/runtime/malloc.go:1055 +0xa0
runtime.mallocgc.func1()
        c:/go/src/runtime/malloc.go:950 +0x4d
runtime.systemstack(0x0)
        c:/go/src/runtime/asm_amd64.s:351 +0x6b
runtime.mstart()
        c:/go/src/runtime/proc.go:1153

Full stacks see attachment stack.txt

@agnivade

This comment has been minimized.

Copy link
Member

commented Aug 19, 2019

Does this happen with 1.13beta1 too ? Is there a way you can give us a short program which causes this behavior ?

@aclements @mknyszek

@agnivade agnivade added this to the Go1.14 milestone Aug 19, 2019

@ayanamist

This comment has been minimized.

Copy link
Author

commented Aug 19, 2019

I will try 1.13 beta1. I cant give a short lrogram, since it needs a long time running before it occurs. It runs from 1.12.9 released until few minutes before i post this issue. But it occured several times before 1.12.9 released without my attention.

@mknyszek

This comment has been minimized.

Copy link
Contributor

commented Aug 19, 2019

The errno=1455 indicates that this is ERROR_COMMITMENT_LIMIT which is a type of out-of-memory failure on Windows. On tip this is correctly reported as "out of memory" instead of "failed to commit pages" by the runtime as a result of some of the work done in malloc.go done in Go 1.13.

It's also possible that for your application an out-of-memory condition is also less likely in Go 1.13, since we now return memory to the OS much more aggressively (#30333).

@ayanamist Let me know how running with the Go 1.13 beta1 goes!

@ayanamist

This comment has been minimized.

Copy link
Author

commented Aug 19, 2019

This feature seems amazing, i must try 1.13beta1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.