[jira] [Comment Edited] (QPID-7835) dead lock error
[ https://issues.apache.org/jira/browse/QPID-7835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083647#comment-16083647 ] hanfeng edited comment on QPID-7835 at 7/12/17 8:39 AM: I've read the source code and found that this problem still exists in the 6.1.3 version was (Author: hfwork...@163.com): I've read the source code and found that this problem still exists in the latest version > 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: 0.24 >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-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org
[jira] [Comment Edited] (QPID-7835) dead lock error
[ https://issues.apache.org/jira/browse/QPID-7835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063330#comment-16063330 ] Keith Wall edited comment on QPID-7835 at 6/26/17 4:16 PM: --- Hello hanfeng Thanks for reporting. Can you gather a threaddump from the JVM when the deadlock occurs? You can do this on the command line with {{jstack -l }} (jstack is found in the /bin directory beneath {{JAVA_HOME}}). Do you have reliable way to reproduce the problem so I may cause it myself? was (Author: k-wall): Hello hanfeng Thanks for reporting. Can you gather a threaddump from the JVM when the deadlock occurs? {{${JAVA_HOME}/bin/jstack -l }}. Do you have reliable way to reproduce the problem so I may cause it myself? > 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 > > 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-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org