Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

darwin: panic during event loop under race detector #70

Open
cookieo9 opened this issue Mar 28, 2015 · 3 comments
Open

darwin: panic during event loop under race detector #70

cookieo9 opened this issue Mar 28, 2015 · 3 comments

Comments

@cookieo9
Copy link

While discovering #69, I found that in a binary build for race detection, the program will crash upon processing the first event that fires (eg: mouse move).

For example, running the polygon demo and moving the mouse gives the following panic:

fatal error: unexpected signal during runtime execution
[signal 0xb code=0x1 addr=0x0 pc=0x4005ade]

runtime stack:
runtime.throw(0x454aa10, 0x2a)
    $GOPATH/go/src/runtime/panic.go:543 +0xa0
runtime.sigpanic()
    $GOPATH/go/src/runtime/sigpanic_unix.go:12 +0x62

goroutine 1 [syscall, locked to thread]:
runtime.cgocall_errno(0x4034c90, 0xc208171ec0, 0x0)
    $GOPATH/go/src/runtime/cgocall.go:125 +0xd0 fp=0xc208171ea0 sp=0xc208171e78
github.com/go-gl/glfw/v3.1/glfw._Cfunc_glfwWaitEvents()
    ??:0 +0x5c fp=0xc208171ec0 sp=0xc208171ea0
github.com/go-gl/glfw/v3.1/glfw.WaitEvents()
    $GOPATH/src/github.com/go-gl/glfw/v3.1/glfw/window.go:642 +0x2d fp=0xc208171ed0 sp=0xc208171ec0
github.com/google/gxui/drivers/gl.(*driver).run(0xc20800e100)
    $GOPATH/src/github.com/google/gxui/drivers/gl/driver.go:88 +0xa2 fp=0xc208171f10 sp=0xc208171ed0
github.com/google/gxui/drivers/gl.StartDriver(0x45c3040)
    $GOPATH/src/github.com/google/gxui/drivers/gl/driver.go:45 +0x302 fp=0xc208171f88 sp=0xc208171f10
main.main()
    $GOPATH/src/github.com/google/gxui/samples/polygon/main.go:83 +0x38 fp=0xc208171f98 sp=0xc208171f88
runtime.main()
    $GOPATH/go/src/runtime/proc.go:88 +0x1cb fp=0xc208171fe0 sp=0xc208171f98
runtime.goexit()
    $GOPATH/go/src/runtime/asm_amd64.s:2466 +0x1 fp=0xc208171fe8 sp=0xc208171fe0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    $GOPATH/go/src/runtime/asm_amd64.s:2466 +0x1

goroutine 5 [chan receive]:
github.com/google/gxui.EventLoop(0x5604740, 0xc20800e100)
    $GOPATH/src/github.com/google/gxui/event_loop.go:8 +0x73
main.appMain(0x5604740, 0xc20800e100)
    $GOPATH/src/github.com/google/gxui/samples/polygon/main.go:79 +0x65a
created by github.com/google/gxui/drivers/gl.StartDriver
    $GOPATH/src/github.com/google/gxui/drivers/gl/driver.go:44 +0x2f4
ben-clayton added a commit that referenced this issue Mar 28, 2015
Fix racyness with driver internals.
Rework the main event queue to be fix shutdown racyness.

Related issues: #48, #59, #69, #70
@ben-clayton
Copy link
Contributor

This and #70 are odd. I do not see them, and I have no idea what's causing them.
Do you mind checking to see if this still occurs with 5faef7f?

@cookieo9
Copy link
Author

I will. Also I'm using Go at tip, I'll try with the 1.4.2 compiler I use to build it as well.

@cookieo9
Copy link
Author

Still happens at tip (commit 10848b9), but using go 1.4.2 doesn't cause a problem on darwin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants