Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1533

ArrayIndexOutOfBoundsException in DDMReader, on a specific data size

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.2.1, 10.1.3.1
    • Fix Version/s: 10.1.3.2, 10.2.1.6
    • Component/s: Network Server
    • Labels:
      None
    • Environment:

      Description

      As far as I know, this bug is not related to DERBY-428 bug.
      I got this bug both on 10.1.3.1 and 10.1.2.1 - an ArrayIndexOutOfBoundsException in DDMReader (in Network Server).

      To reproduce the bug:
      1. Compile the attached DerbyTest.java
      2. Start the Network Server (startNetworkServer.bat under Windows)
      3. Run: java DerbyTest

      On client side you get:
      org.apache.derby.client.am.DisconnectException: The DDM object is not supported. Unsupported DDM object code point: 0x0
      at org.apache.derby.client.net.NetConnectionReply.doObjnsprmSemantics(Unknown Source)
      at org.apache.derby.client.net.NetConnectionReply.parseCommonError(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.parseExecuteError(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.readExecute(Unknown Source)
      at org.apache.derby.client.net.StatementReply.readExecute(Unknown Source)
      at org.apache.derby.client.net.NetPreparedStatement.readExecute_(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.readExecute(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.flowExecute(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.executeX(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.execute(Unknown Source)
      at DerbyTest.main(DerbyTest.java:479)

      On server side you get:
      java.lang.ArrayIndexOutOfBoundsException
      at java.lang.System.arraycopy(Native Method)
      at org.apache.derby.impl.drda.DDMReader.compressBLayerData(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.ensureBLayerDataInBuffer(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.readNetworkShort(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.readLDStringData(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.readAndSetParams(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA_work(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
      agentThread[DRDAConnThread_11,5,main]
      null
      java.lang.ArrayIndexOutOfBoundsException
      at java.lang.System.arraycopy(Native Method)
      at org.apache.derby.impl.drda.DDMReader.compressBLayerData(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.ensureBLayerDataInBuffer(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.readNetworkShort(Unknown Source)
      at org.apache.derby.impl.drda.DDMReader.readLDStringData(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.readAndSetParams(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA_work(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
      at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

        Attachments

        1. withTests.diff
          9 kB
          Bryan Pendleton
        2. notes.html
          6 kB
          Bryan Pendleton
        3. DerbyTest2.java
          3 kB
          Bryan Pendleton
        4. DerbyTest.java
          40 kB
          Wiktor Lisowicz
        5. ddmreader1.diff
          1 kB
          Bryan Pendleton

          Activity

            People

            • Assignee:
              bryanpendleton Bryan Pendleton
              Reporter:
              ender Wiktor Lisowicz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: