From qpid-dev-return-11215-apmail-incubator-qpid-dev-archive=incubator.apache.org@incubator.apache.org Thu Jul 31 15:58:53 2008 Return-Path: Delivered-To: apmail-incubator-qpid-dev-archive@locus.apache.org Received: (qmail 97527 invoked from network); 31 Jul 2008 15:58:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2008 15:58:53 -0000 Received: (qmail 86526 invoked by uid 500); 31 Jul 2008 15:58:52 -0000 Delivered-To: apmail-incubator-qpid-dev-archive@incubator.apache.org Received: (qmail 86504 invoked by uid 500); 31 Jul 2008 15:58:51 -0000 Mailing-List: contact qpid-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: qpid-dev@incubator.apache.org Delivered-To: mailing list qpid-dev@incubator.apache.org Received: (qmail 86493 invoked by uid 99); 31 Jul 2008 15:58:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 08:58:51 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 15:58:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E6FB7234C18C for ; Thu, 31 Jul 2008 08:58:31 -0700 (PDT) Message-ID: <211242601.1217519911945.JavaMail.jira@brutus> Date: Thu, 31 Jul 2008 08:58:31 -0700 (PDT) From: "Rafael H. Schloming (JIRA)" To: qpid-dev@incubator.apache.org Subject: [jira] Commented: (QPID-1207) 0-10 client throws runtime exceptions when talking to a 0-9 broker In-Reply-To: <1791106555.1217519431881.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/QPID-1207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618734#action_12618734 ] Rafael H. Schloming commented on QPID-1207: ------------------------------------------- I am working on fix for this now. The issue is due to an annoying artifact of the java socket API. If you do a socket.close() from one thread while another thread is reading from the input stream, the other thread does not in fact get a (-1) for EOF as I expected, but rather throws an exception. You need to use shutdownInput() and wait for the other thread to exit before calling socket.close(). > 0-10 client throws runtime exceptions when talking to a 0-9 broker > ------------------------------------------------------------------ > > Key: QPID-1207 > URL: https://issues.apache.org/jira/browse/QPID-1207 > Project: Qpid > Issue Type: Bug > Components: Java Client > Affects Versions: M3 > Reporter: Aidan Skinner > Assignee: Rafael H. Schloming > Priority: Critical > Fix For: M3 > > > The 0-10 Client transport layer does not signal that the socket should be closed anthe IoRecieve thread should terminate. It is forcibly killed with an IoException when the socket is shutdown. > Exception in thread "IoReceive - localhost/127.0.0.1:5672" java.lang.RuntimeException: connection closed > at org.apache.qpid.nclient.Client$1.exception(Client.java:96) > at org.apache.qpid.transport.Connection.exception(Connection.java:148) > at org.apache.qpid.transport.network.Assembler.exception(Assembler.java:112) > at org.apache.qpid.transport.network.InputHandler.exception(InputHandler.java:196) > at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:87) > Caused by: org.apache.qpid.transport.TransportException: error in read thread > ... 1 more > Caused by: java.net.SocketException: Socket closed > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at org.apache.qpid.transport.network.io.IoReceiver.run(IoReceiver.java:70) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.