[OpenSIPS-Users] Strange segfault when calling check_fraud

Liviu Chircu liviu at opensips.org
Fri Nov 4 18:15:10 CET 2016


Thank you for all the help, Jim! A fix for this issue has been pushed to 
all 2.X versions of the git repository [1]

If you prefer to use packages [2], you may want to use your distro's 
nighly build repos

[1]: http://www.opensips.org/Downloads/Downloads#toc3
[2]: http://www.opensips.org/Downloads/Downloads#toc2

Regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 04.11.2016 18:46, Jim DeVito wrote:
> Seems like it happen while opensips is still starting (loading the dr_ 
> tables into memory) when the first INVITE comes across the 
> check_fraud() function. I can comment out the check_fraud() and it is 
> just fine.
>
> version: opensips 2.2.2 (x86_64/linux)
> flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
> F_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_lt, epoll_et, sigio_rt, select.
> main.c compiled on 00:00:54 Oct 20 2016 with gcc 4.8.5
>
> Thanks!!
>
> ---
> Jim DeVito
>
>
> On 2016-11-04 09:30, Liviu Chircu wrote:
>> Thank you, Jim! The backtrace is very helpful.
>>
>> Could you give a bit more details about how you are triggering this
>> bug? Could it be right after you are starting OpenSIPS?
>>
>> Also, pasting the output of `opensips -V` could help as well.
>>
>> Regards,
>>
>> Liviu Chircu
>> OpenSIPS Developer
>> http://www.opensips-solutions.com
>>
>> On 04.11.2016 17:34, Jim DeVito wrote:
>>> Thanks for the tip Liviu!
>>>
>>> I was able to get the full core file and paseted below is the back 
>>> trace. Let me know if this can help track down what is going on.
>>>
>>> http://pastebin.com/m7LfVHqJ
>>>
>>> Thanks!!
>>>
>>> ---
>>> Jim DeVito
>>>
>>> On 2016-11-04 08:08, Liviu Chircu wrote:
>>>> Hi, Jim!
>>>>
>>>> It appears that OpenSIPS is either getting restarted too quickly or
>>>> runs out of disk space before it is able to fully write the 3 GB
>>>> corefile. If the size of your drouting data allows it, you could
>>>> reduce the corefile size by shrinking the shared memory pool OpenSIPS
>>>> starts with.
>>>>
>>>> Regards,
>>>>
>>>> Liviu Chircu
>>>> OpenSIPS Developer
>>>> http://www.opensips-solutions.com
>>>>
>>>> On 04.11.2016 16:15, Jim DeVito wrote:
>>>>> Hi All,
>>>>>
>>>>> Wondering if you have seen something like this. It happens when 
>>>>> calling check_fraud() like this...
>>>>>
>>>>> check_fraud("$fU", "$rU", "1");
>>>>>
>>>>> I can reproduce it on 2 of my 3 servers. Let me know if there is 
>>>>> other debugging info that may be needed.
>>>>>
>>>>> Thanks!!
>>>>>
>>>>> Nov  4 13:55:17 sip-proxy02 kernel: opensips[5257]: segfault at 0 
>>>>> ip 00007f619d94ff2e sp 00007ffee6ccd718 error 4 in 
>>>>> drouting.so[7f619d947000+38000]
>>>>> Nov  4 13:55:17 sip-proxy02 kernel: opensips[5256]: segfault at 0 
>>>>> ip 00007f619d94ff2e sp 00007ffee6ccd718 error 4 in 
>>>>> drouting.so[7f619d947000+38000]
>>>>> Nov  4 13:55:18 sip-proxy02 kernel: opensips[5260]: segfault at 0 
>>>>> ip 00007f619d94ff2e sp 00007ffee6ccd718 error 4 in 
>>>>> drouting.so[7f619d947000+38000]
>>>>> Nov  4 13:55:18 sip-proxy02 kernel: opensips[5254]: segfault at 0 
>>>>> ip 00007f619d94ff2e sp 00007ffee6ccd718 error 4 in 
>>>>> drouting.so[7f619d947000+38000]
>>>>> Nov  4 13:55:18 sip-proxy02 kernel: opensips[5259]: segfault at 0 
>>>>> ip 00007f619d94ff2e sp 00007ffee6ccd718 error 4 in 
>>>>> drouting.so[7f619d947000+38000]
>>>>>
>>>>> [root at sip-proxy02 ~]# gdb /var/tmp/core.5257
>>>>> GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
>>>>>
>>>>> This GDB was configured as "x86_64-redhat-linux-gnu".
>>>>>
>>>>> BFD: Warning: /var/tmp/core.5257 is truncated: expected core file 
>>>>> size >= 3226677248, found: 1183989760.
>>>>> BFD: Warning: /var/tmp/core.5257 is truncated: expected core file 
>>>>> size >= 3226677248, found: 1183989760.
>>>>> [New LWP 5257]
>>>>> Reading symbols from /usr/sbin/opensips...Reading symbols from 
>>>>> /usr/lib/debug/usr/sbin/opensips.debug...done.
>>>>> done.
>>>>> Cannot access memory at address 0x7f62635a71e8
>>>>> Cannot access memory at address 0x7f62635a71e0
>>>>> (gdb) bt full
>>>>> Python Exception <class 'gdb.MemoryError'> Cannot access memory at 
>>>>> address 0x7ffee6ccd718:
>>>>>
>>>>> [root at sip-proxy02 ~]# yum list installed | grep opensips
>>>>> opensips.x86_64 2.2.2-1.el7                    @opensips
>>>>> opensips-db_mysql.x86_64 2.2.2-1.el7 @opensips
>>>>> opensips-debuginfo.x86_64 2.2.2-1.el7 @opensips
>>>>> opensips-event_route.x86_64 2.2.2-1.el7 @opensips
>>>>> opensips-fraud_detection.x86_64 2.2.2-1.el7 @opensips
>>>>> opensips-rest_client.x86_64 2.2.2-1.el7 @opensips
>>>>> opensips-yum-releases.noarch 2.2-3.el7 
>>>>> @/opensips-yum-releases-2.2-3.el7.noarch
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list