Skip to content

runtime: deadlock detection don't work when cgo is used #5475

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

Closed
chai2010 opened this issue May 15, 2013 · 6 comments
Closed

runtime: deadlock detection don't work when cgo is used #5475

chai2010 opened this issue May 15, 2013 · 6 comments

Comments

@chai2010
Copy link
Contributor

C:\>go version
go version go1.1 windows/amd64

C:\>go run a.go
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
main.main()
        C:/a.go:4 +0x47
exit status 2

C:\>go run -race a.go
[CTRL+C] exit status 2

// a.go
package main

func main() {
    <-make(chan bool)
}
@minux
Copy link
Member

minux commented May 15, 2013

Comment 1:

the race detector will always wait until all (user) goroutines
to finish before exit the program to catch data races involving
goroutine exits.

@minux
Copy link
Member

minux commented May 15, 2013

Comment 2:

Issue #5476 has been merged into this issue.

@minux
Copy link
Member

minux commented May 15, 2013

Comment 3:

Issue #5477 has been merged into this issue.

@dvyukov
Copy link
Member

dvyukov commented May 15, 2013

Comment 4:

>the race detector will always wait until all (user) goroutines to finish before exit
I am not sure this is true.

Labels changed: added racedetector.

Owner changed to @dvyukov.

@minux
Copy link
Member

minux commented May 15, 2013

Comment 5:

i was confusing this issue with the wait-1s-before-exit issue.
sorry for the misleading info.

Labels changed: added priority-later, removed priority-triage.

Status changed to Started.

@dvyukov
Copy link
Member

dvyukov commented May 22, 2013

Comment 6:

This issue was closed by revision 34c67eb.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants