Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

Go

Compiler

go 1.9

Options

stacktraces.go
go-deadlock.go
goid.go

$ go build -o prog
first Rlock succeeded
about to Lock
trying to Rlock again
POTENTIAL DEADLOCK: Duplicate locking, saw callers this locks in one goroutine:
current goroutine 1 lock &{{{1 0} 0 0 -1073741823 1}} 
all callers to this lock in the goroutine
prog.go:14 main.main.func1 { mu.RLock() } <<<<<
prog.go:45 main.main { rlockTwice() }
/opt/wandbox/go-1.9/src/runtime/proc.go:185 runtime.main { fn() }

prog.go:19 main.main.func1 { mu.RLock() } <<<<<
prog.go:45 main.main { rlockTwice() }
/opt/wandbox/go-1.9/src/runtime/proc.go:185 runtime.main { fn() }


Other goroutines holding locks:


Exit Code:
2