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

ErizoJs crash #793

Open
shahrukh330 opened this issue Mar 8, 2017 · 5 comments · Fixed by #804
Open

ErizoJs crash #793

shahrukh330 opened this issue Mar 8, 2017 · 5 comments · Fixed by #804

Comments

@shahrukh330
Copy link

Hi,

ErizoJs crashes when more then 12 participants are in the room and someone tries to disconnect. I tried debugging on gdb and it shows segmentation fault at memcpy or sometimes at MediaSink::deliverAudioData.

I took a new checkout of licode.

I have been digging in to source and in OneToManyProcessor.cpp
` int OneToManyProcessor::deliverAudioData_(std::shared_ptr audio_packet) {
if (audio_packet->length <= 0)
return 0;

boost::unique_lock<boost::mutex> lock(monitor_mutex_);
if (subscribers.empty())
  return 0;

std::map<std::string, std::shared_ptr<MediaSink>>::iterator it;
for (it = subscribers.begin(); it != subscribers.end(); ++it) {
  (*it).second->deliverAudioData(audio_packet);
}

return 0;

}
`
shouldnt there be a nullptr check before calling deliverAudioData() like there is in deliverVideoData()?
Guys its just a wild guess didnt solve the crash though.

@jcague
Copy link
Contributor

jcague commented Mar 16, 2017

@shahrukh330 can you try with PR #804 please? I think it could solve this issue.

@jcague jcague reopened this Mar 16, 2017
@shahrukh330
Copy link
Author

@jcague Thankyou i'll try it today. I temporarily fixed it from crashing by using a dirty hack ( copying code in copying code in destructor of WebRtcConnection.cpp in close method which was empty.) Your solution looks more promising though :)

@shahrukh330
Copy link
Author

@jcague i tried PR #804. It didnt fix the problem. it is still crashing in MediaSink::deliverAudioData and deliverVideoData. I dug around the issue during the past few days and i think the problem is that the oneToManyProcessor is closed before closing the webrtc connection which recieves data and crashes while passing it over to sink.

@jcague
Copy link
Contributor

jcague commented Mar 27, 2017

That's exactly the issue this PR aims to fix. I'll double check again if there are more ways to close it. I think the PR should fix some weird cases anyway so I'll merge it in the mean time.

@jcague
Copy link
Contributor

jcague commented Apr 4, 2017

@shahrukh330 we're still investigating this issue since we're seeing it from time to time but we can't reproduce it locally. Could you try PR #834 please?

@jcague jcague reopened this Apr 4, 2017
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