THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Juha Heinanen (jh)
Attached to Project - sip-router Summary - duplicate entry for key ruid_idx Task Type - Bug Report Category - Module Status - New Assigned To - Operating System - All Severity - High Priority - Normal Reported Version - Development Due in Version - Undecided Due Date - Undecided Details - start kamailio in usrloc db_mode=1 with empty location table. give the two ul_add commands below and the second will result into duplicate entry for key ruid_idx error.
this test was done with master, but the bug may also exist in 4.0.
Apr 13 11:26:04 siika /usr/sbin/sip-proxy[12270]: INFO: Handling XMLRPC POST from <127.0.0.1> with body <<?xml version="1.0" ?><methodCall><methodName>mi</methodName><params><param><value><string>ul_add</string></value></param><param><value><string>location</string></value></param><param><value><string>jh@test.fi</string></value></param><param><value><string>sip:jh@as.test.fi</string></value></param><param><value><int>0</int></value></param><param><value><string>0.10</string></value></param><param><value><int>0</int></value></param><param><value><int>0</int></value></param><param><value><int>16</int></value></param><param><value><int>15</int></value></param></params></methodCall>>
Apr 13 11:26:10 siika /usr/sbin/sip-proxy[12276]: INFO: Handling XMLRPC POST from <127.0.0.1> with body <<?xml version="1.0" ?><methodCall><methodName>mi</methodName><params><param><value><string>ul_add</string></value></param><param><value><string>location</string></value></param><param><value><string>jh@test.fi</string></value></param><param><value><string>sip:jh@vm.test.fi</string></value></param><param><value><int>0</int></value></param><param><value><string>0.50</string></value></param><param><value><int>0</int></value></param><param><value><int>0</int></value></param><param><value><int>16</int></value></param><param><value><int>15</int></value></param></params></methodCall>> Apr 13 11:26:10 siika /usr/sbin/sip-proxy[12276]: ERROR: db_mysql [km_dbase.c:122]: driver error on query: Duplicate entry 'ulcx-51691678-2fc1-1' for key 'ruid_idx' Apr 13 11:26:10 siika /usr/sbin/sip-proxy[12276]: ERROR: <core> [db_query.c:235]: error while submitting query Apr 13 11:26:10 siika /usr/sbin/sip-proxy[12276]: ERROR: usrloc [ucontact.c:615]: inserting contact in db failed Apr 13 11:26:10 siika /usr/sbin/sip-proxy[12276]: ERROR: usrloc [urecord.c:480]: failed to insert in database
More information can be found at the following URL: http://sip-router.org/tracker/index.php?do=details&task_id=285
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
sip-router writes:
Details - start kamailio in usrloc db_mode=1 with empty location table. give the two ul_add commands below and the second will result into duplicate entry for key ruid_idx error.
i added a log statement to ul_mi.c mi_usrloc_add() function:
if(sruid_next(&_ul_sruid)<0) goto error; ci.ruid = _ul_sruid.uid; LM_INFO("new sruid is [%.*s]\n", ci.ruid.len, ci.ruid.s);
when i give two ul_add mi commands after starting with empty location table, i get to syslog:
Apr 16 12:35:40 siika /usr/sbin/sip-proxy[6130]: INFO: usrloc [ul_mi.c:564]: new sruid is [ulcx-516d1b67-17c8-1] Apr 16 12:35:41 siika /usr/sbin/sip-proxy[6131]: INFO: usrloc [ul_mi.c:564]: new sruid is [ulcx-516d1b67-17c8-1] Apr 16 12:35:41 siika /usr/sbin/sip-proxy[6131]: ERROR: db_mysql [km_dbase.c:122]: driver error on query: Duplicate entry 'ulcx-516d1b67-17c8-1' for key 'ruid_idx' ...
why sruid_next() call is not updating the sruid so that next call would give a new one? is it a bug in sruid_next() implementation or use of sruid calls in usrloc module?
-- juha
Juha Heinanen writes:
why sruid_next() call is not updating the sruid so that next call would give a new one? is it a bug in sruid_next() implementation or use of sruid calls in usrloc module?
i compared sruid handling in registrar and usrloc. the difference is that in registrar sruid_init() is called also from child_init.
-- juha