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

Fatal Error with SSL connections (Nullpointer in System.arraycopy)

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux fasgap11.fireapps.internal 2.6.32-573.7.1.el6.x86_64 #1 SMP Thu Sep 10 13:42:16 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Apache Tomcat/8.0.23

      A DESCRIPTION OF THE PROBLEM :
      We saw the following stack trace from an SSL connection. It matches the trace for OpenJDK bugs JDK-8049855 and JDK-8067755.

      THESE WERE CLOSED AS DUPLICATES OF EACH OTHER.

      That's incorrect, JDK-8067755 should stay closed as a duplicate, but JDK-8049855 should have remained open as the initial report of this issue.

      This appears to be hard to hit, given the infrequency of reports and the number of SSL transactions seen.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Unknown what the client sent (also Java, same version, in this case).

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      SSL message should have been received properly or thow a documented exception
      ACTUAL -
      we saw in this one case the stack trace reported below.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.NullPointerException
      at java.lang.System.arraycopy(Native Method)
      at com.sun.crypto.provider.GCTR.reset(GCTR.java:125)
      at com.sun.crypto.provider.GCTR.doFinal(GCTR.java:116)
      at com.sun.crypto.provider.GaloisCounterMode.doLastBlock(GaloisCounterMode.java:343)
      at com.sun.crypto.provider.GaloisCounterMode.decryptFinal(GaloisCounterMode.java:511)
      at com.sun.crypto.provider.CipherCore.finalNoPadding(CipherCore.java:1023)
      at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:960)
      at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:479)
      at javax.crypto.CipherSpi.bufferCrypt(CipherSpi.java:830)
      at javax.crypto.CipherSpi.engineDoFinal(CipherSpi.java:730)
      at javax.crypto.Cipher.doFinal(Cipher.java:2460)
      at sun.security.ssl.CipherBox.decrypt(CipherBox.java:535)
      at sun.security.ssl.EngineInputRecord.decrypt(EngineInputRecord.java:200)
      at sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:974)
      at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:907)
      at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:781)
      at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
      at org.apache.tomcat.util.net.SecureNioChannel.read(SecureNioChannel.java:455)
      at org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelector.java:173)
      at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:251)
      at org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:232)
      at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:133)
      at org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:177)
      at org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:110)
      at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:416)
      at org.apache.coyote.Request.doRead(Request.java:469)
      at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:338)
      at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:395)
      at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:363)
      at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:190)


      REPRODUCIBILITY :
      This bug can be reproduced rarely.

      CUSTOMER SUBMITTED WORKAROUND :
      retrying appears to have succeeded.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                igerasim Ivan Gerasimov
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: