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

panic: send on closed channel in github.com/pion/ice.(*Agent).updateConnectionState #182

Closed
anacrolix opened this issue May 3, 2020 · 3 comments · Fixed by #183
Closed

Comments

@anacrolix
Copy link

panic: send on closed channel

goroutine 2270100 [running]:
github.com/pion/ice.(*Agent).updateConnectionState(...)
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:642
github.com/pion/ice.(*controlledSelector).ContactCandidates(0xc001e74ba0)
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/selection.go:214 +0x21c
github.com/pion/ice.(*Agent).startConnectivityChecks.func1.1.1.1(0xc000f2e000)
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:615 +0x3a
github.com/pion/ice.(*Agent).run(0xc000f2e000, 0xe4d648, 0x0, 0x0)
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:194 +0xfd
github.com/pion/ice.(*Agent).startConnectivityChecks.func1.1.1()
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:614 +0x3f
github.com/pion/ice.(*Agent).startConnectivityChecks.func1.1(0xc000f2e000)
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:626 +0x110
created by github.com/pion/ice.(*Agent).startConnectivityChecks.func1
        /root/go/pkg/mod/github.com/pion/ice@v0.7.13/agent.go:612 +0x186

I'm running a very active instance of https://github.com/anacrolix/confluence, which makes frequent and implicit use of several webtorrent trackers. There's probably 100s or 1000s of webrtc PeerConnections being opened and closed, so unless I'm using the API incorrectly, this is probably a very elusive race condition in pion code somewhere.

@at-wat
Copy link
Member

at-wat commented May 3, 2020

seems caused by ContactCandidates() called after Agent.Close()

@at-wat
Copy link
Member

at-wat commented May 3, 2020

@anacrolix I think #183 will fix this.

anacrolix added a commit to anacrolix/torrent that referenced this issue May 3, 2020
@anacrolix
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants