[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] minor socket ping/refreshSession method inconsistency?
- To: xmlblaster at server.xmlBlaster.org
- Subject: [xmlblaster] minor socket ping/refreshSession method inconsistency?
- From: "Póka Balázs" <p.balazs at gmail.com>
- Date: Fri, 22 Jun 2007 13:22:32 +0200
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=rYAhlKfbeCFqAbIj+G+0vg+aZEi3mBhJvTe0Ew9qSVYFOf5ieAy5Hcql6ZG9gNreLXGrnKQqGHrv2TEJ9PqmiNAUOjsOvNREDzamozy8WxGvahJIJlkKsI4vfuh2kfapw7AlHxrNB8yG0KI/eEtdkRrQtm8wrhvRccNYO/iUKhs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=EJ/uXwEx9TmPI+6lW2Fznw3hi02ei2y1Sozt1yafXrBLkCFUJy/wEvexwQ2YIUz+vQc4s5pFm8rg1QVKyiHbHTGUC2f4Hft5Ko/VZL1TkLfKwTc8+SokY/YOu0Z4LhFRcuysLOXYwLet7OHbdRBgN7YTX8pIONNfGRQt3TmRlUM=
- Reply-to: xmlblaster at server.xmlBlaster.org
- Sender: owner-xmlblaster at server.xmlBlaster.org
Hi!
I may have found a small problem regarding socket protocol ping invocations.
Let's suppose that a client logged in successfully using the socket protocol. Pinging is enabled, ping timeout 60s. Then I pull the network cable (or remove the default route of the client in a similar way). This has the effect that there are no default routes anymore and any new TCP connection attempt is immediately answered by the kernel with a "No route to host" or similar message. Though
SocketImpl.read(...) does not return (so no IOException or anything else to signal the event that no packets may reach the destination host), I would expect the PingTimer (thread) to notice this after pingTimeout time elapsed and to cause my connection to go into polling mode. However, nothing happens after that time elapsed.
This is the stack trace of the PingTimer thread at that time:
Thread [XmlBlaster.PingTimer] (Suspended)
Object.wait(long) line: not available [native method]
Latch.attempt(long) line: 79
SocketCallbackImpl(RequestReplyExecutor).requestAndBlockForReply(MsgInfo, boolean, boolean) line: 629
SocketConnection.get(String, String) line: 617
ClientDispatchConnection.get(MsgQueueEntry) line: 368
ClientDispatchConnection.doSend(MsgQueueEntry[]) line: 145
ClientDispatchConnection(DispatchConnection).send(MsgQueueEntry[]) line: 231
ClientDispatchConnectionsHandler(DispatchConnectionsHandler).send(MsgQueueEntry[]) line: 435
DispatchWorker.run(ArrayList) line: 75
DispatchManager.putPre(I_QueueEntry[]) line: 561
DispatchManager.putPre(I_QueueEntry) line: 535
RamQueuePlugin.put(I_QueueEntry, boolean) line: 712
XmlBlasterAccess.queueMessage(MsgQueueEntry) line: 792
XmlBlasterAccess.get(GetKey, GetQos) line: 918
XmlBlasterAccess.refreshSession() line: 444
XmlBlasterAccess$1.timeout(Object) line: 412
Timeout.run() line: 189
SocketCallbackImpl(RequestReplyExecutor).requestAndBlockForReply(MsgInfo, boolean, boolean) line: 629 contains the following:
awakened = startSignal.latch.attempt(getResponseTimeout(
msgInfo.getMethodName())); // block max. milliseconds
So I'd expect it to time out after 60s (which is my ping timeout). It did not; instead it turned out that msgInfo.getMethodName() is not a PING, but a GET invocation, so getResponseTimeout returns the wrong timeout. My question is whether this msgInfo should contain a PING MethodName instead of GET. I realize that in
XmlBlasterAccess.refreshSession() line: 444, you call get(GetKey, GetQos), but maybe there should be a separate method for pings, or an additional parameter. As a temporary workaround, I'm setting responseTimeout to 60sec, too.
regards,
Balázs Póka