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.gc bug #23715

Closed
mindlesslcc opened this issue Feb 6, 2018 · 3 comments
Closed

runtime.gc bug #23715

mindlesslcc opened this issue Feb 6, 2018 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@mindlesslcc
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go1.9.2

Does this issue reproduce with the latest release?

yes,but can only be reproduced once a day

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

centos-4.3 amd64 2.6.32_1-14-0-0
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GORACE=""
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build835692229=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

it's a server program

What did you expect to see?

it should run OK with no panic

What did you see instead?

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1c pc=0x4515d7]

runtime stack:
runtime.throw(0xa3b7f8, 0x2a)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/panic.go:605 +0x95
runtime.sigpanic()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/signal_unix.go:351 +0x2b8
runtime.tracebackdefers(0xc4204bb680, 0x517d6f68, 0x0)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/traceback.go:102 +0x117
runtime.scanstack(0xc4204bb680, 0xc420021260)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgcmark.go:780 +0x17b
runtime.scang(0xc4204bb680, 0xc420021260)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/proc.go:869 +0x1f6
runtime.markroot.func1()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgcmark.go:264 +0x6d
runtime.systemstack(0x517d7088)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/asm_amd64.s:360 +0xab
runtime.markroot(0xc420021260, 0x71)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgcmark.go:245 +0x308
runtime.gcDrain(0xc420021260, 0x5)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgcmark.go:912 +0xd4
runtime.gcBgMarkWorker.func2()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgc.go:1776 +0x80
runtime.systemstack(0xc422c0c1b8)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/asm_amd64.s:344 +0x79
runtime.mstart()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/proc.go:1135

goroutine 27 [GC worker (idle)]:
runtime.systemstack_switch()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/asm_amd64.s:298 fp=0xc420034f48 sp=0xc420034f40 pc=0x45b3a0
runtime.gcBgMarkWorker(0xc420020000)
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgc.go:1763 +0x202 fp=0xc420034fd8 sp=0xc420034f48 pc=0x41b302
runtime.goexit()
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc420034fe0 sp=0xc420034fd8 pc=0x45dfd1
created by runtime.gcBgMarkStartWorkers
/home/scmtools/buildkit/go/go_1.9.2/src/runtime/mgc.go:1658 +0x7e

@davecheney
Copy link
Contributor

This looks like memory corruption. Have you tried running your program under the race detector? See https://blog.golang.org/race-detector .

Also, it looks like you're running centos 4 with an upgraded kernel. You need to know that Go does not support RHEL5 or earlier, so depending on where you got that kernel, it may not meet the minimum requirements to run Go.

@davecheney davecheney added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 6, 2018
@mindlesslcc
Copy link
Author

we add '-race' build option,and there is many race warn.maybe this bug will be fixed after we fix all race warn

@ALTree
Copy link
Member

ALTree commented Feb 6, 2018

Yes. A program with a data race in it is not valid and data races often cause runtime crashes.

Closing this, since it's not a Go bug.

@ALTree ALTree closed this as completed Feb 6, 2018
@golang golang locked and limited conversation to collaborators Feb 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants