org.apache.sshd.common.util.buffer.BufferException: Underflow

Atlassian JIRA | David Chevell | 5 months ago
  1. 0

    h3. Summary _"BufferException: Underflow"_ warning is frequently logged out of SSHD server in Bamboo. h3. Steps to Reproduce At this stage the cause and steps to reproduce this issue are unknown. h3. Excepted Results Exception is well-handled. h3. Actual Results Under certain circumstances the following errors are found in _atlassian-bamboo.log_: {code:java|title=atlassian-bamboo.log} 2016-06-01 17:25:01,742 WARN [sshd-SshServer[491791c4]-nio2-thread-4] [ServerSessionImpl] exceptionCaught(ServerSessionImpl[72c0dd86-6efb-4b44-b39a-e05979b1b8f1@/127.0.0.1:49136])[state=Opened] BufferException: Underflow {code} _TRACE_ log: {code:java|title=atlassian-bamboo.log} 2016-06-01 13:08:17,433 TRACE [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] decode(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543]) packet #11 [chunk #1](5/5) 61 00 00 00 00 2016-06-01 13:08:17,434 TRACE [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] doHandleMessage(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543]) process SSH_MSG_CHANNEL_CLOSE 2016-06-01 13:08:17,434 TRACE [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] decode(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543]) packet #12 [chunk #1](29/29) 01 00 00 00 0b 00 00 00 14 64 69 73 63 6f 6e 6e 65 63 74 65 64 20 62 79 20 75 73 65 72 2016-06-01 13:08:17,434 TRACE [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] doHandleMessage(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543]) process SSH_MSG_DISCONNECT 2016-06-01 13:08:17,434 WARN [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] exceptionCaught(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543])[state=Opened] BufferException: Underflow 2016-06-01 13:08:17,434 DEBUG [sshd-SshServer[7a2cdaa7]-nio2-thread-7] [ServerSessionImpl] exceptionCaught(ServerSessionImpl[a55d4e4f-46a4-4da2-b33e-5737fb3e399e@/127.0.0.1:45543])[state=Opened] details org.apache.sshd.common.util.buffer.BufferException: Underflow at org.apache.sshd.common.util.buffer.Buffer.ensureAvailable(Buffer.java:411) at org.apache.sshd.common.util.buffer.Buffer.getUInt(Buffer.java:155) at org.apache.sshd.common.util.buffer.Buffer.getInt(Buffer.java:150) at org.apache.sshd.common.util.buffer.ByteArrayBuffer.getString(ByteArrayBuffer.java:160) at org.apache.sshd.common.util.buffer.Buffer.getString(Buffer.java:180) at org.apache.sshd.common.session.helpers.AbstractSession.handleDisconnect(AbstractSession.java:641) at org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:493) at org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:463) at org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1325) at org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:424) at org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:67) at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:285) at org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:265) at org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:262) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:37) at java.security.AccessController.doPrivileged(Native Method) at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:34) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.Invoker$2.run(Invoker.java:218) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} h3. Notes To our knowledge there is no known impact or user-visible effect from these exceptions, and ssh-related behavior is otherwise normal. h3. Workaround No known workaround.

    Atlassian JIRA | 5 months ago | David Chevell
    org.apache.sshd.common.util.buffer.BufferException: Underflow

    Root Cause Analysis

    1. org.apache.sshd.common.util.buffer.BufferException

      Underflow

      at org.apache.sshd.common.util.buffer.Buffer.ensureAvailable()
    2. org.apache.sshd
      AbstractSessionIoHandler.messageReceived
      1. org.apache.sshd.common.util.buffer.Buffer.ensureAvailable(Buffer.java:411)
      2. org.apache.sshd.common.util.buffer.Buffer.getUInt(Buffer.java:155)
      3. org.apache.sshd.common.util.buffer.Buffer.getInt(Buffer.java:150)
      4. org.apache.sshd.common.util.buffer.ByteArrayBuffer.getString(ByteArrayBuffer.java:160)
      5. org.apache.sshd.common.util.buffer.Buffer.getString(Buffer.java:180)
      6. org.apache.sshd.common.session.helpers.AbstractSession.handleDisconnect(AbstractSession.java:641)
      7. org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:493)
      8. org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:463)
      9. org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1325)
      10. org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:424)
      11. org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:67)
      11 frames
    3. Apache Mina SSHD :: Core
      Nio2CompletionHandler$1.run
      1. org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:285)
      2. org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:265)
      3. org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:262)
      4. org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:37)
      4 frames
    4. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    5. Apache Mina SSHD :: Core
      Nio2CompletionHandler.completed
      1. org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:34)
      1 frame
    6. Java RT
      Thread.run
      1. sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
      2. sun.nio.ch.Invoker$2.run(Invoker.java:218)
      3. sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      6. java.lang.Thread.run(Thread.java:745)
      6 frames