Hope you can help me on this.
I have Asterisk instance running on VMWare. 4GB RAM, 1 core Intel® Xeon® CPU E5-2630L v3 @ 1.80GHz
We’ve been running Asterisk 13 for about six months already and had no issues. We are using res_pjsip with approx 100 endpoints with static contacts and registrations. First we had version 13.16, then updated to 13.19 as soon as it was released.
Recently it started to segfault with errors like this:
kernel: asterisk[24600]: segfault at 0 ip 00007fe28480e921 sp 00007ffdee61a238 error 4 in libc-2.17.so[7fe2846a9000+1b8000]
kernel: asterisk[25526]: segfault at 0 ip 00007f0b08345921 sp 00007ffde8fe01d8 error 4 in libc-2.17.so[7f0b081e0000+1b8000]
kernel: asterisk[13140]: segfault at 423f0a8 ip 00007ffbd8355036 sp 00007ffbb6689718 error 4 in libc-2.17.so[7ffbd8220000+1b8000]
kernel: asterisk[2443]: segfault at 4158e08 ip 00007f8e9b2f8036 sp 00007f8e815dd718 error 4 in libc-2.17.so[7f8e9b1c3000+1b8000]
kernel: asterisk[13476]: segfault at 78 ip 00007f5f5d71f0f9 sp 00007f5f4116d560 error 4 in libasteriskpj.so.2[7f5f5d689000+152000]
kernel: asterisk[29763]: segfault at 2ad33a0 ip 00007fbbcd81e0c8 sp 00007fbbabb55718 error 4 in libc-2.17.so[7fbbcd6e9000+1b8000]
kernel: asterisk[21986]: segfault at 78 ip 00007f6267a5a0f9 sp 00007f6243483560 error 4 in libasteriskpj.so.2[7f62679c4000+152000]
kernel: asterisk[11503]: segfault at 78 ip 00007fba94a200f9 sp 00007fba6bffe560 error 4 in libasteriskpj.so.2[7fba9498a000+152000]
It produced core dump (latest backtrace attached). Asterisk crashes and safe_asterisk is unable to restart it so i had to manually start it again (with pgrep script later).
I tried to update it to 13.20, 15.2 and downgrade it to 11.21, disabling pjsip and enabling only SIP, but nothing helps it still crashed almost every hour even in idle state when there are no calls at all.
Then i made fresh CentOS install on different(physical) ESX host and compiled asterisk 13.19 from scratch again. It worked the whole night without issues but crashed again in the morning with segfault. Asterisk give no messages, on debug it just unregisters all modules and stops.
I would really appreciate your helps. Let me know if i need to provide any more information or logs.
I recompiled Asterisk and it was working fine up until now. We experienced several crashes for the past 2 days, i’m attaching backtraces from the last one. Will these do any help?
On the pic attached options that were enabled during recompile and core show settings from asterisk itself which indicates that flags are enabled. Unfortunately i don’t know why core dump is still optimized out. I will recompile again and wait for crush to see if this time i can get proper backtrace.
Your problem appears to be within PJSIP itself, somehow in its transport layer in relation to how you are specifically using Asterisk. Are you using TCP? TLS? Websockets?
The issue is somewhere in the PJSIP TCP transport or usage of it. There’s been recent tweaks done to it, so I’d suggest using the absolute latest version and if that does not resolve the problem then filing an issue[1] with details.