-
Notifications
You must be signed in to change notification settings - Fork 632
Description
OpenSIPS version you are running
version: opensips 3.6.2 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, HP_MALLOC, F_PARALLEL_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 994bcd690
main.c compiled on with gcc 13
Crash Core Dump
https://drive.google.com/file/d/1wMwJFxuALsp-EBiUHtGrPDsZ9t2sP_TR/view?usp=sharing
Describe the traffic that generated the bug
During initial INVITE processing, we make an async rest_post call, to lookup if the caller selected a destination on our website. In the async resume, we check the result, and if the caller did not yet make a selection on our website, we try to use b2bua to bridge first with a freeswitch, to allow the caller to make a DTMF based choice, freeswitch then sends a REFER which is handled by b2b logic.
To Reproduce
Steps to reproduce the behavior:
Example:
- Start OpenSIPS
- Initial INVITE -> async rest_post -> b2b_init_request in resume route
- async (rest_post(.... resume_INBOUND)
- b2b_server_new("caller", "sip:b2b@{{ local_hostname }}");
- b2b_client_new("freeswitch_dtmf", "sip:tcs_dtmf@...");
- b2b_init_request("dtmf"); <--- CRASH
Relevant System Logs
2026-01-13T07:35:31+00:00 WARNING:[[email protected]] route[resume_INBOUND] ...
2026-01-13T07:35:31+00:00 INFO:[[email protected]] Calling b2b_server_new("caller", "sip:b2b@tcs_opensips.tcs").
2026-01-13T07:35:31+00:00 INFO:[[email protected]] Calling b2b_client_new("freeswitch_dtmf", "sip:tcs_dtmf@tcs_freeswitch.tcs").
2026-01-13T07:35:31+00:00 INFO:[[email protected]] Calling b2b_init_request("dtmf").
2026-01-13T07:35:31+00:00 CRITICAL:core:fm_free: freeing dangling pkg pointer (0x7de52065b6e8) - aborting!
2026-01-13T07:35:31+00:00 INFO:core:handle_sigs: child process 44649 exited by a signal 6
2026-01-13T07:35:31+00:00 INFO:core:handle_sigs: core was generated
2026-01-13T07:35:31+00:00 INFO:core:handle_sigs: terminating due to SIGCHLD
OS/environment information
- Operating System: Ubuntu 25.10
- OpenSIPS installation: packages
- other relevant information: Docker
Additional context
Without using async, this works perfect but when using async and b2b_init_request is called from theresume route, opensips is crashing.