[OpenSIPS-Users] OpenSips 3.4.12 crashes with segfault randomly

Julian Santer julian.santer at rolmail.net
Mon Sep 8 10:12:29 UTC 2025


Hello everyone,

this issue is a duble of "Segfault after some timer issue" sent from 
Benjamin Herbst.

Kind regards,
Julian Santer

Am 08.09.25 um 11:08 schrieb Julian Santer via Users:
> Hello everyone!
> 
> One of our OpenSIPS instances recently started having issues with 
> restarts after seemingly random segfaults. Before, the server was 
> working without any problems for the longest time.
> It seems, that some kind of, maybe malformed packet or something, is 
> triggering this.
> 
> These are the OpenSIPs details:
> 
> version: opensips 3.4.12 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
> Q_MALLOC, F_MALLOC, HP_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: 6440465a9
> main.c compiled on with gcc 12
> 
> 
> I've followed the "OpenSIPS crashes" part of the documentation and have 
> the Logs and Backtraces. I'll attach them below.
> 
> If someone has some hints on where to find the issue or maybe had 
> something similar, I would appreciate the help 🙂
> 
> 
> ...
> 2025-09-02T18:10:23.618904+02:00 gw-consumer1 kernel: [8579393.594925] 
> opensips[804304]: segfault at 18 ip 00007f019405091a sp 00007ffc5cfcff10 
> error 4 in tm.so[7f0194017000+46000] likely on CPU 0 (core 0,
> socket 0)
> 2025-09-02T18:10:23.618936+02:00 gw-consumer1 kernel: [8579393.594944] 
> Code: 48 8b 05 81 05 03 00 48 8b 00 f6 40 18 08 0f 85 e9 fb ff ff e9 64 
> fe ff ff 0f 1f 80 00 00 00 00 48 8b 05 59 05 03 00 48 8b 00 <f
> 6> 40 18 08 0f 85 c9 fb ff ff e9 44 fe ff ff 0f 1f 80 00 00 00 00
> 2025-09-02T18:10:23.620397+02:00 gw-consumer1 OpenSIPS[804304]: 
> CRITICAL:core:sig_usr: segfault in process pid: 804304, id: 45
> 2025-09-02T18:10:23.721130+02:00 gw-consumer1 OpenSIPS[804263]: 
> WARNING:core:utimer_ticker: utimer task <tm-utimer> already scheduled 
> 100 ms ago (now 56230 ms), delaying execution
> 2025-09-02T18:10:23.752211+02:00 gw-consumer1 OpenSIPS[804259]: 
> INFO:core:handle_sigs: child process 804304 exited by a signal 11
> 2025-09-02T18:10:23.752324+02:00 gw-consumer1 OpenSIPS[804259]: 
> INFO:core:handle_sigs: core was generated
> 2025-09-02T18:10:23.752366+02:00 gw-consumer1 OpenSIPS[804259]: 
> INFO:core:handle_sigs: terminating due to SIGCHLD
> ...
> 
> 
> Here the short version of the GDB
> 
> ...
> Reading symbols from /usr/sbin/opensips...
> Reading symbols from /usr/lib/debug/.build- 
> id/02/46eb235cd53dad2b8bc1e57cb2e4057daa0af4.debug...
> 
> warning: Can't open file /dev/zero (deleted) during file-backed mapping 
> note processing
> [New LWP 804304]
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by `/usr/sbin/opensips -P /run/opensips/opensips.pid 
> -f /etc/opensips/opensips.cfg'.
> Program terminated with signal SIGSEGV, Segmentation fault.
> #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) 
> at ./modules/tm/timer.c:313
> 313 ./modules/tm/timer.c: No such file or directory.
> ...
> 
> I tried to look at the source code for Opensips version 3.4.12, but no 
> luck...
> 
> 
> Here is the full GDB Trace:
> 
> 
> (gdb) bt full
> #0 0x00007f019405091a in retransmission_handler (retr_tl=0x7f0194553ad8) 
> at ./modules/tm/timer.c:313
> r_buf = 0x7f0194553a90
> id = <optimized out>
> r_buf = <optimized out>
> id = <optimized out>
> __FUNCTION__ = "retransmission_handler"
> __mptr = <optimized out>
> #1 utimer_routine (uticks=56100000, set=<optimized out>) at ./modules/ 
> tm/timer.c:1153
> tl = 0x7f0194553ad8
> tmp_tl = 0x0
> begin = {tv_sec = 1756829423, tv_nsec = 617548290}
> id = 4
> __FUNCTION__ = "utimer_routine"
> #2 0x0000555ae09ac3a6 in handle_timer_job () at ./timer.c:1006
> t = 0x7f01944c9208
> l = <optimized out>
> _ijiffies = 56130000
> _ijiffies_extra = 0
> __FUNCTION__ = "handle_timer_job"
> #3 0x0000555ae09ac755 in handle_io (fm=0x7f01981d2538, event_type=1, 
> idx=<optimized out>) at ./timer.c:765
> n = -1742920392
> __FUNCTION__ = "handle_io"
> #4 0x0000555ae09ad139 in io_wait_loop_epoll (repeat=<optimized out>, 
> t=<optimized out>, h=<optimized out>) at ./io_wait_loop.h:305
> ret = <optimized out>
> n = <optimized out>
> r = 1
> i = <optimized out>
> e = <optimized out>
> ep_event = {events = 2496488960, data = {ptr = 0xe0b17a4c054f8400, fd = 
> 89097216, u32 = 89097216, u64 = 16190856602298844160}}
> fd = <optimized out>
> curr_time = <optimized out>
> error = <optimized out>
> __FUNCTION__ = "io_wait_loop_epoll"
> #5 0x0000555ae09ae16d in start_timer_extra_processes 
> (chd_rank=chd_rank at entry=0x555ae0bbd218 <chd_rank>) at ./timer.c:932
> i = <optimized out>
> p_id = <optimized out>
> ifp_th = {proc_desc = 0x555ae0ad0b8b "Timer handler", flags = 4, type = 
> TYPE_TIMER}
> __FUNCTION__ = "start_timer_extra_processes"
> #6 0x0000555ae08fe9e4 in main_loop () at ./main.c:249
> startup_done = 0x0
> last_check = 0
> rc = <optimized out>
> chd_rank = 41
> startup_done = <optimized out>
> last_check = <optimized out>
> rc = <optimized out>
> profiling_handler = {desc = 0x555ae0ab2f98 "_ProfilerStart_child()", 
> on_child_init = 0x555ae0931fb0 <_ProfilerStart_child>, _next = 0x0}
> __FUNCTION__ = "main_loop"
> error = <optimized out>
> #7 main (argc=<optimized out>, argv=<optimized out>) at ./main.c:966
> c = <optimized out>
> r = <optimized out>
> tmp = 0x7ffc5cfd0e4b ""
> tmp_len = <optimized out>
> port = <optimized out>
> proto = 0
> protos_no = <optimized out>
> options = 0x555ae0ab3260 
> "f:cCm:M:b:l:n:N:rRvdDFEVhw:t:u:g:p:P:G:W:o:a:k:s:"
> ret = -1
> seed = 1271792197
> rfd = <optimized out>
> procs_no = <optimized out>
> __FUNCTION__ = "main"
> 
> 
> Best Regards
> Benjamin Herbst
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users





More information about the Users mailing list