Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1823

Memory leak on windows in SSHD ServerSession

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.4, 2.3.12, 4.0.0.M3, 2.4.3
    • Component/s: None
    • Labels:
      None

      Description

      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 :

      @echo ON
      :again
      
      CALL launch-javaprobe.bat com.eurofins.nagios.probe.ssh.SSHEcho --hostname
      Localhost --login karaf --password karaf --sshport 8101
      ECHO .
      goto again
      

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

        Issue Links

          Activity

          Hide
          jwcarman James Carman added a comment -

          Is this Windows as a host or client?

          Show
          jwcarman James Carman added a comment - Is this Windows as a host or client?
          Hide
          danttran Dan Tran added a comment -

          This sounds very critical for those app which allow access karaf shell

          Show
          danttran Dan Tran added a comment - This sounds very critical for those app which allow access karaf shell
          Hide
          hekonsek Henryk Konsek added a comment -

          Hi Guillaume Nodet,

          Can this affect Karaf 2.3 i.e. Fuse 6.1?

          Cheers.

          Show
          hekonsek Henryk Konsek added a comment - Hi Guillaume Nodet , Can this affect Karaf 2.3 i.e. Fuse 6.1? Cheers.
          Hide
          gnt Guillaume Nodet added a comment -

          A critical leak on ssh sessions was fixed in SSHD 0.14.0, so this could well affect all Karaf versions that use older versions of SSHD.

          Show
          gnt Guillaume Nodet added a comment - A critical leak on ssh sessions was fixed in SSHD 0.14.0, so this could well affect all Karaf versions that use older versions of SSHD.
          Hide
          gnt Guillaume Nodet added a comment -

          An ssh session leak was fixed in SSHD 0.14.0

          Show
          gnt Guillaume Nodet added a comment - An ssh session leak was fixed in SSHD 0.14.0

            People

            • Assignee:
              gnt Guillaume Nodet
              Reporter:
              gnt Guillaume Nodet
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development