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

Goldstein Lyor commented on SSHD-911:
-------------------------------------

I have looked in the specified code area and its use, but have not found 
anything suspicious. AFAIK there are no _lock-wait-until_ loops and the order 
of the acquired locks seems consistent.

I have [made a change|https://github.com/apache/mina-sshd/pull/101] that while 
does not explain the deadlock, perhaps mitigates it. Try cloning 
[https://github.com/lgoldstein/mina-sshd/tree/SSHD-911] and using it to see if 
it fixes or at least mitigates the issue - let me know.

 Specifically, the {{ClientChannelPendingMessagesQueue}} is involved only in 
port forwarding code, so it would seem that not only {quote}a quite large 
number of client data connections (i.e 20/30 connections) are flowing to target 
servers.{quote} but some of them are involved in port forwarding. Perhaps we 
can somehow isolate them and figure out what they are doing that may cause a 
deadlock (assuming it always deadlock at the same location).

> 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]
>
>          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)

Reply via email to