Derby
  1. Derby
  2. DERBY-1430

Test parameterMapping.java often fails with DerbyNetClient on Solarisx86

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: None
    • Component/s: Test
    • Labels:
      None
    • Environment:
      derbyall on Solaris x86.
    • Urgency:
      Normal
    • Bug behavior facts:
      Regression Test Failure

      Description

      parameterMapping.java has lately failed about every other day in the nightly test on Solaris x86. First time seen on June 4. (Note that the computer that this is run on has had its disk cache turned off lately. Maybe there is a connection?) The test gets the following exception:

      FAIL unexpected exception - (58009):Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.java.sql.SQLException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.
      at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source)
      at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.jdbcapi.parameterMapping.main(Unknown Source)
      Caused by: org.apache.derby.client.am.DisconnectException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.
      at org.apache.derby.client.net.Reply.fill(Unknown Source)
      at org.apache.derby.client.net.Reply.ensureALayerDataInBuffer(Unknown Source)
      at org.apache.derby.client.net.Reply.readDssHeader(Unknown Source)
      at org.apache.derby.client.net.Reply.startSameIdChainParse(Unknown Source)
      at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source)
      at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source)
      at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source)
      at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source)
      at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source)
      at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source)
      ... 2 more

      1. derby.log
        12 kB
        Øystein Grøvlen

        Activity

        Hide
        Øystein Grøvlen added a comment -

        I have attached the derby.log from a nightly test that failed.

        Show
        Øystein Grøvlen added a comment - I have attached the derby.log from a nightly test that failed.
        Hide
        Mayuresh Nirhali added a comment -

        Here is my analysis on this issue so far:

        This bug is seen on jdbcapi/parameterMapping.java (in DerbyNetClient framework) test *inconsistently so far. I have run this test in standalone manner several times in last few days and have not seen this failure even once. I tried running the derbynetclientmats suite and have seen the exact failure only once. The platform here is identical to the one specified in JIRA entry, SolX86,v10 with jvm1.5.

        However, I could reproduce this failure in standalone manner while my machine is running derbynetclientmats suite simulteneously. Here, I suspect some sort of race condition between clients trying to connect to server listening at port 1527. Another type of error similar to the one mentioned in JIRA entry can also be observed for the same test, when the test is run in this scenario. The other error seen is as below,

        <snip>
        > FAIL unexpected exception - (58009):Insufficient data while reading from the
        network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.java.sql.SQLException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.
        > Caused by: org.apache.derby.client.am.DisconnectException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only
        -1 bytes. The connection has been terminated.
        > ... 2 more
        Test Failed.
        </snip>

        I also looked at the test report history and found that the exact error was seen on June 2nd (r411220) first, but with a different test. A lot of other tests have failed since then due to same issue. This means that this issue is not particular to the test, paramaterMapping.java.

        In the recent past, this issue is seen only with the test, parameterMapping.java, but inconsistently. Also, this seems to happen only when bunch of tests (suite) is run in DerbyNetClient framework.

        I haven't got to the root cause of this yet. I would like to understand how does the harness handle client requests ? Can 2 requests be active/valid in any way at a time ?? any pointers on harness design would be very helpful.

        any inputs on what other info could help and how to gather ??

        Show
        Mayuresh Nirhali added a comment - Here is my analysis on this issue so far: This bug is seen on jdbcapi/parameterMapping.java (in DerbyNetClient framework) test *inconsistently so far. I have run this test in standalone manner several times in last few days and have not seen this failure even once. I tried running the derbynetclientmats suite and have seen the exact failure only once. The platform here is identical to the one specified in JIRA entry, SolX86,v10 with jvm1.5. However, I could reproduce this failure in standalone manner while my machine is running derbynetclientmats suite simulteneously. Here, I suspect some sort of race condition between clients trying to connect to server listening at port 1527. Another type of error similar to the one mentioned in JIRA entry can also be observed for the same test, when the test is run in this scenario. The other error seen is as below, <snip> > FAIL unexpected exception - (58009):Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.java.sql.SQLException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated. > Caused by: org.apache.derby.client.am.DisconnectException: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated. > ... 2 more Test Failed. </snip> I also looked at the test report history and found that the exact error was seen on June 2nd (r411220) first, but with a different test. A lot of other tests have failed since then due to same issue. This means that this issue is not particular to the test, paramaterMapping.java. In the recent past, this issue is seen only with the test, parameterMapping.java, but inconsistently. Also, this seems to happen only when bunch of tests (suite) is run in DerbyNetClient framework. I haven't got to the root cause of this yet. I would like to understand how does the harness handle client requests ? Can 2 requests be active/valid in any way at a time ?? any pointers on harness design would be very helpful. any inputs on what other info could help and how to gather ??
        Hide
        Mayuresh Nirhali added a comment -

        On further analysis,

        I am getting sure that this failure is due to server instance being dropped prematurely before completion of the test. I suspect tht, initially when the client tries to connect to a Server thread, it does not connect to the newly created thread, but instead gets hooked to the already running thread. This thread then exits before the test is complete and hence this failure is seen.

        It is very difficult to reproduce this bug in the exact setup where it is seen (nightly test runs).

        Similar errors have been observed for couple of tests that are run after this particular test which are,
        junitTests/derbyNet/CompatibilityTest.java
        jdbcapi/xaSimplePositive.sql

        Occasionally, the test before parameterMapping.java have found to be failed with
        java.net.ConnectException : Error connecting to server ....
        see test reports for 9th July.

        The operating platform is SolX86 and this issue is not seen on any other platform.

        Show
        Mayuresh Nirhali added a comment - On further analysis, I am getting sure that this failure is due to server instance being dropped prematurely before completion of the test. I suspect tht, initially when the client tries to connect to a Server thread, it does not connect to the newly created thread, but instead gets hooked to the already running thread. This thread then exits before the test is complete and hence this failure is seen. It is very difficult to reproduce this bug in the exact setup where it is seen (nightly test runs). Similar errors have been observed for couple of tests that are run after this particular test which are, junitTests/derbyNet/CompatibilityTest.java jdbcapi/xaSimplePositive.sql Occasionally, the test before parameterMapping.java have found to be failed with java.net.ConnectException : Error connecting to server .... see test reports for 9th July. The operating platform is SolX86 and this issue is not seen on any other platform.
        Hide
        Ole Solberg added a comment -

        Same symptom seen in testing 10.2.1.1:
        OS: Linux 2.6.9-34.ELsmp
        JVM: Sun Microsystems Inc. 1.4.2_02
        Test: derbyall/derbynetclientmats/derbynetmats.fail:jdbcapi/SURTest_ij.sql

        Log: http://www.multinet.no/~solberg/public/Apache/10.2.1.1_RC/jvm1.4/testlog/lin/436991-derbyall_diff.txt

        <snip>

            • Start: SURTest_ij jdk1.4.2_02 DerbyNetClient derbynetmats:jdbcapi 2006-08-29 11:12:35 ***
              1 del
              < CONNECTION0* - jdbc:derby://xxxFILTERED_HOSTNAMExxx:1527/SURTest;create=true
              2 del
              < * = current connection
              2a1
              > ERROR 58009: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated.
              4 del
              < ij(CONNECTION1)> autocommit off;
              </snip>
        Show
        Ole Solberg added a comment - Same symptom seen in testing 10.2.1.1: OS: Linux 2.6.9-34.ELsmp JVM: Sun Microsystems Inc. 1.4.2_02 Test: derbyall/derbynetclientmats/derbynetmats.fail:jdbcapi/SURTest_ij.sql Log: http://www.multinet.no/~solberg/public/Apache/10.2.1.1_RC/jvm1.4/testlog/lin/436991-derbyall_diff.txt <snip> Start: SURTest_ij jdk1.4.2_02 DerbyNetClient derbynetmats:jdbcapi 2006-08-29 11:12:35 *** 1 del < CONNECTION0* - jdbc:derby://xxxFILTERED_HOSTNAMExxx:1527/SURTest;create=true 2 del < * = current connection 2a1 > ERROR 58009: Insufficient data while reading from the network - expected a minimum of 6 bytes and received only -1 bytes. The connection has been terminated. 4 del < ij(CONNECTION1)> autocommit off; </snip>
        Hide
        Rick Hillegas added a comment -

        Moving to 10.2.2.0.

        Show
        Rick Hillegas added a comment - Moving to 10.2.2.0.
        Show
        Knut Anders Hatlen added a comment - Marking as invalid since the logs indicate that multiple network tests were running simultaneously on the same machine. http://www.multinet.no/~solberg/public/Apache/Derby/testlog/SunOS-5.10_i86pc-i386/411585-derbyall_diff.txt http://www.multinet.no/~solberg/public/Apache/DerbyJvm1.4/testlog/SunOS-5.10_i86pc-i386/411585-derbyall_diff.txt
        Hide
        Øystein Grøvlen added a comment -

        Test is no longer failing

        Show
        Øystein Grøvlen added a comment - Test is no longer failing

          People

          • Assignee:
            Unassigned
            Reporter:
            Øystein Grøvlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development