[OpenSIPS-Devel] [ opensips-Bugs-3607052 ] Load balancer - corrupt data when loading table
SourceForge.net
noreply at sourceforge.net
Thu Mar 7 23:34:54 CET 2013
Bugs item #3607052, was opened at 2013-03-06 07:08
Message generated for change (Comment added) made by umautone
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3607052&group_id=232389
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: 1.9.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Umberto Mautone (umautone)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Load balancer - corrupt data when loading table
Initial Comment:
Tested on 1.9.x
Data table:
id | group_id | dst_uri | resources | probe_mode
----+----------+-------------------+-----------+------------
19 | 1 | sip:192.168.1.5 | pstn=100 | 0
20 | 1 | sip:192.168.1.8 | pstn=100 | 0
21 | 2 | sip:192.168.1.100 | pstn=2500 | 0
I added this line in "lb_db_load_data()" to log the actual table fields being loaded:
LM_ERR("Fields: %d %d %s %s\n", id, group, uri, resource);
The first row loads correctly but subsequent rows seem to lose a pointer alignment somewhere:
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:lb_db_load_data: Fields: 19 1 sip:192.168.1.5 pstn=100
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:lb_db_load_data: Fields: 20 1 sip:192.168.1.8 ¥Ý9w#177
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:parse_resources_list: resource must has value!
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:add_lb_dsturi: failed to parse resourse string < ¥Ý9w#177>
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:lb_db_load_data: failed to add destination 1 -> skipping
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:lb_db_load_data: Fields: 21 2 sip:192.168.1.100 192.168.1.5
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:parse_resources_list: resource must has value!
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:add_lb_dsturi: failed to parse resourse string <192.168.1.5>
Mar 6 10:01:53 localhost opensips[1796]: ERROR:load_balancer:lb_db_load_data: failed to add destination 1 -> skipping
Also tested in 1.8.2 and the problem is not present. The bug seems to be only in the 1.9.x branch.
----------------------------------------------------------------------
>Comment By: Umberto Mautone (umautone)
Date: 2013-03-07 14:34
Message:
I have both 1.8.2 and 1.9.0 running on the same box. If I start up 1.8.2,
it only loads the first record and I have to call "opensipsctl fifo
lb_reload" to force all profiles to be loaded and they load correctly.
When I start 1.9.0, it tries to load all profiles but some get mangled with
garbage. Even issuing a reload will load the exact same records mangled at
the exact same place.
I'm using db_unixodbc connected to PostgreSQL.
I'll try the same load with debug level set to 4 and paste the result.
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2013-03-07 08:04
Message:
Hi Umberto,
The code for loading LB data did not change from 1.8 to 1.9....so it is a
bit odd. I was not able to reproduce it :(.
What DB engine are you using ? Also, could you try running in full debug
(set debug=4).
Thanks and regards,
Bogdan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3607052&group_id=232389
More information about the Devel
mailing list