You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by a_bouchama <ab...@gmail.com> on 2012/09/14 10:57:55 UTC

Memory leak with ssh (org.apache.sshd.server.session.ServerSession objects)

Hello,

We use apache-karaf-2.2.9 in windows 2008 server R2.

I've run a lot of Ssh "Echo" in a short time. And the karaf memory peaked,
and we receive out of memory as exception.(see the attached picture 
http://karaf.922171.n3.nabble.com/file/n4026025/Jconsole_Karaf.png )

Running jhat shows some classes that should consume such memory:
class org.apache.activemq.command.ProducerId 21706 955064 
class org.apache.felix.gogo.runtime.Token 46536 930720 
class org.apache.felix.gogo.runtime.Closure 9972 717984 
*class org.apache.sshd.server.session.ServerSession 1662 563418 
class org.apache.mina.transport.socket.nio.NioSocketSession 1662 511896 *
class [Lorg.apache.activemq.command.DataStructure; 48 393984 

The memory leak seems to lie around unclosed ssh server session. 

To reproduce the problem, you have just to run this script "loopsshecho.bat"
that will allow to reproduce rapidly the bug 
http://karaf.922171.n3.nabble.com/file/n4026025/probes.zip probes.zip :

{code}

@echo ON
:again

CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho --hostname
Localhost --login karaf --password karaf --sshport 8101
ECHO .
goto again
{code}

You have to change the parametrs of :
--hostname
--login
--password
--sshport

Best regards,




--
View this message in context: http://karaf.922171.n3.nabble.com/Memory-leak-with-ssh-org-apache-sshd-server-session-ServerSession-objects-tp4026025.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Memory leak with ssh (org.apache.sshd.server.session.ServerSession objects)

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Awesome,

thanks Guillaume

Regards
JB

On 09/14/2012 11:27 AM, Guillaume Nodet wrote:
> I've just raised https://issues.apache.org/jira/browse/KARAF-1823.
> I'm currently working on SSHD so will give it a go asap.
>
> On Fri, Sep 14, 2012 at 11:25 AM, Guillaume Nodet <gnodet@gmail.com
> <ma...@gmail.com>> wrote:
>
>     I'm aware of this issue I think and this is on my todo list.
>
>
>     On Fri, Sep 14, 2012 at 10:57 AM, a_bouchama
>     <abdellatif.bouchama@gmail.com
>     <ma...@gmail.com>> wrote:
>
>         Hello,
>
>         We use apache-karaf-2.2.9 in windows 2008 server R2.
>
>         I've run a lot of Ssh "Echo" in a short time. And the karaf
>         memory peaked,
>         and we receive out of memory as exception.(see the attached picture
>         http://karaf.922171.n3.nabble.com/file/n4026025/Jconsole_Karaf.png )
>
>         Running jhat shows some classes that should consume such memory:
>         class org.apache.activemq.command.ProducerId 21706 955064
>         class org.apache.felix.gogo.runtime.Token 46536 930720
>         class org.apache.felix.gogo.runtime.Closure 9972 717984
>         *class org.apache.sshd.server.session.ServerSession 1662 563418
>         class org.apache.mina.transport.socket.nio.NioSocketSession 1662
>         511896 *
>         class [Lorg.apache.activemq.command.DataStructure; 48 393984
>
>         The memory leak seems to lie around unclosed ssh server session.
>
>         To reproduce the problem, you have just to run this script
>         "loopsshecho.bat"
>         that will allow to reproduce rapidly the bug
>         http://karaf.922171.n3.nabble.com/file/n4026025/probes.zip
>         probes.zip :
>
>         {code}
>
>         @echo ON
>         :again
>
>         CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho
>         --hostname
>         Localhost --login karaf --password karaf --sshport 8101
>         ECHO .
>         goto again
>         {code}
>
>         You have to change the parametrs of :
>         --hostname
>         --login
>         --password
>         --sshport
>
>         Best regards,
>
>
>
>
>         --
>         View this message in context:
>         http://karaf.922171.n3.nabble.com/Memory-leak-with-ssh-org-apache-sshd-server-session-ServerSession-objects-tp4026025.html
>         Sent from the Karaf - User mailing list archive at Nabble.com.
>
>
>
>
>     --
>     ------------------------
>     Guillaume Nodet
>     ------------------------
>     Blog: http://gnodet.blogspot.com/
>     ------------------------
>     FuseSource, Integration everywhere
>     http://fusesource.com
>
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> FuseSource, Integration everywhere
> http://fusesource.com

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Memory leak with ssh (org.apache.sshd.server.session.ServerSession objects)

Posted by Guillaume Nodet <gn...@gmail.com>.
I've just raised https://issues.apache.org/jira/browse/KARAF-1823.
I'm currently working on SSHD so will give it a go asap.

On Fri, Sep 14, 2012 at 11:25 AM, Guillaume Nodet <gn...@gmail.com> wrote:

> I'm aware of this issue I think and this is on my todo list.
>
>
> On Fri, Sep 14, 2012 at 10:57 AM, a_bouchama <
> abdellatif.bouchama@gmail.com> wrote:
>
>> Hello,
>>
>> We use apache-karaf-2.2.9 in windows 2008 server R2.
>>
>> I've run a lot of Ssh "Echo" in a short time. And the karaf memory peaked,
>> and we receive out of memory as exception.(see the attached picture
>> http://karaf.922171.n3.nabble.com/file/n4026025/Jconsole_Karaf.png )
>>
>> Running jhat shows some classes that should consume such memory:
>> class org.apache.activemq.command.ProducerId 21706 955064
>> class org.apache.felix.gogo.runtime.Token 46536 930720
>> class org.apache.felix.gogo.runtime.Closure 9972 717984
>> *class org.apache.sshd.server.session.ServerSession 1662 563418
>> class org.apache.mina.transport.socket.nio.NioSocketSession 1662 511896 *
>> class [Lorg.apache.activemq.command.DataStructure; 48 393984
>>
>> The memory leak seems to lie around unclosed ssh server session.
>>
>> To reproduce the problem, you have just to run this script
>> "loopsshecho.bat"
>> that will allow to reproduce rapidly the bug
>> http://karaf.922171.n3.nabble.com/file/n4026025/probes.zip probes.zip :
>>
>> {code}
>>
>> @echo ON
>> :again
>>
>> CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho --hostname
>> Localhost --login karaf --password karaf --sshport 8101
>> ECHO .
>> goto again
>> {code}
>>
>> You have to change the parametrs of :
>> --hostname
>> --login
>> --password
>> --sshport
>>
>> Best regards,
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Memory-leak-with-ssh-org-apache-sshd-server-session-ServerSession-objects-tp4026025.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> ------------------------
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> FuseSource, Integration everywhere
> http://fusesource.com
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com

Re: Memory leak with ssh (org.apache.sshd.server.session.ServerSession objects)

Posted by Guillaume Nodet <gn...@gmail.com>.
I'm aware of this issue I think and this is on my todo list.

On Fri, Sep 14, 2012 at 10:57 AM, a_bouchama
<ab...@gmail.com>wrote:

> Hello,
>
> We use apache-karaf-2.2.9 in windows 2008 server R2.
>
> I've run a lot of Ssh "Echo" in a short time. And the karaf memory peaked,
> and we receive out of memory as exception.(see the attached picture
> http://karaf.922171.n3.nabble.com/file/n4026025/Jconsole_Karaf.png )
>
> Running jhat shows some classes that should consume such memory:
> class org.apache.activemq.command.ProducerId 21706 955064
> class org.apache.felix.gogo.runtime.Token 46536 930720
> class org.apache.felix.gogo.runtime.Closure 9972 717984
> *class org.apache.sshd.server.session.ServerSession 1662 563418
> class org.apache.mina.transport.socket.nio.NioSocketSession 1662 511896 *
> class [Lorg.apache.activemq.command.DataStructure; 48 393984
>
> The memory leak seems to lie around unclosed ssh server session.
>
> To reproduce the problem, you have just to run this script
> "loopsshecho.bat"
> that will allow to reproduce rapidly the bug
> http://karaf.922171.n3.nabble.com/file/n4026025/probes.zip probes.zip :
>
> {code}
>
> @echo ON
> :again
>
> CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho --hostname
> Localhost --login karaf --password karaf --sshport 8101
> ECHO .
> goto again
> {code}
>
> You have to change the parametrs of :
> --hostname
> --login
> --password
> --sshport
>
> Best regards,
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Memory-leak-with-ssh-org-apache-sshd-server-session-ServerSession-objects-tp4026025.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
------------------------
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
FuseSource, Integration everywhere
http://fusesource.com

Re: Memory leak with ssh (org.apache.sshd.server.session.ServerSession objects)

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the detailed information. We will create a Jira to 
investigate the issue.

Regards
JB

On 09/14/2012 10:57 AM, a_bouchama wrote:
> Hello,
>
> We use apache-karaf-2.2.9 in windows 2008 server R2.
>
> I've run a lot of Ssh "Echo" in a short time. And the karaf memory peaked,
> and we receive out of memory as exception.(see the attached picture
> http://karaf.922171.n3.nabble.com/file/n4026025/Jconsole_Karaf.png )
>
> Running jhat shows some classes that should consume such memory:
> class org.apache.activemq.command.ProducerId 21706 955064
> class org.apache.felix.gogo.runtime.Token 46536 930720
> class org.apache.felix.gogo.runtime.Closure 9972 717984
> *class org.apache.sshd.server.session.ServerSession 1662 563418
> class org.apache.mina.transport.socket.nio.NioSocketSession 1662 511896 *
> class [Lorg.apache.activemq.command.DataStructure; 48 393984
>
> The memory leak seems to lie around unclosed ssh server session.
>
> To reproduce the problem, you have just to run this script "loopsshecho.bat"
> that will allow to reproduce rapidly the bug
> http://karaf.922171.n3.nabble.com/file/n4026025/probes.zip probes.zip :
>
> {code}
>
> @echo ON
> :again
>
> CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho --hostname
> Localhost --login karaf --password karaf --sshport 8101
> ECHO .
> goto again
> {code}
>
> You have to change the parametrs of :
> --hostname
> --login
> --password
> --sshport
>
> Best regards,
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Memory-leak-with-ssh-org-apache-sshd-server-session-ServerSession-objects-tp4026025.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com