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

Possible deadlock in DataChannel#DetachWithDeadline() #3005

Closed
pabloFuente opened this issue Jan 15, 2025 · 0 comments
Closed

Possible deadlock in DataChannel#DetachWithDeadline() #3005

pabloFuente opened this issue Jan 15, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@pabloFuente
Copy link
Contributor

pabloFuente commented Jan 15, 2025

Your environment.

  • Version: master
  • Browser: any

What did you do?

Trying to detach a DataChannel calling DetachWithDeadline on a DataChannel that is not opened yet.

What did you expect?

DataChannel properly unlocking its mutex.

What happened?

DataChannel sync.RWMutex becomes deadlocked, blocking future calls.

I think this is a regression bug introduced in commit 835ac3b, where this line was removed: 835ac3b#diff-b8da7f3e746d55a2fe2a4295ae5fe5cf76b9512d7665201285143e25ab3bd3b9L423.

It is necessary to unlock the mutex before returing errors errDetachNotEnabled and errDetachBeforeOpened. Proposed solution in PR #3006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants