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
Open

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

nizsheanez opened this issue Jun 6, 2017 · 5 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. RaceDetector
Milestone

Comments

@nizsheanez
Copy link

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
Copy link
Contributor

davecheney commented Jun 6, 2017 via email

@nizsheanez
Copy link
Author

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

@mvdan
Copy link
Member

mvdan commented Jun 6, 2017

Perhaps #5475?

@ianlancetaylor
Copy link
Contributor

#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 the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 6, 2017
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Jun 6, 2017
@bgadrian
Copy link

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
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. RaceDetector
Projects
None yet
Development

No branches or pull requests

7 participants