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: fatal error: unexpected signal during runtime execution #24861

Open
iceooacai opened this Issue Apr 14, 2018 · 9 comments

Comments

Projects
None yet
3 participants
@iceooacai

iceooacai commented Apr 14, 2018

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10 windows/amd64

Does this issue reproduce with the latest release?

no

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

set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Administrator\AppData\Local\go-build
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\GoPath;D:\Server_正式服
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 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\ADMINI~1\AppData\Local\Temp\2\go-build259
987786=/tmp/go-build -gno-record-gcc-switches

What did you do?

I did nothing

What did you expect to see?

Was expecting program could run fluently without any crash

What did you see instead?

fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0x7ef0128 pc=0x450f79]

runtime stack:
runtime.throw(0xf94e32, 0x2a)
	C:/Go/src/runtime/panic.go:619 +0x88
runtime.sigpanic()
	C:/Go/src/runtime/signal_windows.go:161 +0x170
runtime.gentraceback(0x45c90e, 0x7eefe60, 0x0, 0xc047af9b00, 0x0, 0x88ef260, 0x40, 0x0, 0x0, 0x6, ...)
	C:/Go/src/runtime/traceback.go:280 +0x14f9
runtime.sigprof(0x45c90e, 0x7eefe60, 0x0, 0xc047af9b00, 0xc0422a6c00)
	C:/Go/src/runtime/proc.go:3707 +0x4aa
runtime.profilem(0xc0422a6c00)
	C:/Go/src/runtime/os_windows.go:839 +0xea
runtime.profileloop1(0x0, 0x0)
	C:/Go/src/runtime/os_windows.go:858 +0xe6
runtime.externalthreadhandler(0x88efb90, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	C:/Go/src/runtime/sys_windows_amd64.s:263 +0x95

goroutine 1 [chan receive]:
MyEngine/routineevent.(*RoutineEvent).Run(0x14e5c40, 0xc0430e4000)
	D:/Server/src/MyEngine/routineevent/routineevent.go:119 +0x541
MyServer_Module/module_logic.Run()
	D:/Server/src/MyServer_Module/module_logic/module_logic.go:305 +0x132
MyServer_Module/module_run.Start(0xc042210fc0, 0x1, 0x1, 0x0, 0x0)
	D:/Server/src/MyServer_Module/module_run/module_run.go:31 +0xb7
main.main()
	D:/Server/src/MyServerAll/main.go:34 +0x35f

goroutine 17 [syscall, 1212 minutes]:
os/signal.signal_recv(0x0)
	C:/Go/src/runtime/sigqueue.go:139 +0xad
os/signal.loop()
	C:/Go/src/os/signal/signal_unix.go:22 +0x29
created by os/signal.init.0
	C:/Go/src/os/signal/signal_unix.go:28 +0x48
@ALTree

This comment has been minimized.

Member

ALTree commented Apr 14, 2018

Was expecting program could run fluently without any crash

What program? There's no code in your message.

@iceooacai

This comment has been minimized.

iceooacai commented Apr 14, 2018

It's a large program , server part of an online game, too much code to attach, can't position which part cost the crash right now

@ALTree

This comment has been minimized.

Member

ALTree commented Apr 14, 2018

  1. Does it use cgo?
  2. Does compiling and then running it with the race detector enabled (-race) print any race warning?
@iceooacai

This comment has been minimized.

iceooacai commented Apr 14, 2018

1.No cgo
2.Hundreds of player online right now, can't use race detector in case of high CPU&RAM usage

@iceooacai

This comment has been minimized.

iceooacai commented Apr 14, 2018

Oh, it does use cgo, it imported a package "gopkg.in/mgo.v2" and this package use cgo

And this Error just happened randomly, several times a day or once a week are both in chance

@ALTree

This comment has been minimized.

Member

ALTree commented Apr 14, 2018

This looks like it may be caused by memory corruption, either by erroneous cgo code or by a data race in your code. You should find a way to deploy a race-enabled version of the code on some subset of your servers or something like that.

I don't see how we could investigate (or do anything about) this, without having a reproducer or anything to work on.

cc @aclements in case he has something to say about the stack-trace

@ALTree ALTree changed the title from runtime:fatal error: unexpected signal during runtime execution to runtime: fatal error: unexpected signal during runtime execution Apr 14, 2018

@iceooacai

This comment has been minimized.

iceooacai commented Apr 17, 2018

Thank you very much, I'll try to find one

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Apr 18, 2018

This looks like a profiling signal occurred on a stack with an invalid frame pointer. That should in general be impossible; not sure what happened here.

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Jul 9, 2018

I think that to fix this we will need a way to reproduce this ourselves.

@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Go1.12 Jul 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment