[libnice] Assert due to wrong transition

Fabrice Bellet fabrice at bellet.info
Fri Mar 23 16:32:49 UTC 2018


Hi Igor,

On 03/22/18 at 10:12am, Igor Khomenko wrote:
> Hi Olivier, Lorenzo
> 
> I've got all needed logs upon crash, including libnice logs
> 
> Stacktrace again (the same assert):
> https://www.dropbox.com/s/jlqtzu0neqlqc8o/janus_libnice_assert_stacktrace.crash?dl=0
> 
> logs:
> https://www.dropbox.com/s/hq1nkeh6w25jsk3/janus.log?dl=0
> 
> look at the end of janus.log
> Line N19365 - "(process:17784): libnice-DEBUG: Agent 0x7f6aa000dcf0 :
> stream 1 component 1 STATE-CHANGE gathering -> connected."
> this is when crash happened, then autorestart of Janus occurred after some
> time.
> 
> So all the lines before N19365 are what we are looking for from my
> understanding,
> e.g. line N19330 is where assertion failed
> 
> Please let me know if you need anything else here to identify the root
> cause and find a proper solution

According to your logs, I think the cause of the problem is that no pair
is formed by the gathering stage: we have two local IPv4 candidates, and
we receive a remote IPv6 candidate. A new pair is formed later when we
start receiving incoming STUN requests. The state of the agent should
change from GATHERING to CONNECTING there, line 19285 in your janus.log
file:

(process:17784): libnice-DEBUG: Agent 0x7f6aa000dcf0 : Adding a triggered check to conn.check list (local=0x7f6aa00239f0).
(process:17784): libnice-DEBUG: Agent 0x7f6aa000dcf0 : creating new pair 0x7f6aa001a190 state 1

Does this patch help in your case : https://phabricator.freedesktop.org/D1889
And more precisely, the chunk around line 2967-2968 in conncheck.c that replaces
priv_add_new_check_pair() by priv_conn_check_add_for_candidate_pair_matched()
at the end of function priv_schedule_triggered_check()  ?

Best wishes,
-- 
fabrice


More information about the nice mailing list