EricssonResearch / EricssonResearch/openwebrtc

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

Open
#581 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1.8k
Forks
531
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

Research direction

Start with socket_is_reliable in udp-turn-over-tcp.c:442 and trace the send path through agent.c:5989 and conncheck.c:904/932. Reproduce the iOS idle, background, and foreground transition using the linked crash log as a guide; done means the intermittent libnice crash no longer occurs in that scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, ios
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.