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

runtime: program with deadlock doesn't fail if use -race flag #20588

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

Comments

@nizsheanez
Copy link

@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.

Copy link
Contributor

@davecheney davecheney commented Jun 6, 2017

@nizsheanez

This comment has been minimized.

Copy link
Author

@nizsheanez nizsheanez commented Jun 6, 2017

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

@mvdan

This comment has been minimized.

Copy link
Member

@mvdan mvdan commented Jun 6, 2017

Perhaps #5475?

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor 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 Program with deadlock doesn't fail if use -race flag 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.

Copy link

@bgadrian bgadrian commented Aug 28, 2017

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

@rsc rsc modified the milestones: Go1.10, Go1.11 Nov 22, 2017
@ianlancetaylor ianlancetaylor modified the milestones: Go1.11, Unplanned Jul 10, 2018
maruel added a commit to maruel/panicparse that referenced this issue Jun 2, 2019
Tested on go1.12.5.

This is a known issue. golang/go#20588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.