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

Deadlock in VideoRoom plugin on malformed "joinandconfigure" request #2780

Closed
shripchenko opened this issue Sep 28, 2021 · 1 comment
Closed

Comments

@shripchenko
Copy link
Contributor

shripchenko commented Sep 28, 2021

Hi everyone.
In d7c9ef0 commit few blocks of code was added to janus_videoroom.c
if(audiocodec && json_string_value(json_object_get(msg->jsep, "sdp")) != NULL) { ...... }
... for audiocodec and videocodec` (please see the commit for exact diff).

In goto error subsection of this code you only janus_refcount_decrease(&publisher->ref);, while in fact there should be additional
janus_mutex_unlock(&publisher->room->mutex); janus_refcount_decrease(&publisher->room->ref);

This provoke deadlock in VideoRoom plugin in such error conditions.

The same apply to if(videocodec ... section few lines below.

@atoppi atoppi closed this as completed in e316c83 Sep 29, 2021
@atoppi
Copy link
Member

atoppi commented Sep 29, 2021

Thanks @shripchenko, it should be fixed now.

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

No branches or pull requests

2 participants