Skip to content

runtime: fatal error: sweep increased allocation count (With go get) #19029

Closed
@cynecx

Description

@cynecx

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

go version go1.7.5 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/cynecx/dev/go"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build806428553=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

go get -u -v github.com/nsf/gocode

What did you expect to see?

Anything except runtime errors.

What did you see instead?

runtime: nelems=256 nfree=0 nalloc=256 previous allocCount=254 nfreed=65534
fatal error: sweep increased allocation count

runtime stack:
runtime.throw(0x856aef, 0x20)
    /usr/lib/go/src/runtime/panic.go:566 +0x95
runtime.(*mspan).sweep(0x7f699add7b20, 0x500000000, 0xc400000001)
    /usr/lib/go/src/runtime/mgcsweep.go:287 +0x7ab
runtime.sweepone(0x4a8bf6)
    /usr/lib/go/src/runtime/mgcsweep.go:112 +0xfe
runtime.gosweepone.func1()
    /usr/lib/go/src/runtime/mgcsweep.go:124 +0x2b
runtime.systemstack(0xc420020000)
    /usr/lib/go/src/runtime/asm_amd64.s:298 +0x79
runtime.mstart()
    /usr/lib/go/src/runtime/proc.go:1079

goroutine 3 [running]:
runtime.systemstack_switch()
    /usr/lib/go/src/runtime/asm_amd64.s:252 fp=0xc420030f48 sp=0xc420030f40
runtime.gosweepone(0x0)
    /usr/lib/go/src/runtime/mgcsweep.go:125 +0x53 fp=0xc420030f78 sp=0xc420030f48
runtime.bgsweep(0xc420060000)
    /usr/lib/go/src/runtime/mgcsweep.go:66 +0xbb fp=0xc420030fb8 sp=0xc420030f78
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420030fc0 sp=0xc420030fb8
created by runtime.gcenable
    /usr/lib/go/src/runtime/mgc.go:195 +0x61

goroutine 1 [runnable]:
os.OpenFile(0xc4200159b0, 0x24, 0x0, 0xc400000000, 0x2, 0x2, 0xc4200159b0)
    /usr/lib/go/src/os/file_unix.go:86
os.Open(0xc4200159b0, 0x24, 0x2, 0x2, 0xc4200159b0)
    /usr/lib/go/src/os/file.go:250 +0x46
go/build.(*Context).openFile(0xa2ea40, 0xc4200159b0, 0x24, 0x2, 0xc4200159b0, 0x24, 0x26eb)
    /usr/lib/go/src/go/build/build.go:184 +0x94
go/build.(*Context).matchFile(0xa2ea40, 0xc4203871c0, 0x13, 0xc42033c6a4, 0x10, 0xc420014c01, 0xc42043cbf0, 0xc4201d0b60, 0x0, 0xc420382000, ...)
    /usr/lib/go/src/go/build/build.go:1045 +0x2fd
go/build.(*Context).Import(0xa2ea40, 0xc42019f821, 0x3, 0xc42017d200, 0x2d, 0x4, 0xc4201fcd01, 0xc42043cf50, 0x47fc61)
    /usr/lib/go/src/go/build/build.go:690 +0x9ec
main.loadImport(0xc42019f821, 0x3, 0xc42017d200, 0x2d, 0xc4201b2000, 0xc4201a8180, 0xc4201c70b0, 0x1, 0x1, 0x1, ...)
    /usr/lib/go/src/cmd/go/pkg.go:365 +0x3b9
main.(*Package).load(0xc4201b2000, 0xc4201a8180, 0xc4201a6a80, 0x0, 0x0, 0xc)
    /usr/lib/go/src/cmd/go/pkg.go:940 +0x12b6
main.loadImport(0x7ffd56c3b483, 0x15, 0xc420010064, 0x13, 0x0, 0xc4201a8180, 0x0, 0x0, 0x0, 0x0, ...)
    /usr/lib/go/src/cmd/go/pkg.go:374 +0x470
main.loadPackage(0x7ffd56c3b483, 0x15, 0xc4201a8180, 0x0)
    /usr/lib/go/src/cmd/go/pkg.go:1658 +0x28f
main.download.func1(0x7ffd56c3b483, 0x15, 0x0, 0xc42019e6e0)
    /usr/lib/go/src/cmd/go/get.go:190 +0xba
main.download(0x7ffd56c3b483, 0x15, 0x0, 0xc4201a8180, 0x0)
    /usr/lib/go/src/cmd/go/get.go:195 +0xf3
main.runGet(0xa27900, 0xc42000c0e0, 0x1, 0x1)
    /usr/lib/go/src/cmd/go/get.go:106 +0x145
main.main()
    /usr/lib/go/src/cmd/go/main.go:181 +0x624

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
    /usr/lib/go/src/runtime/sigqueue.go:116 +0x157
os/signal.loop()
    /usr/lib/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
    /usr/lib/go/src/os/signal/signal_unix.go:28 +0x41

I am currently using a customized (ck/muqss+bfq) kernel but I don't think this is the issue because it is also crashing with a freshly compiled vanilla linux kernel (v4.9.9).

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions