You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2017/07/03 12:57:00 UTC

[jira] [Commented] (QPID-7835) dead lock error

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

Keith Wall commented on QPID-7835:
----------------------------------

Thanks for the thread dump, I'll take a look.   Just out of interest, which Broker are you using?   Qpid CPP Broker to Qpid Java Broker?

> dead lock error
> ---------------
>
>                 Key: QPID-7835
>                 URL: https://issues.apache.org/jira/browse/QPID-7835
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: qpid-java-6.1.3
>            Reporter: hanfeng
>         Attachments: jstack.txt
>
>
> When the message server links over time, a message is sent, the caller to perceive the message send timeout, take the initiative to close the session, at the same time links are perceived to request timeout to shut down connection, re link the message server.
> When the link function of doClose to get off the lock _failoverMutex, but did not get a specific lock _messageDeliveryLock to close the session, close the session function close to get to the _messageDeliveryLock _failoverMutex lock, lock wait for link
> Deadlock.
> Modification method.
> In session's close function, add a judgment that you are closing session.
>   public void close(long timeout) throws JMSException
>     	{
>     	{color:red}	if (super.isClosing()) return ;{color}
>         setClosing(true);
>         lockMessageDelivery();
>         try
>         {
>             // We must close down all producers and consumers in an orderly fashion. This is the only method
>             // that can be called from a different thread of control from the one controlling the session.
>             synchronized (getFailoverMutex())
>             {
>                 close(timeout, true);
>             }
>         }
>         finally
>         {
>             unlockMessageDelivery();
>         }
>     }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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