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

Roberto Deandrea commented on SSHD-908:
---------------------------------------

Hi Lyor,

We reproduce the above problem (leak of handles in java Apache SSHD client 
process) with a simple java program on my linux box using the latest version of 
Apache SDHD libraries.

In the attached  file repro.zip you can find the java program used to replicate 
the problem bundled as a maven/eclipse project.

Repro environment:

uname -a : Linux LAP-PC-114B 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 
12 17:45:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

java version "1.8.0_144" vers
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

 

The program is a simple SSH client that is connecting to any kind of SSH server 
using a configurable nio2 layer (bultin provided by jvm, mina, netty).

The program starts a local port forwarding (pointing to  a target SSH/SFTP 
server) after having connected to a SSH/SFTP server.

When the SSH server is stopped manually, or the connection to the SSH server is 
lost for any reaason the client wait for 20 secs and reconnect again to the SSH 
server.

We found a leak of handles monitoring process handles (lsof -p <pid java 
process>) during connection lost betweenSSH  client and SSH server  and 
following reconnection.

Checking lsof -p <pid java process>  output I see something like that (repeated 
multiple times......):

java    2624 roberto.deandrea   98w     FIFO               0,12      0t0  
1241926 pipe
java    2624 roberto.deandrea   99u  a_inode               0,13        0    
12678 [eventpoll]

We also found that using SSH client with builtin nio2 implementation (provided 
by oracle jre) NO LEAK of handles happen.

 

Can you troubleshoot this problem ?

Any suggestions ?

 

Thanks in advance

Kind Regards

Roberto Deandrea

 

 

 

 

 

 

 

 

 

 

> Leak of process handles caused by local port forwarding connections
> -------------------------------------------------------------------
>
>                 Key: SSHD-908
>                 URL: https://issues.apache.org/jira/browse/SSHD-908
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Roberto Deandrea
>            Priority: Major
>         Attachments: repro.zip
>
>
> Hi,
> We have build an Apache SSHD Client (based on Apache SSHD 2.1.0) to forward 
> local sockets to target servers.
> Our client is configured to use NIO2 builtin service provider, NIO2 Mina 
> service provider and NIO2 Netty service provider.
> We have detected a leak of handles monitoring the java process with ALL above 
> NIO2 service provider.
> When the limit of handles per process is reached, the java process become 
> unresponsive.
>  
> We suspect that the problem could be into Apache SSHD Client code.
> The problem is reproducible in our lab environment.
>  
> Can you help us troubleshoot this problem and in that case what kind of info 
> you need ?
> Did you see a similar problem before and if so, can you give us a solution ?
>  
> Kind Regards
> Roberto Deandrea
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to