qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Sim (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5439) [AMQP 1.0 JMS client] Client hangs during connection.close()
Date Thu, 02 Jan 2014 12:34:52 GMT

    [ https://issues.apache.org/jira/browse/QPID-5439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13860176#comment-13860176
] 

Gordon Sim commented on QPID-5439:
----------------------------------

I believe the issue is that the detach is sent without the closed field being specified, and
this is something that proton-c does not yet expose (and in any case the c++ broker doesn't
yet support resumeable links).

I wonder also whether the better behaviour for the JMS client would be to specify closed=true
in Sender::close(), e.g.

{noformat}
Index: amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Sender.java
===================================================================
--- amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Sender.java	(revision 1554791)
+++ amqp-1-0-client/src/main/java/org/apache/qpid/amqp_1_0/client/Sender.java	(working copy)
@@ -395,7 +395,7 @@
         }
         _session.removeSender(this);
         _endpoint.setSource(null);
-        _endpoint.detach();
+        _endpoint.close();
         _closed = true;
 
         try
{noformat}

> [AMQP 1.0 JMS client] Client hangs during connection.close()
> ------------------------------------------------------------
>
>                 Key: QPID-5439
>                 URL: https://issues.apache.org/jira/browse/QPID-5439
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker, Java Client
>    Affects Versions: 0.27
>         Environment: qpid-cpp 0.27 (latest trunk), amqp-1-0-client-jms 0.28-SNAPSHOT
(latest trunk).
>            Reporter: Ulrich Romahn
>            Priority: Blocker
>         Attachments: threaddump-1388121261214.tdump
>
>
> I am connecting to a cpp broker via the amqp-1-0-client-jms client and send 1000 simple
text messages to a queue on the broker. After that, I am opening a second session to receive
those 1000 messages.
> When trying to close the connection (calling connection.close()), the client "hangs".
When I look at the broker (qpid-tool, list connection) I am still seeing this connection open.
> Debugging through the code, shows that there is a lock in the class org.apache.qpid.amqp_1_0.client.Sender
at the following code in method close():
> ...
>         _session.removeSender(this);
>         _endpoint.setSource(null);
>         _endpoint.detach();
>         _closed = true;
>         synchronized(_endpoint.getLock())
>         {
>             while(!_endpoint.isDetached())
>             {
>                 try
>                 {
>                     _endpoint.getLock().wait();
>                 }
>                 catch (InterruptedException e)
>                 {
>                     throw new SenderClosingException(e);
>                 }
>             }
>         }
> It actually seems to hang at the line " _endpoint.getLock().wait(); "
> NOTE: the exact same code works when running against a Java broker 0.24.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message