EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

[iOS]when the app idle enter background then get back will crashed(socket_is_reliable from libnice) sometimes. #581

Open xelven opened 8 years ago

xelven commented 8 years ago

On iOS Native,

cerbero version 2015/12/4
openssl: Bump to 1.0.2e
git:4e8ec2994bb3298db37c3f84356260e86ea3e07a

when the app idle for a while, then enter background, and get back later it going crash sometimes, not 100%, but there is height chance to crash from libnice.

Thread 2 name:  owr_main_loop
Thread 2 Crashed:
0   TestWebRTC                          0x00000001005e809c socket_is_reliable (udp-turn-over-tcp.c:442)
1   TestWebRTC                          0x00000001005e57c4 agent_socket_send (agent.c:5989)
2   TestWebRTC                          0x00000001005d9ed4 priv_turn_allocate_refresh_tick_unlocked (conncheck.c:904)
3   TestWebRTC                          0x00000001005d9d58 priv_turn_allocate_refresh_tick (conncheck.c:932)
4   TestWebRTC                          0x00000001003e7448 g_timeout_dispatch (gmain.c:4714)
5   TestWebRTC                          0x00000001003ea39c g_main_context_dispatch (gmain.c:3242)
6   TestWebRTC                          0x00000001003ea6dc g_main_context_iterate (gmain.c:3979)
7   TestWebRTC                          0x00000001003ea9d0 g_main_loop_run (gmain.c:4170)
8   TestWebRTC                          0x0000000100651b2c owr_run (owr.c:360)
9   TestWebRTC                          0x0000000100651c68 owr_run_thread_func (owr.c:343)
10  TestWebRTC                          0x00000001003d4b48 g_thread_proxy (gthread.c:778)
11  libsystem_pthread.dylib         0x0000000181a9fb28 _pthread_body + 156
12  libsystem_pthread.dylib         0x0000000181a9fa8c _pthread_body + 0
13  libsystem_pthread.dylib         0x0000000181a9d028 thread_start + 4

full log ref: https://gist.github.com/xelven/3defbf24e3aa02a1d86d

xelven commented 8 years ago

probably because of this one: https://phabricator.freedesktop.org/T3452 I going build my own libnice to try this

xelven commented 8 years ago

after I build own libnice with OWR, seems this crashed not happened anymore now.

stefanalund commented 8 years ago

@xelven that is good news! Do you know when this fix will be part of an official release of libnice?

xelven commented 8 years ago

I would like make patch for this few days later if you want, because the latest libnice still have this issue.

alberto-canabal commented 7 years ago

@xelven Hi, we are banging our heads against that same crash...did you make a patch for it?, because we could surely use it! Thanks