RE: [reSIProcate] stoping DUM with unsuccessful call
I did some digging around. This seems to be related to a change committed
by Nash in May sometime which was suspect - but since forgotten (see
attached email).
The problem is that the 408 response triggers a new Dialog and InviteSession
to be created - but since shutdown has been called - the HandleManager
disallows the handle to be created. Later the handle is accessed and an
assertion is triggered.
I tried removing this change and everything is working good.
I'll discuss this with Jason and figure out how to proceed.
Scott
-----Original Message-----
From: stensil [mailto:stensil@xxxxxxx]
Sent: Monday, July 04, 2005 5:43 AM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] stoping DUM with unsuccessful call
Error scenario:
1. Initialize DUM, start DUM'n'SipStack event-processing thread
2. Make INVITE session to invalid SIP URL
3. InviteSessionHandler::onNewSession NOT called
4. Trying to shutdown DUM - onDumCanBeDeleted NOT called
5. After some time assert throws %/
Look at the resiprocate DEBUG LOG for more info.
--------------------------------------------------
foobar2000 v0.8.3 : (foobar2000 is not active ;-)
--- Begin Message ---
My first take on this is that dum may need to be able to create
handles while it is shutting down. I don't think the change Nash
checked in is necessarily correct. Will think about it a bit more and
post again.
A better solution to the problem would be to fully implement the
forceShutdown stuff in dum.
Jason
On 5/6/05, Nash Tsai <nash.teltel@xxxxxxxxx> wrote:
> Hi Scott,
>
> Will you be fixing DUM on prevent creating dialog handles while it is in
> shutting down state ?
>
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Friday, May 06, 2005 9:46 PM
> To: 'nash@xxxxxxxxxx'
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Ah - I see - that would explain why I didn't see the problem. I tried our
> app with your changes and everything appears to still work as before.
>
> Thanks,
>
> Scott
>
> -----Original Message-----
> From: Nash Tsai [mailto:nash.teltel@xxxxxxxxx]
> Sent: Friday, May 06, 2005 5:19 AM
> To: 'Scott Godin'
> Cc: jason.fischl@xxxxxxxxx; David Butcher
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Hi Scott,
>
> I have committed changes to HandleManaget.cxx (checkin revision 4532) to
> handle shutting down in the "HandleManager::create(Handled* handled)"
> function, this will fix my problem of shutting down DUM. The problem is
that
> while shutting down DUM it is trying to delete all the Handles but the
> process could be long, as I subscribed to many buddies, so in the meantime
> the stack thread pulled sip response message and there are chances that it
> need to create AppDialogSet hence add a new handle to HandleManager
> therefore this turns into infinite loop when trying to remove handles and
> newly created AppDialogSet not getting deleted.
>
> Although my codes fixed the problem, however, I think this problem should
be
> handled in DUM.
>
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Thursday, May 05, 2005 2:28 AM
> To: 'nash@xxxxxxxxxx'; Scott Godin
> Cc: jason.fischl@xxxxxxxxx
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> I do not use StackThread.
>
> TuSelector::Process processes the mShutdownFifo and queues the
> TransactionUserRemoved message onto the DUM fifo.
>
> -----Original Message-----
> From: Nash Tsai [mailto:nash.teltel@xxxxxxxxx]
> Sent: Wednesday, May 04, 2005 1:47 PM
> To: 'Scott Godin'
> Cc: jason.fischl@xxxxxxxxx
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Hi Scott,
>
> Do you use StackThread?
>
> Following is pseudo code of shutdown function of my UserAgent:
> 1. End resip::ClientPublicationHandle
> 2. End all resip::ClientSubscriptionHandle
> 3. End all resip::ClientPagerMessageHandle
> 4. If resip::ClientRegistrationHandle isValid then call
> removeMyBindings(true) of ClientRegistrationHandle
> 5. Then DUM.shutdown(this)
>
> Does DUM.shutdown function post TransactionUserMessage to the SipStack? I
> have actually traced the code and found that only
> TuSelector::requestTransactionUserShutdown(TransactionUser& tu)
> TuSelector::unregisterTransactionUser(TransactionUser& tu)
> Functions have pushed TransactionUserMessage into its mShutdownFifo (I
have
> no clue how does these FIFO messages get queued in DUM's message FIFO) and
> it's not getting consumed in DUM's process function as it's not queued in
> DUM's mFIFO.
>
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Wednesday, May 04, 2005 7:43 PM
> To: nash@xxxxxxxxxx
> Cc: jason.fischl@xxxxxxxxx
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Yup (onDumCanBeDeleted is getting called) - maybe you have some usages
that
> are not destroyed for some reason.
>
> -----Original Message-----
> From: Nash Tsai [mailto:nash.teltel@xxxxxxxxx]
> Sent: Wednesday, May 04, 2005 1:43 AM
> To: 'Scott Godin'; jason.fischl@xxxxxxxxx
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> I am just calling
> mDum.shutdown(this); // this has implemented DumShutdownHandler
>
> and expecting onDumCanBeDeleted function to be called.
>
> Have you checked the onDumCanBeDeleted function has been called before
> destroy DUM, StackThread and SipStack?
>
> My application will not destroy DUM and keep calling DUM.process() until
> onDumCanBeDeleted has been called.
>
> -----Original Message-----
> From: Scott Godin [mailto:slgodin@xxxxxxxxxxxx]
> Sent: Wednesday, May 04, 2005 2:37 AM
> To: 'nash@xxxxxxxxxx'; jason.fischl@xxxxxxxxx
> Cc: Scott Godin
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> What shutdown method are you using? There are some that are not fully
> implemented.
>
> -----Original Message-----
> From: Nash Tsai [mailto:nash.teltel@xxxxxxxxx]
> Sent: Tuesday, May 03, 2005 2:34 PM
> To: jason.fischl@xxxxxxxxx
> Cc: slgodin@xxxxxxxxxxxx
> Subject: RE: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Jason,
>
> Yes I am running HEAD of reciprocate and DUM.
>
> -----Original Message-----
> From: Fischl jason [mailto:jason.fischl@xxxxxxxxx]
> Sent: Tuesday, May 03, 2005 11:17 AM
> To: Scott Godin
> Subject: Re: [reSIProcate] DUM DumShutdownHandler does not get triggered
>
> Nash,
> Are you running HEAD of main in resiprocate?
>
> Jason
>
> On 5/3/05, Scott Godin <slgodin@xxxxxxxxxxxx> wrote:
> >
> >
> >
> > I'm shutting down using dum->shutdown(&shutdownhandler) and it is
working
> > fine. There was problems with this a few weeks ago - but it has since
> been
> > fixed.
> >
> >
> >
> > ________________________________
> >
> >
> > From: Nash Tsai [mailto:nash.teltel@xxxxxxxxx]
> > Sent: Tuesday, May 03, 2005 12:14 AM
> > To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > Subject: [reSIProcate] DUM DumShutdownHandler does not get triggered
> >
> >
> >
> >
> > Hi,
> >
> >
> >
> > After call DialogUsageManager.shutdown and passing a DumShutdownHandler,
> the
> > DUM seem to be shutting down without calling
> > DumShutdownHandler.onDumCanBeDeleted, some how when
> > shutting down the DUM the following part of codes never gets executed:
> >
> >
> >
> > TransactionUserMessage* tuMsg =
> > dynamic_cast<TransactionUserMessage*>(msg.get());
> >
> > if (tuMsg)
> >
> > {
> >
> > InfoLog (<< "TU unregistered ");
> >
> > assert(mShutdownState == RemovingTransactionUser);
> >
> > assert(tuMsg->type() ==
> > TransactionUserMessage::TransactionUserRemoved);
> >
> > mShutdownState = Shutdown;
> >
> > if (mDumShutdownHandler)
> >
> > {
> >
> > mDumShutdownHandler->onDumCanBeDeleted();
> >
> > mDumShutdownHandler = 0;
> >
> > }
> >
> > return;
> >
> > }
> >
> >
> >
> > Is this a bug of DUM ?
> >
> >
> >
> > Thanks,
> >
> > Nash
> > _______________________________________________
> > resiprocate-devel mailing list
> > resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> > https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
> >
> >
>
>
--- End Message ---