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

candidate_base.go segmentation violation #104

Closed
wuchihsu opened this issue Sep 25, 2019 · 3 comments
Closed

candidate_base.go segmentation violation #104

wuchihsu opened this issue Sep 25, 2019 · 3 comments

Comments

@wuchihsu
Copy link

wuchihsu commented Sep 25, 2019

Your environment.

  • Version: 0.5.7
  • OS: Ubuntu

What did you do?

I run WebRTC NewPeerConnection with Trickle ICE. It can connect successfully most of the time but rarely it panic. Is it possible to add recover in func (a *Agent) taskLoop().

What happened?

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x815301]

goroutine 2350 [running]:
github.com/pion/ice.(*candidateBase).writeTo(0xc00008e600, 0xc000082c00, 0x64, 0x80, 0xa90a20, 0xc00008e540, 0x0, 0x0, 0x0)
        /home/cch/go/src/github.com/pion/ice/candidate_base.go:162 +0x51
github.com/pion/ice.(*Agent).sendSTUN(0xc000099440, 0xc00015c870, 0xa90a20, 0xc00008e600, 0xa90a20, 0xc00008e540)
        /home/cch/go/src/github.com/pion/ice/candidatepair.go:90 +0x75
github.com/pion/ice.(*Agent).sendBindingRequest(0xc000099440, 0xc00015c870, 0xa90a20, 0xc00008e600, 0xa90a20, 0xc00008e540)
        /home/cch/go/src/github.com/pion/ice/agent.go:855 +0x2eb
github.com/pion/ice.(*controlledSelector).PingCandidate(0xc000136300, 0xa90a20, 0xc00008e600, 0xa90a20, 0xc00008e540)
        /home/cch/go/src/github.com/pion/ice/selection.go:225 +0x3e1
github.com/pion/ice.(*Agent).pingAllCandidates(0xc000099440)
        /home/cch/go/src/github.com/pion/ice/agent.go:512 +0x176
github.com/pion/ice.(*controlledSelector).ContactCandidates(0xc000136300)
        /home/cch/go/src/github.com/pion/ice/selection.go:207 +0xc4
github.com/pion/ice.(*Agent).taskLoop(0xc000099440)
        /home/cch/go/src/github.com/pion/ice/agent.go:587 +0x197
created by github.com/pion/ice.NewAgent
        /home/cch/go/src/github.com/pion/ice/agent.go:395 +0x8aa
@hugoArregui
Copy link
Member

Hi @wuchihsu, do you mind trying with latest webrtc version (ideally from master)?

@Sean-Der
Copy link
Member

Hey @wuchihsu

I believe this is the issue, and should be fixed in the latest! 358dc33

The issue is that we added candidates before we started them (so they had nil sockets when trying to write to them)

@wuchihsu
Copy link
Author

OK, thanks! @hugoArregui @Sean-Der I will try latest version.

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

No branches or pull requests

3 participants