[
https://issues.apache.org/jira/browse/SSHD-911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16824053#comment-16824053
]
Roberto Deandrea commented on SSHD-911:
---------------------------------------
Hi Lyor,
With your suggested code changes the old deadlock seems definetely FIXED, but
running our test suite I found another thread deadlock.
Attached you can find the file
[[email protected]|mailto:[email protected]]
with the full stack trace reporting the new deadlock.
>From my analisys it seems the the deadlock could be this one :
Thread #2359 LOCKED (lock) WAITFOR (encodeLock)
---
org.apache.sshd.common.session.helpers.AbstractSession.doWritePacket(AbstractSession.java:759)
.........................
--
org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:333)
Thread #2356 WAITFOR (lock) LOCKED (encodeLock)
---
org.apache.sshd.client.session.ClientSessionImpl.signalAuthFailure(ClientSessionImpl.java:138)
....................
---
org.apache.sshd.common.session.helpers.AbstractSession.doWritePacket(AbstractSession.java:766)
The locks are defined as follows:
protected final Object encodeLock = new Object(); defined in
AbstractSession.java
protected final Object lock = new Object(); defined in
AbstractCloseable.java
Can you please help me to fix this new deadlock ?
Kind Regards
Roberto
> Deadlock in Apache SshClient used for local port forwarding
> -----------------------------------------------------------
>
> Key: SSHD-911
> URL: https://issues.apache.org/jira/browse/SSHD-911
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 2.2.0
> Reporter: Roberto Deandrea
> Assignee: Goldstein Lyor
> Priority: Major
> Attachments: [email protected],
> [email protected]
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Hi Lyor,
> We have an Apache SSHD 2.2.0 client and server SSH pair used for local port
> forwarding of different protocols.
> In our lab environment we found that sometimes when the SSH client for any
> reason is disconnecting from the SSH server, a DEADLOCK happens on the
> sshClient regarding the threads in the thread pool.
> We are using builtin nio2 implementation for our SshClient.
> The deadlock is regarding the ClientChannelPendingMessagesQueue class added
> to fix routing problems for local port forwarding in the past.
> Attached you can find the thread dump taken after the deadlock happend.
>
> Can you please troubleshoot this problem ?
> [^[email protected]]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)