Skip to content

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

Open
@nizsheanez

Description

@nizsheanez

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.RaceDetectorcompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions