[Kamailio-Devel] [ openser-Bugs-2030655 ] dialog: statistics active_dialogs inaccurate on restart

SourceForge.net noreply at sourceforge.net
Tue Aug 5 19:17:43 CEST 2008


Bugs item #2030655, was opened at 2008-07-28 20:07
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2030655&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 1.3.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Aubrey Wells (dozure)
Assigned to: Henning Westerholt (henningw)
Summary: dialog: statistics active_dialogs inaccurate on restart

Initial Comment:
If OpenSER is restarted while calls are active, the statistics module stops accurately reporting the active_dialogs statistic. What appears happens is the counter resets to 0 on restart, but if there are active calls, the counter will start from 0. If a call hangs up, the counter appears to wrap around backwards to 4294967296.

There were 38 calls when I restarted OpenSER and this is what my counters get:

[root at sip-01-c61-56-atl ~]#  openserctl fifo get_statistics active_dialogs
dialog:active_dialogs = 4294967293
[root at sip-01-c61-56-atl ~]# openserctl fifo dlg_list | grep dialog:: | wc -l
34

As you can see, 4 calls hung up during the restart. the dialog module knows that there are 34 calls, but statistics has wrapped backwards to 4294967293.

----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2008-08-05 17:17

Message:
Logged In: YES 
user_id=337916
Originator: NO

The previous patch is not needed anymore. If the new one apply correctly
it will probably also work, if you don't like to backout the previous one.
There more or less unrelated. I'll port tomorow some more bug fixes, so
perhaps you want to wait for them too.

----------------------------------------------------------------------

Comment By: Aubrey Wells (dozure)
Date: 2008-08-05 17:02

Message:
Logged In: YES 
user_id=847429
Originator: YES

Will the patch apply cleanly with, or does it require the previous patch,
or do I need to back out the first patch before applying this one?

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-08-05 15:11

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi,

ok, aparently the previous patch was not sufficient, sorry about that.
Anyway i've ported a different fix to the trunk, see
http://openser.svn.sourceforge.net/openser/?rev=4551&view=rev

Now the statistic counter should be properly initialized from the database
content during startup. The patch also applies to the 1.3 branch.

Henning

----------------------------------------------------------------------

Comment By: Aubrey Wells (dozure)
Date: 2008-07-31 03:23

Message:
Logged In: YES 
user_id=847429
Originator: YES

Doesnt seem to have worked:

Before making a call:
[root at rolecall ~]# openserctl fifo get_statistics active_dialogs
dialog:active_dialogs = 0

Call up:
[root at rolecall ~]# openserctl fifo get_statistics active_dialogs
dialog:active_dialogs = 1

Restart openser with call active:
[root at rolecall ~]# service openser restart
Stopping openser:                                          [  OK  ]
Starting openser:                                          [  OK  ]
[root at rolecall ~]# 

After restart, call still up:
[root at rolecall ~]# openserctl fifo get_statistics active_dialogs
dialog:active_dialogs = 0

Hung up call - counter has wrapped:
[root at rolecall ~]# openserctl fifo get_statistics active_dialogs
dialog:active_dialogs = 4294967295



----------------------------------------------------------------------

Comment By: Aubrey Wells (dozure)
Date: 2008-07-30 03:59

Message:
Logged In: YES 
user_id=847429
Originator: YES

I'll try your patch in my maint window tomorrow. Thanks.

----------------------------------------------------------------------

Comment By: Henning Westerholt (henningw)
Date: 2008-07-29 13:38

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi,

i've attached a small patch, which adds a new statistics #define that
checks against this conditions and change the dialog code to use this for
relevant cases. The patch is for the trunk, but also apply on the 1.3
branch.

Would be nice if you could test, and somebody with a little bit more
knowledge about the dialog module could review if this is the best way of
fixing the problem.

Henning
File Added: dialog-wrap-fix.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2030655&group_id=139143



More information about the Devel mailing list