Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215790

Delegated task created by SSLEngine throws java.nio.BufferUnderflowException

XMLWordPrintable

    • b08
    • x86_64
    • linux
    • Verified

        ADDITIONAL SYSTEM INFORMATION :
        openjdk version "11.0.1" 2018-10-16
        OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
        OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

        A DESCRIPTION OF THE PROBLEM :
        Occasionally we see stack traces like the following on our production servers

        Exception in thread "main" java.nio.BufferUnderflowException
        at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:641)
        at java.base/java.nio.HeapByteBuffer.get(HeapByteBuffer.java:162)
        at java.base/sun.security.ssl.ClientHello$ClientHelloMessage.<init>(ClientHello.java:166)
        at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:803)
        at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392)
        at java.base/sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)
        at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1065)
        at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask$DelegatedAction.run(SSLEngineImpl.java:1052)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/sun.security.ssl.SSLEngineImpl$DelegatedTask.run(SSLEngineImpl.java:999)
        at ... application specific methods ...
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

        Is it expected behavior for delegated tasks created by javax.net.ssl.SSLEngine to throw RuntimeExceptions of type java.nio.BufferUnderflowException?

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Not reproducible, happens occasionally on production servers.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        No RuntimeExceptions are thrown from delegated tasks created by javax.net.ssl.SSLEngine.
        ACTUAL -
        RuntimeExceptions are thrown from delegated tasks created by javax.net.ssl.SSLEngine.

        FREQUENCY : occasionally


              ascarpino Anthony Scarpino
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: