[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [xmlblaster] dead lock



Hi marcel,

Following your advices, I changed my configuration by 
dispatch/callback/retries=-1

I'm using the two following events:
client/*/session/*/event/callbackState
client/*/session/*/event/disconnect

All is ok but when a client do an explicit disconnect, I receive two
events:
     client/*/session/*/event/callbackState POLLING
and  client/*/session/*/event/disconnect

Is there a way to avoid to receive the event "POLLING" when the a client
do 
An explicit disconnect ?

Thanks,

Xavier.


> -----Original Message-----
> From: owner-xmlblaster at server.xmlBlaster.org [mailto:owner-
> xmlblaster at server.xmlBlaster.org] On Behalf Of Marcel Ruff
> Sent: jeudi 27 septembre 2007 17:55
> To: xmlblaster at server.xmlBlaster.org
> Subject: Re: [xmlblaster] dead lock
> 
> Xavier Roques wrote:
> > In my configuration, I want that the clients always try to connect
back
> > to the Server so
> > the clients retries is set to -1.
> >
> > But I want to be informed as soon as a client is disconnected.
> > That's why my configuration is
> > dispatch/callback/retries=0
> > Otherwise I'm not informed when a client is abnormally disconnected.
> >
> > So, I have a question, is there a way to know that a client has been
> > normally disconnected or not ?
> >
> > Xavier.
> >
> If you set
> 
>   dispatch/callback/retries=-1
> 
> the server will never cleanup your session (it will only if you do
> an explicit disconnect() or kill it using the jconsole).
> 
> If the client disappears the callback framework goes to state
"POLLING",
> and all settings like subscribes or callback queue entries are
preserved
> (even on server restart if marked <persistent/>).
> 
> You can detect polling clients using an EventPlugin, see
> 
>
http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.events.html
> 
> and use the event
> 
>   client/[subjectId]/session/[publicSessionId]/event/callbackState
> 
> Please use the newest xmlBlaster as we have made some coding changes
for
> this
> in the last history,
> 
> best regards
> Marcel
> 
> 
> >
> >> -----Original Message-----
> >> From: owner-xmlblaster at server.xmlBlaster.org [mailto:owner-
> >> xmlblaster at server.xmlBlaster.org] On Behalf Of Marcel Ruff
> >> Sent: mercredi 26 septembre 2007 19:02
> >> To: xmlblaster at server.xmlBlaster.org
> >> Subject: Re: [xmlblaster] dead lock
> >>
> >> Xavier Roques wrote:
> >>
> >>> Hi David,
> >>>
> >>>
> >>>
> >>> When the dead lock occurred, I have one server with 144 connected
> >>>
> > clients.
> >
> >>>
> >>> All my clients are configured in fail safe mode and all the
messages
> >>> are stored in RAM, the configuration of all my agents is:
> >>>
> >>> #server configuration
> >>>
> >>> dispatch/callback/retries=0
> >>>
> >>>
> >> --> 0 no retry: XmlBlaster will clean up the session if the client
> >>
> > does
> >
> >> not respond to the callback ping
> >> if you need fail safe behaviour you should set
> >>
> > dispatch/callback/retries=-1
> >
> >> regards
> >> Marcel
> >>
> >>> dispatch/callback/delay=2000
> >>>
> >>> dispatch/callback/pingInterval=2000
> >>>
> >>> dispatch/callback/plugin/socket_ssl/multiThreaded=false
> >>>
> >>> #client configuration
> >>>
> >>> pingInterval=2000
> >>>
> >>> retries=-1
> >>>
> >>> delay=2000
> >>>
> >>>
> >>>
> >>> The problem occurred after having restarted 30 of the agents
running
> >>> on the same box.
> >>>
> >>>
> >>>
> >>> I hope it may help,
> >>>
> >>>
> >>>
> >>> Xavier.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> *From:* owner-xmlblaster at server.xmlBlaster.org
> >>> [mailto:owner-xmlblaster at server.xmlBlaster.org] *On Behalf Of
*David
> >>> Robison
> >>> *Sent:* mercredi 26 septembre 2007 14:46
> >>> *To:* xmlblaster at server.xmlBlaster.org
> >>> *Subject:* Re: [xmlblaster] dead lock
> >>>
> >>>
> >>>
> >>> Can you tell me a little more about the conditions that caused the
> >>> dead lock? We are experiencing a problem that may be related
> >>>
> > (although
> >
> >>> it may be just my wacky code). Any additional information would be
> >>> helpful.
> >>>
> >>> David Robison
> >>>
> >>>
> >>>
> >
------------------------------------------------------------------------
> >
> >>> *From:* Marcel Ruff [mailto:mr at marcelruff.info]
> >>> *To:* xmlblaster at server.xmlBlaster.org
> >>> *Sent:* Wed, 26 Sep 2007 07:03:15 -0400
> >>> *Subject:* Re: [xmlblaster] dead lock
> >>>
> >>> Hi Xavier,
> >>>
> >>> the dead lock is now fixed, the code is available with svn.
> >>>
> >>> thanks for reporting,
> >>> Marcel
> >>>
> >>>
> >>> Xavier Roques wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I'm using Xmlblaster 1.6.
> >>>>
> >>>> I restarted, some connected clients and unfortunately one of my
> >>>>
> > client
> >
> >>>> never connects back :(
> >>>>
> >>>> Even if I restart several times this client, it never successes
to
> >>>> connect.
> >>>>
> >>>> That's why I dumped the threads' stack on the server side and I
> >>>>
> > found
> >
> >>>> the following dead lock (see below)
> >>>>
> >>>> Is there a way to avoid it ?
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Xavier.
> >>>>
> >>>>
> >>>> "XmlBlaster.ssl_socket.SSL.tcpListener-alouettebench17-agent":
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.getConnectionStatusListener
> >
> >>>> s(DispatchManager.java:206)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - waiting to lock
> >>>> <0xdb74d9c0> (a org.xmlBlaster.util.dispatch.DispatchManager)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.toAlive(DispatchManager.jav
> >
> >>>> a:293)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - locked <0xdb7a0930> (a
> >>>> java.lang.Object)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.updateState(Disp
> >
> >>>> atchConnectionsHandler.java:332)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - locked <0xdb7a0f28> (a
> >>>> java.util.ArrayList)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.toAlive(Dispatch
> >
> >>>> ConnectionsHandler.java:302)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnection.handleTransition(Dispatc
> >
> >>>> hConnection.java:575)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - locked <0xdb7b2838> (a
> >>>> org.xmlBlaster.engine.dispatch.CbDispatchConnection)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnection.initialize(DispatchConne
> >
> >>>> ction.java:132)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.initialize(Dispa
> >
> >>>> tchConnectionsHandler.java:179)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - locked <0xdb7a0f28> (a
> >>>> java.util.ArrayList)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.updateProperty(DispatchMana
> >
> >>>> ger.java:160)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.authentication.SessionInfo.updateConnectQos(SessionInfo.j
> >
> >>>> ava:513)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.authentication.Authenticate.connect(Authenticate.java:276
> >
> >>>> )
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.authentication.AuthenticateProtector.connect(Authenticate
> >
> >>>> Protector.java:74)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.authentication.AuthenticateProtector.connect(Authenticate
> >
> >>>> Protector.java:62)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.protocol.socket.HandleClient.handleMessage(HandleClient.j
> >
> >>>> ava:266)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.protocol.socket.HandleClient$1.run(HandleClient.java:379)
> >
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> >
> >>>> .runTask(ThreadPoolExecutor.java:665)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> >
> >>>> .run(ThreadPoolExecutor.java:690)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>> java.lang.Thread.run(Thread.java:619)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | "XmlBlaster.PingTimer":
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.shutdown(Dispatc
> >
> >>>> hConnectionsHandler.java:486)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - waiting to lock
> >>>> <0xdb7a0f28> (a java.util.ArrayList)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.shutdown(DispatchManager.ja
> >
> >>>> va:954)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | - locked <0xdb74d9c0> (a
> >>>> org.xmlBlaster.util.dispatch.DispatchManager)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.givingUpDelivery(DispatchMa
> >
> >>>> nager.java:364)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchManager.toDead(DispatchManager.java
> >
> >>>> :356)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.updateState(Disp
> >
> >>>> atchConnectionsHandler.java:348)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnectionsHandler.toDead(DispatchC
> >
> >>>> onnectionsHandler.java:315)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnection.handleTransition(Dispatc
> >
> >>>> hConnection.java:632)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnection.ping(DispatchConnection.
> >
> >>>> java:359)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>>
> >>>>
> >
org.xmlBlaster.util.dispatch.DispatchConnection.timeout(DispatchConnecti
> >
> >>>> on.java:423)
> >>>> INFO | jvm 1 | 2007/09/25 11:31:29 | at
> >>>> org.xmlBlaster.util.Timeout.run(Timeout.java:189)
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>> --
> >>> Marcel Ruff
> >>> http://www.xmlBlaster.org
> >>>
> >>>
> >> --
> >> Marcel Ruff
> >> http://www.xmlBlaster.org
> >>
> >
> >
> >
> 
> 
> --
> Marcel Ruff
> http://www.xmlBlaster.org