sippy / rtpproxy

The RTPproxy is a high-performance software proxy for RTP streams that can work together with Sippy B2BUA, Kamailio, OpenSIPS and SER.
http://rtpproxy.org
BSD 2-Clause "Simplified" License
404 stars 114 forks source link

SIGSEGV in rtpp_wi_free #135

Closed lubosures closed 1 year ago

lubosures commented 1 year ago

Was using rtpproxy for months, building from master branch. Successfully running master branch built on Oct 17, 2022. Built a new version on Feb 9,2023. The code barely survives few calls and segfaults with this backtrace:

(gdb) bt
#0  rtpp_wi_free (wis=0x7f289800b350) at rtpp_wi_pkt.c:115
#1  0x0000000000423dbc in rtpp_refcnt_decref (pub=0x7f289800b438) at rtpp_refcnt.c:239
#2  rtpp_refcnt_decref (pub=0x7f289800b438) at rtpp_refcnt.c:194
#3  0x000000000041474a in rtpp_anetio_sthread (args=0x5d1258) at rtpp_netio_async.c:158
#4  0x00007f28a24bbea7 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007f28a2287a2f in clone () from /lib/x86_64-linux-gnu/libc.so.6

The crashes are frequent and consistent, the stack looks the same all the time.

sobomax commented 1 year ago

Lubos, thank you for your report. Looks like one of the members has not been initialized properly. Please check the revision 9169c94b or later and see if it helps.

lubosures commented 1 year ago

Everything works like a charm again. Kudos for quick investigation and resolution of the problem.