Closed mp16 closed 4 years ago
Can you share an IP that causes that error?
Edit: sorry, just saw you shared one above, thanks!
Should be fixed now.
Sorry, it is not ok, I just got the error again with the version 02399ce75c8b47a0bdc8b65359652b4f67a57f13.
(process:25210): libnice-CRITICAL **: file address.c: line 147 (nice_address_set_port): should not be reached
(gdb) bt
#0 0x00007ffff746cafb in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007ffff746cc6f in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x000000000046bf5d in janus_sdp_parse_candidate (ice_stream=ice_stream@entry=0x7ffdf407ed90,
candidate=candidate@entry=0x7ffeea7eb670 "remote2 1 udp 1853827327 2a01:cb05:87e2:5c00:b9e0:b4ac:66d8:2dc6 49410 typ prflx raddr 2a01:cb05:87", trickle=trickle@entry=1) at sdp.c:799
#3 0x0000000000423769 in janus_ice_cb_new_remote_candidate (agent=<optimized out>, candidate=0x7ffe7c004000, ice=0x7fffd402f680) at ice.c:2148
#4 0x00007ffff773cfa5 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5 0x00007ffff774efc1 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6 0x00007ffff7756d41 in g_signal_emitv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#7 0x00007ffff798d6ef in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
#8 0x00007ffff79964c8 in ?? () from /usr/lib/x86_64-linux-gnu/libnice.so.10
#9 0x00007ffff5188911 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#10 0x00007ffff746604a in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007ffff74663f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff7466712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x000000000042e837 in janus_ice_handle_thread (data=0x7fffd402f680) at ice.c:1118
#14 0x00007ffff748cc55 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#15 0x00007ffff5da26ba in start_thread (arg=0x7ffeea7fc700) at pthread_create.c:333
#16 0x00007ffff5ad841d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
See https://pastebin.com/PPymV0yM for full backtrace.
I think that nice_address_set_port
must be called only if added
is true
.
Thank you.
Hi @mp16,
to get a better stack trace please compile libnice
(at least v0.1.16) with the same debugging flags you used for Janus.
Hello,
Okay, I will do that next week.
I have crafted an invalid ICE candidate (IP "99192.168.3.12"):
There is several error messages rated as "critical" by libnice.
The error comes from the result of
nice_address_set_from_string
that is not checked. https://github.com/meetecho/janus-gateway/blob/2d3c53e8a874c5717126af7319c19c64ae3854a0/sdp.c#L787 https://github.com/meetecho/janus-gateway/blob/2d3c53e8a874c5717126af7319c19c64ae3854a0/sdp.c#L792If
nice_address_set_from_string
fails (the IP is invalid), I suggest to have a specific log message (level LOG_ERR maybe).