-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Core dump removing old SIP session #377
Comments
What commit of Janus is this? At line 2057 I see something different. |
I did a pull and ran my test again. I was looking at plugins/janus_sip.c:1514, which made me think it was accessing invalid memory at this point? So the way I can make it happen from the client side is to:catch the onerror event in javascript after a failed sip REGISTER, then invoke Janus.destroy() followed by Janus.init() and then try to register again. I've worked around it by not doing the destroy()/init() combo, but probably that shouldn't cause the server to fail. (gdb) bt full |
A destroy+init means the handle is removed as well and you're creating another one, which means the resources from the previous one are in the process of being get rid of. Not sure if this might cause a race condition of some kind when you try to register the same user immediately thereafter. But I still can't match the lines of your dump with the code we have. It talks about something happening in https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_sip.c#L1737 There's a mention of something at line 2057 in https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_sip.c#L2421 It looks like you're still using an older (don't know how older, different anyway) version of the plugin. Did you do a make clean + make + make install after the pull? |
You are correct my make install was directed at a different location. I fix and reopen if this is still an issue. |
It looks like there may be a reference leak in old_sessions in the sip plugin.
In my logs I see:
Checking 1 old SIP sessions...
Checking 1 old SIP sessions...
Cleaning up handle 2390786515...
[2390786515] WebRTC resources freed
[2390786515] Handle and related resources freed
Checking 1 old SIP sessions...
Checking 1 old SIP sessions...
Checking 1 old SIP sessions...
Checking 1 old SIP sessions...
Freeing old SIP session
then later, when a second session is unsuccessful in registering with a sip server I see:
Checking 2 old SIP sessions...
[nua_r_shutdown]: 101 Shutdown in progress
[janus.c:janus_cleanup_session:305] Cleaning up session 3918755889...
Destroying session 3918755889
Checking 2 old SIP sessions...
Checking 2 old SIP sessions...
[nua_r_shutdown]: 101 Shutdown in progress
Cleaning up handle 313132925...
[313132925] WebRTC resources freed
[313132925] Handle and related resources freed
Cleaning up handle 3017998674...
[3017998674] WebRTC resources freed
[3017998674] Handle and related resources freed
Checking 2 old SIP sessions...
Checking 2 old SIP sessions...
[nua_r_shutdown]: 101 Shutdown in progress
Checking 2 old SIP sessions...
Freeing old SIP session
Freeing old SIP session
[nua_r_shutdown]: 101 Shutdown in progress
[nua_r_shutdown]: 101 Shutdown in progress
[nua_r_shutdown]: 101 Shutdown in progress
[nua_r_shutdown]: 101 Shutdown in progress
[nua_r_shutdown]: 200 Shutdown successful
Segmentation fault (core dumped)
This happens when the second session error occurs (there are only 2 sessions).
The backtrace is:
(gdb) bt full
#0 0x0000000100000019 in ?? ()
No symbol table info available.
#1 0x00007f69541937a6 in janus_sip_sofia_callback (event=, status=200, phrase=0x7f690c0028f0 "Shutdown successful",
#2 0x00007f699604df65 in ?? () from /usr/lib/libsofia-sip-ua.so.0
No symbol table info available.
#3 0x00007f699609f302 in ?? () from /usr/lib/libsofia-sip-ua.so.0
No symbol table info available.
#4 0x00007f699609f8f9 in su_base_port_run () from /usr/lib/libsofia-sip-ua.so.0
No symbol table info available.
#5 0x00007f695418910a in janus_sip_sofia_thread (user_data=0x7f6918001af0) at plugins/janus_sip.c:2057
#6 0x00007f6996dfaf05 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#7 0x00007f69950b2182 in start_thread (arg=0x7f69317fa700) at pthread_create.c:312
---Type to continue, or q to quit---
pagesize_m1 =
sp =
freesize =
PRETTY_FUNCTION = "start_thread"
#8 0x00007f6994ddf47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.
It seems like the error is in json_is_boolean()?
The text was updated successfully, but these errors were encountered: