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
sync: A deadlock occurs when call the Wait() of a Cond associated with the RLocker of a RWMutex after call the Lock() of the RWMutex #7858
Labels
Milestone
Comments
Hold on, Ian. Mutex detects Unlock w/o Lock and panics. I think we can do the same for RWMutex. That's not to say that we can adequately react on all incorrect usages. But at least we can do some best-effort detection. Labels changed: added release-go1.4, repo-main. Owner changed to @dvyukov. Status changed to Accepted. |
I've prepared https://golang.org/cl/92720045 for Go1.4. With that patch, the program crashes with: panic: sync: RUnlock of unlocked RWMutex goroutine 20 [running]: sync.(*RWMutex).RUnlock(0x554850) src/pkg/sync/rwmutex.go:57 +0x103 sync.(*rlocker).Unlock(0x554850) src/pkg/sync/rwmutex.go:136 +0x27 main.func·001(0x0) test.go:33 +0x26d |
Issue #7877 has been merged into this issue. |
CL https://golang.org/cl/92720045 mentions this issue. |
This issue was closed by revision 22d46d5. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
Fixes golang#7858. LGTM=ruiu R=ruiu CC=golang-codereviews https://golang.org/cl/92720045
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: