Confirmed, I'm getting crash too.
On Thursday 26 November 2015 13:05:57 Jayesh Nambiar wrote:
Hi, I am trying to extract out the expires value from the incoming REGISTER request. It might be present in the Contact header or as a separate Expires header and hence I planned to use the $expires(max) PV to get this. But kamailio just crashes as soon as I use the variable. Here's when it crashes:
if(is_method("REGISTER")) { xlog("L_INFO", "Expires is $expires(max)"); if(!save("location", "0x01")) { t_reply("500", "Error while saving AOR"); } }
It crashes at the xlog point. Here's the backtrace for reference: Reading symbols from /usr/local/kamailio/sbin/kamailio...done. [New LWP 16609] [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/local/kamailio/sbin/kamailio -P /var/run/kamailio.pid -f /usr/local/kamail'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f34b658b311 in pv_get_expires (msg=0x7f34bd879e58, param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060 3060 if(c->expires && c->expires->body.len) { (gdb) backtrace #0 0x00007f34b658b311 in pv_get_expires (msg=0x7f34bd879e58, param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060 #1 0x00000000004fb6e1 in pv_get_spec_value (msg=0x7f34bd879e58, sp=0x7f34bd7e9208, value=0x7ffcf67af530) at pvapi.c:1304 #2 0x00000000004fbb46 in pv_printf (msg=0x7f34bd879e58, list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ", len=0x7ffcf67af618) at pvapi.c:1363 #3 0x00007f34b67ea745 in xl_print_log (msg=0x7f34bd879e58, list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ", len=0x7ffcf67af618) at xl_lib.c:37 #4 0x00007f34b67eb0f9 in xlog_helper (msg=0x7f34bd879e58, xm=0x7f34bd808648, level=2, line=0, facility=-1) at xlog.c:215 #5 0x00007f34b67ec160 in xlog_2_helper (msg=0x7f34bd879e58, lev=0x7f34bd7e9130 "", frm=0x7f34bd808648 "84\177", mode=0, facility=-1) at xlog.c:284 #6 0x00007f34b67ec19c in xlog_2 (msg=0x7f34bd879e58, lev=0x7f34bd7e9130 "", frm=0x7f34bd808648 "84\177") at xlog.c:292 #7 0x000000000041e23b in do_action (h=0x7ffcf67b0b40, a=0x7f34bd817cd0, msg=0x7f34bd879e58) at action.c:1065 #8 0x000000000042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd813e18, msg=0x7f34bd879e58) at action.c:1548 #9 0x000000000041ab16 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e8738, msg=0x7f34bd879e58) at action.c:677 #10 0x000000000042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd7e8738, msg=0x7f34bd879e58) at action.c:1548 #11 0x000000000041e094 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e89c8, msg=0x7f34bd879e58) at action.c:1044 #12 0x000000000042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd7e19d8, msg=0x7f34bd879e58) at action.c:1548 #13 0x000000000042b04d in run_top_route (a=0x7f34bd7e19d8, msg=0x7f34bd879e58, c=0x0) at action.c:1634 #14 0x000000000050f3d4 in receive_msg ( buf=0xa80c00 <buf> "REGISTER sip:devsip.tlkn.com SIP/2.0\r\nVia: SIP/2.0/UDP 203.153.53.145:8300;branch=z9hG4bK119a.e23ed10b856f38b41c93d1d259d8869f.0;i =b1\r\nVia: SIP/2.0/TCP 172.16.16.32:52358;rport=52359;received=203.153."..., len=712, rcv_info=0x7ffcf67b0e60) at receive.c:196 #15 0x0000000000613b9e in udp_rcv_loop () at udp_server.c:495 #16 0x00000000004aa119 in main_loop () at main.c:1577 #17 0x00000000004b0e1e in main (argc=5, argv=0x7ffcf67b1318) at main.c:2553
Thanks,
- Jayesh