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: program with deadlock doesn't fail if use -race flag #20588

Open
nizsheanez opened this Issue Jun 6, 2017 · 5 comments

Comments

Projects
None yet
6 participants
@nizsheanez

nizsheanez commented Jun 6, 2017

Go version: 1.8.3
OS: Mac

Program:

package main

func main() {
	ch1 := make(chan int)
	<-ch1
}

if run with go run deadlock.go see: fatal error: all goroutines are asleep - deadlock!

if run with go run -race deadlock.go program never finish

Is it expected behavior?
Does it make sense to improve deadlock detector to be aware about race detector?

@davecheney

This comment has been minimized.

Contributor

davecheney commented Jun 6, 2017

@nizsheanez

This comment has been minimized.

nizsheanez commented Jun 6, 2017

Sorry, i didn't find it. Let's close then.

@mvdan

This comment has been minimized.

Member

mvdan commented Jun 6, 2017

Perhaps #5475?

@ianlancetaylor

This comment has been minimized.

Contributor

ianlancetaylor commented Jun 6, 2017

#5475 is slightly different, and is closed anyhow.

I also think this was reported before, but I can't find the issue, so until it turns up lets make this one the issue for the problem.

@ianlancetaylor ianlancetaylor changed the title from Program with deadlock doesn't fail if use -race flag to runtime: program with deadlock doesn't fail if use -race flag Jun 6, 2017

@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Jun 6, 2017

@bgadrian

This comment has been minimized.

bgadrian commented Aug 28, 2017

I think #5477 is what you were looking for, was FrozenDueToAge (and it's duplicate #5476)

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