[OpenSER-Devel] [ openser-Bugs-1752902 ] lcr_reload doesn't work
with dbtext with db_mode 1
SourceForge.net
noreply at sourceforge.net
Mon Jul 16 14:33:50 CEST 2007
Bugs item #1752902, was opened at 2007-07-12 22:11
Message generated for change (Comment added) made by miconda
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1752902&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
>Assigned to: Daniel-Constantin Mierla (miconda)
Summary: lcr_reload doesn't work with dbtext with db_mode 1
Initial Comment:
>From the config:
loadmodule "dbtext.so"
modparam("dbtext", "db_mode", 1)
loadmodule "mi_fifo.so"
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
loadmodule "lcr.so"
modparam("lcr", "db_url", "dbtext:///usr/local/etc/openser/openser")
modparam("lcr", "fr_inv_timer_avp", "$avp(i:704)")
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "contact_avp", "$avp(i:711)")
modparam("lcr", "rpid_avp", "$avp(i:302)")
Here's the content of the lcr table:
====================================
prefix(str) from_uri(str,null) grp_id(int) priority(int)
1:1:0:0
2:2:1:1
3:3:2:2
# openserctl lcr show
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
lcr routes
1:1:0:0
2:2:1:1
3:3:2:2
lcr gateway groups
lcr gateways
# openserctl fifo lcr_dump
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
entering fifo_cmd lcr_dump
RULE:: PREFIX=3 FROM_URI=3 GRP_ID=2 PRIORITY=2
RULE:: PREFIX=2 FROM_URI=2 GRP_ID=1 PRIORITY=1
RULE:: PREFIX=1 FROM_URI=1 GRP_ID=0 PRIORITY=0
FIFO command was:
:lcr_dump:openser_receiver_22687
at this point in time we add a new gateway:
# openserctl lcr addroute 4 4 3 3
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
# openserctl lcr show
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
lcr routes
1:1:0:0
2:2:1:1
3:3:2:2
4:4:3:3
lcr gateway groups
lcr gateways
# openserctl fifo lcr_dump
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
entering fifo_cmd lcr_dump
RULE:: PREFIX=3 FROM_URI=3 GRP_ID=2 PRIORITY=2
RULE:: PREFIX=2 FROM_URI=2 GRP_ID=1 PRIORITY=1
RULE:: PREFIX=1 FROM_URI=1 GRP_ID=0 PRIORITY=0
FIFO command was:
:lcr_dump:openser_receiver_22772
now we will perform a reload:
# openserctl fifo lcr_reload
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
entering fifo_cmd lcr_reload
... and the prompt never returns ...
And here's the debug output:
============================
Jul 12 15:00:40 oser openser[22624]: DEBUG:mi_fifo:mi_fifo_server: entered
consume
Jul 12 15:00:40 oser openser[22624]: DEBUG:mi_fifo:mi_fifo_server: ****
done consume
Jul 12 15:00:40 oser openser[22624]: DEBUG:mi_fifo:mi_fifo_server: done
parsing the mi tree
Jul 12 15:00:40 oser openser[22624]: DBT:dbt_cache_get_db: looking for db
/usr/local/etc/openser/openser!
Jul 12 15:00:40 oser openser[22624]: DBT:dbt_cache_get_db: db already
cached!
Jul 12 15:00:40 oser openser[22624]: DBT:dbt_cache_get_table: cache or
mtime succeeded
Jul 12 15:00:40 oser openser[22624]: DBT:dbt_query: new res with 7 cols
Jul 12 15:00:40 oser openser[22624]: DBT:dbt_result_new: new res with 7
cols
----------------------------------------------------------------------
>Comment By: Daniel-Constantin Mierla (miconda)
Date: 2007-07-16 15:33
Message:
Logged In: YES
user_id=1246013
Originator: NO
Can you get the latest svn and try again?
Let me know any strange behavior. Do you still have all openser processes
running, any 100% CPU? Attach to MI process via gdb and print the
backtrace.
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2007-07-14 15:57
Message:
Logged In: YES
user_id=1395524
Originator: YES
Yes, it is related to the new functionality of dbtext (db_mode 1).
If the db_mode is not set, 'openserctl fifo lcr_reload' returns properly
from execution:
# openserctl fifo lcr_reload
database engine 'DBTEXT' loaded
Control engine 'FIFO' loaded
entering fifo_cmd lcr_reload
FIFO command was:
:lcr_reload:openser_receiver_13343
#
Here are the debug logs:
========================
Jul 14 08:49:17 oser openser[13092]: DEBUG:mi_fifo:mi_fifo_server: entered
consume
Jul 14 08:49:17 oser openser[13092]: DEBUG:mi_fifo:mi_fifo_server: ****
done consume
Jul 14 08:49:17 oser openser[13092]: DEBUG:mi_fifo:mi_fifo_server: done
parsing the mi tree
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_cache_get_db: looking for db
/usr/local/etc/openser/openser!
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_cache_get_db: db already
cached!
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_cache_get_table: cache or
mtime succeeded
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_query: new res with 7 cols
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_result_new: new res with 7
cols
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_cache_get_table: cache or
mtime succeeded
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_query: new res with 4 cols
Jul 14 08:49:17 oser openser[13092]: DBT:dbt_result_new: new res with 4
cols
Of course, in this mode lcr_reload is a noop (the table is already cached
in the memory).
The whole purpose of this test was to check the new dbtext enhancement
committed by miconda.
----------------------------------------------------------------------
Comment By: Ovidiu Sas (osas)
Date: 2007-07-14 15:50
Message:
Logged In: YES
user_id=1395524
Originator: YES
Update from juha:
=================
Date: 2007-07-14 05:31
Sender: nobody
Logged In: NO
i didn't find anything in lcr module that would explain lcr_reload mi
command not returning. lcr_reload calls reload_gws(), which contains two
controlled loops, i.e., they cannot loop forever.
so perhaps the bug is in dbtext implementation.
-- juha
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1752902&group_id=139143
More information about the Devel
mailing list