[Kamailio-Devel] [ openser-Bugs-2030655 ] dialog: statistics active_dialogs inaccurate on restart
SourceForge.net
noreply at sourceforge.net
Sun Aug 10 08:08:34 CEST 2008
Bugs item #2030655, was opened at 2008-07-28 16:07
Message generated for change (Comment added) made by dozure
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: Aubrey Wells (dozure)
Date: 2008-08-10 02:08
Message:
Logged In: YES
user_id=847429
Originator: YES
It coredumps on startup if there are entries in the dialog db table. It
will coredump every time. If i hang up running calls (or delete the entries
from the dialog table by hand) the server will start up normally. I am
emailing the core file now. I had to gzip it to get it to send.
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-08-07 06:32
Message:
Logged In: YES
user_id=337916
Originator: NO
Hi,
does it works also if you restart the server, or do you observe then a
core dump again? E.g. do you get a core dump everytime? Perhaps you can
attach the backtrace from the core dump, or send it to me via mail, if it
contains sensitive informations, henning dot westerholt at 1und1 dot de
Henning
----------------------------------------------------------------------
Comment By: Aubrey Wells (dozure)
Date: 2008-08-05 22:06
Message:
Logged In: YES
user_id=847429
Originator: YES
I'm trying to upload a core file, but sourceforge is not letting me. If
you think a core file will be helpful, email me and I can send you ftp
credentials to get it.
----------------------------------------------------------------------
Comment By: Aubrey Wells (dozure)
Date: 2008-08-05 21:48
Message:
Logged In: YES
user_id=847429
Originator: YES
Well, that didn't work. OpenSER now dumps core when the dialog module
loads if there is anything in the dialog table. If I hang up and delete the
entries in the dialog table, it will start fine.
Aug 5 21:36:50 [5829] INFO:snmpstats:mod_init: Starting up the SNMPStats
Module
Aug 5 21:36:50 [5829] INFO:dialog:mod_init: Dialog module - initializing
Segmentation fault (core dumped)
----------------------------------------------------------------------
Comment By: Henning Westerholt (henningw)
Date: 2008-08-05 13: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 13: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 11: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-30 23: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-29 23: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 09: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