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

fatal error: unexpected signal during runtime execution #41

Closed
mappu opened this issue Mar 8, 2017 · 2 comments · Fixed by #48 or aws/aws-sam-cli#112
Closed

fatal error: unexpected signal during runtime execution #41

mappu opened this issue Mar 8, 2017 · 2 comments · Fixed by #48 or aws/aws-sam-cli#112

Comments

@mappu
Copy link

mappu commented Mar 8, 2017

Hi,

My go binary listens on a named pipe. All works fine normally, but I sometimes get this panic if the named pipe receives a connection:

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

goroutine 18 [running]:
runtime.throw(0xa53f6f, 0x2a)
	C:/Go/src/runtime/panic.go:596 +0x9c fp=0xc042151e08 sp=0xc042151de8
runtime.sigpanic()
	C:/Go/src/runtime/signal_windows.go:155 +0x18b fp=0xc042151e38 sp=0xc042151e08
runtime.lock(0x5105fcc3b06b83db)
	C:/Go/src/runtime/lock_sema.go:43 +0x65 fp=0xc042151e70 sp=0xc042151e38
runtime.chansend(0x970300, 0x5105fcc3b06b8383, 0xc042151fb0, 0xc042151f01, 0x5d013a, 0xc042151f9c)
	C:/Go/src/runtime/chan.go:176 +0xba fp=0xc042151f20 sp=0xc042151e70
runtime.chansend1(0x970300, 0x5105fcc3b06b8383, 0xc042151fb0)
	C:/Go/src/runtime/chan.go:113 +0x4d fp=0xc042151f60 sp=0xc042151f20
vendor/github.com/Microsoft/go-winio.ioCompletionProcessor(0x1f8)
	src/vendor/github.com/Microsoft/go-winio/file.go:133 +0xea fp=0xc042151fd8 sp=0xc042151f60
runtime.goexit()
	C:/Go/src/runtime/asm_amd64.s:2197 +0x1 fp=0xc042151fe0 sp=0xc042151fd8
created by vendor/github.com/Microsoft/go-winio.initIo
	src/vendor/github.com/Microsoft/go-winio/file.go:57 +0x87

Other google results for this error were submitted directly to golang/go, so i don't know if this is an issue with Golang's runtime or an issue with this library.

It seems to happen randomly, based on synchronisation state of other parts of the program.

go version go1.8 windows/amd64

EDIT: Simplified report using the latest information.

@mappu
Copy link
Author

mappu commented Mar 9, 2017

Hi,

I have a minimal test case that reproduces this issue in maybe 1 of 10 executions.

The program creates a named pipe to listen on; does some background work; and then connects to the named pipe.

It also involves one other third-party CGO library that seems to exacerbate the issue, but, this third-party library does not appear anywhere in the stack traces.

Source for reproducer:

Go-get installer:

  • go get github.com/mappu/winio-zstd-panic/src/winio-zstd-panic

Example full stack trace:

@mappu
Copy link
Author

mappu commented Mar 14, 2017

After some research in ticket golang/go#19468 (comment) , i think this library has not been updated for the stricter runtime.SetFinalizer rules in Go 1.8. This is causing the library to use uninitialised memory.

lyondhill added a commit to nanobox-io/nanobox that referenced this issue Mar 24, 2017
sanathkr pushed a commit to aws/aws-sam-cli that referenced this issue Sep 13, 2017
* Removed debug file

* Formatted with gofmt after files were modified via GitHub web interface

* Updated go-winio dependency to latest version.

This update includes fixes from this PR:
microsoft/go-winio#48

That fixes:
microsoft/go-winio#41

And should fix #111.
whilei added a commit to whilei/go-ethereum that referenced this issue Nov 6, 2017
…227fbf57ac8a6fee70f69a

problem: fatal error: unexpected signal during runtime execution
when running 'monitor' command on win 7 sp1

note: aws/aws-sam-cli#112
note: microsoft/go-winio#41
note: golang/go#19468 (comment) [not go issue]

solution:
update microsoft/go-winio vendor dependency

Rel ethereumproject#392
whilei added a commit to ethereumproject/go-ethereum that referenced this issue Nov 8, 2017
…227fbf57ac8a6fee70f69a

problem: fatal error: unexpected signal during runtime execution
when running 'monitor' command on win 7 sp1

note: aws/aws-sam-cli#112
note: microsoft/go-winio#41
note: golang/go#19468 (comment) [not go issue]

solution:
update microsoft/go-winio vendor dependency

Rel #392

----

manually remove vendored winio tests

remove dirs from vendored go-winio

Revert "remove dirs from vendored go-winio"

This reverts commit 67c9236.

remove subdir go _test files from manually vendored winio package
whilei added a commit to ethereumproject/go-ethereum that referenced this issue Nov 8, 2017
…227fbf57ac8a6fee70f69a

problem: fatal error: unexpected signal during runtime execution
when running 'monitor' command on win 7 sp1

note: aws/aws-sam-cli#112
note: microsoft/go-winio#41
note: golang/go#19468 (comment) [not go issue]

solution:
update microsoft/go-winio vendor dependency

Rel #392

----
manually remove vendored winio tests
----
remove dirs from vendored go-winio
----
Revert "remove dirs from vendored go-winio"

This reverts commit 67c9236.
----
remove subdir go _test files from manually vendored winio package
----
rm -rf archive/tar/testdata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant