freeswitch / sofia-sip

Sofia-SIP is an open-source SIP User-Agent library, compliant with the IETF RFC3261 specification.
GNU Lesser General Public License v2.1
254 stars 173 forks source link

Core dump on `ntatag_ua` #229

Closed vsedyshev-intermedia closed 3 months ago

vsedyshev-intermedia commented 9 months ago

Could you please suggest me where root cause of issue? I create nta->agent and start legs with calls ... Some time receive core dump with next stacktrace:

(gdb) bt
#0  0x000055555555eda0 in ntatag_ua ()
#1  0x00007ffff7ed43df in ?? () from /lib/libsofia-sip-ua.so.0
#2  0x00007ffff7f44715 in tport_deliver () from /lib/libsofia-sip-ua.so.0
#3  0x00007ffff7f449de in ?? () from /lib/libsofia-sip-ua.so.0
#4  0x00007ffff7f45239 in tport_recv_event () from /lib/libsofia-sip-ua.so.0
#5  0x00007ffff7f479ab in ?? () from /lib/libsofia-sip-ua.so.0
#6  0x00007ffff7f3323a in ?? () from /lib/libsofia-sip-ua.so.0
#7  0x00007ffff7f3103c in su_base_port_run () from /lib/libsofia-sip-ua.so.0
#8  0x0000555555557a62 in main () at ../src/main.c:339
vsedyshev-intermedia commented 9 months ago

When I disable NTATAG_UA(1) on agent I receive next one traceback:

(gdb) bt
#0  0x000055555555ec40 in ntatag_stateless ()
#1  0x00007ffff7f44715 in tport_deliver () from /lib/libsofia-sip-ua.so.0
#2  0x00007ffff7f449de in ?? () from /lib/libsofia-sip-ua.so.0
#3  0x00007ffff7f45239 in tport_recv_event () from /lib/libsofia-sip-ua.so.0
#4  0x00007ffff7f479ab in ?? () from /lib/libsofia-sip-ua.so.0
#5  0x00007ffff7f3323a in ?? () from /lib/libsofia-sip-ua.so.0
#6  0x00007ffff7f3103c in su_base_port_run () from /lib/libsofia-sip-ua.so.0
#7  0x0000555555557a58 in main () at ../src/main.c:339
vsedyshev-intermedia commented 9 months ago

Look like agent pass NTATAG_STATELESS(1) in agent creation tags and it lead to this tracebacks... Since NTA start wortking with STATELESS mode I assume that calling stateful lead to error result instead coredump...