Is it normal for Kamailio to segfault on a duplicate key in the usrloc DB?
Jun 15 18:15:23 vproxy2 /usr/sbin/kamailio[13646]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'uloc-557a96c1-3577-4e5f1' for key 'ruid_idx' Jun 15 18:15:23 vproxy2 /usr/sbin/kamailio[13646]: ERROR: <core> [db_query.c:337]: db_do_update(): error while submitting query Jun 15 18:15:23 vproxy2 /usr/sbin/kamailio[13646]: ERROR: usrloc [ucontact.c:800]: db_update_ucontact_addr(): updating database failed Jun 15 18:15:23 vproxy2 /usr/sbin/kamailio[13646]: ERROR: usrloc [urecord.c:368]: wb_timer(): updating contact in db failed (aor: sip305_isibmp)
I believe that there should never be a duplicate key. I'm not sure how that's happening either. I have 3 Kamailio boxes in a cluster replicating registrations to each other and using a MySQL Galara cluster for the usrloc DB. This is Kamailio 4.0.6.
Thanks, Marc
On 06/16/2015 12:04 PM, Marc Soda wrote:
Is it normal for Kamailio to segfault
No. :-) Can you provide a GDB backtrace?
Unfortunately, the best I can do is this:
Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.'. Program terminated with signal 11, Segmentation fault. #0 0x00007fa3e65a5f3b in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so (gdb) #0 0x00007fa3e65a5f3b in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #1 0x00007fa3e659a2b8 in mem_timer_udomain () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #2 0x00007fa3e658bec6 in synchronize_all_udomains () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #3 0x00007fa3e65a465a in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #4 0x000000000054d517 in ?? () #5 0x0000000000552aa2 in slow_timer_main () #6 0x000000000047df69 in main_loop () #7 0x000000000041bcd1 in main ()
I can't find the proper kamailio-dbg DEB to install for 4.0.6. Only 4.0.7 is in the repo.
Anyway, I still believe the trouble is with writing to the DB.
Marc
On Tue, Jun 16, 2015 at 12:05 PM, Alex Balashov abalashov@evaristesys.com wrote:
On 06/16/2015 12:04 PM, Marc Soda wrote:
Is it normal for Kamailio to segfault
No. :-) Can you provide a GDB backtrace?
-- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
ntended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
You have to upgrade to 4.0.7 as it replaced 4.0.6 in 4.0.x series. It could be that the backtrace will still be relevant.
It is useful to know the parameters for registrar and usrloc modules.
Cheers, Daniel
On 16/06/15 18:45, Marc Soda wrote:
Unfortunately, the best I can do is this:
Core was generated by `/usr/sbin/kamailio -f /etc/kamailio/kamailio.cfg -P /var/run/kamailio/kamailio.'. Program terminated with signal 11, Segmentation fault. #0 0x00007fa3e65a5f3b in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so (gdb) #0 0x00007fa3e65a5f3b in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #1 0x00007fa3e659a2b8 in mem_timer_udomain () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #2 0x00007fa3e658bec6 in synchronize_all_udomains () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #3 0x00007fa3e65a465a in ?? () from /usr/lib/x86_64-linux-gnu/kamailio/modules/usrloc.so #4 0x000000000054d517 in ?? () #5 0x0000000000552aa2 in slow_timer_main () #6 0x000000000047df69 in main_loop () #7 0x000000000041bcd1 in main ()
I can't find the proper kamailio-dbg DEB to install for 4.0.6. Only 4.0.7 is in the repo.
Anyway, I still believe the trouble is with writing to the DB.
Marc
On Tue, Jun 16, 2015 at 12:05 PM, Alex Balashov <abalashov@evaristesys.com mailto:abalashov@evaristesys.com> wrote:
On 06/16/2015 12:04 PM, Marc Soda wrote: Is it normal for Kamailio to segfault No. :-) Can you provide a GDB backtrace? -- Alex Balashov | Principal | Evariste Systems LLC 303 Perimeter Center North, Suite 300 Atlanta, GA 30346 United States Tel: +1-800-250-5920 <tel:%2B1-800-250-5920> (toll-free) / +1-678-954-0671 <tel:%2B1-678-954-0671> (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
ntended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Marc Soda writes:
Is it normal for Kamailio to segfault on a duplicate key in the usrloc DB?
Jun 15 18:15:23 vproxy2 /usr/sbin/kamailio[13646]: ERROR: db_mysql [km_dbase.c:122]: db_mysql_submit_query(): driver error on query: Duplicate entry 'uloc-557a96c1-3577-4e5f1' for key 'ruid_idx'
I don't know if it is normal, but I have seen the same error messages. My sip proxy has not crashed though.
-- Juha