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

Janus crash with VideoRoom streams summary [1.x] #3249

Closed
zevarito opened this issue Aug 3, 2023 · 9 comments
Closed

Janus crash with VideoRoom streams summary [1.x] #3249

zevarito opened this issue Aug 3, 2023 · 9 comments
Labels
multistream Related to Janus 1.x

Comments

@zevarito
Copy link
Contributor

zevarito commented Aug 3, 2023

What version of Janus is this happening on?
It does happen in latest e1c7704 but it is happening since a few months now.

Have you tested a more recent version of Janus too?
Yes

Was this working before?
This same exception and a similar one (same function) I think is around since May at least.

Is there a gdb or libasan trace of the issue?

#1  0x00007f253827a5b8 in janus_videoroom_subscriber_streams_summary (subscriber=subscriber@entry=0x7f25086416e0, legacy=legacy@entry=0, event=event@entry=0x0)
    at plugins/janus_videoroom.c:3117
        stream = 0x7f250800e050
        ps = <optimized out>
        m = 0x7f2528591a70
        media = 0x7f2528478c10
        temp = 0x7f252803eaa0
        __FUNCTION__ = "janus_videoroom_subscriber_streams_summary"

Additional context
I've also seen a related exception that I don't have the backtrace at hand which fails in the same function but a little bit earlier and the core dump generated says janus instead of hloop.
My guess is that it is some sort of race condition when that list is generated and a publisher leaves the room at the same time.
It crash approximately after 2 weeks on every server, but I have the sense that latest build might also crash early, updated recently will let you know.

Let me know if you need me to provide any extra info and thank you very much for looking into this issue!

@zevarito zevarito added the multistream Related to Janus 1.x label Aug 3, 2023
@lminiero
Copy link
Member

lminiero commented Aug 4, 2023

Please test with #3247 too, since it addresses a couple of race conditions in the VideoRoom.

@zevarito
Copy link
Contributor Author

zevarito commented Aug 4, 2023

Thanks @lminiero will do.

@zevarito
Copy link
Contributor Author

I know you guys are on vacation right now, I am just updating the issue to keep you in the loop when you got back.

I've updated a few servers with the patch mentioned above but one of them only last 2 days up, it did not crash in the same way as previous crashes though, but it did last much less than previous revisions. I am attaching full BT let me know if you need something else, thank you!

#0  0x00007f91b022d843 in janus_videoroom_handler (data=<optimized out>) at plugins/janus_videoroom.c:11609
        iter = {dummy1 = 0x7f912c92e2a0, dummy2 = 0x0, dummy3 = 0x0, dummy4 = 8, dummy5 = 0, dummy6 = 0xd}
        value = 0x0
        audiocodec = <optimized out>
        vp9_profile = <optimized out>
        temp = <optimized out>
        jsep = <optimized out>
        videoroom = <optimized out>
        error_str = '\000' <repeats 344 times>...
        start = <optimized out>
        count = <optimized out>
        answer = <optimized out>
        h264_profile = <optimized out> 

https://gist.github.com/zevarito/d71a35b43d1e699f2791784a952dad2e

@tmatth
Copy link
Contributor

tmatth commented Aug 10, 2023

I've updated a few servers with the patch mentioned above but one of them only last 2 days up, it did not crash in the same way as previous crashes though, but it did last much less than previous revisions. I am attaching full BT let me know if you need something else, thank you!

Thanks for the backtrace, can you try with #3259 ?

@atoppi
Copy link
Member

atoppi commented Aug 21, 2023

@zevarito any update? Did you try the proposed patch?

@zevarito
Copy link
Contributor Author

@atoppi no servers have crashed so far with this patch, the longest running is about 10 days now, however previous releases took 3 months some times to crash so deploying carefully.
As in performance the patch doesn't seem to present any regressions.

@zevarito
Copy link
Contributor Author

@atoppi just in case, I was talking about #3259, unfortunately #3247 keep crashing as mentioned above.

@tmatth
Copy link
Contributor

tmatth commented Aug 21, 2023

@atoppi just in case, I was talking about #3259, unfortunately #3247 keep crashing as mentioned above.

Thanks @zevarito I've marked #3259 as ready for review in that case.

@lminiero
Copy link
Member

Closing as I merged @tmatth 's patch.

spscream pushed a commit to spscream/janus-gateway that referenced this issue Oct 6, 2023
spscream pushed a commit to spscream/janus-gateway that referenced this issue Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x
Projects
None yet
Development

No branches or pull requests

4 participants