Derby
  1. Derby
  2. DERBY-4351

With 10.1 client and 10.5 server SQLSTATE(null): An error occurred during a deferred connect reset. with executeUpdate in XATest.morph

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.5.3.0
    • Fix Version/s: None
    • Component/s: Network Server
    • Urgency:
      Normal
    • Issue & fix info:
      Newcomer, Repro attached
    • Bug behavior facts:
      Regression

      Description

      Running the 10.1 tests with 10.1 client and 10.5 server I saw the following failure and disconnect:

      FAIL – unexpected exception ****************
      SQLSTATE(null): An error occurred during a deferred connect reset and the connection has been terminated. See chained exceptions for details.
      SQLSTATE(25001): DERBY SQL error: SQLCODE: -1, SQLSTATE: 25001, SQLERRMC: 25001
      org.apache.derby.client.am.DisconnectException: An error occurred during a deferred connect reset and the connection has been terminated. See chained exceptions for details.
      at org.apache.derby.client.net.NetAgent.readDeferredResetConnection(Unknown Source)
      at org.apache.derby.client.net.NetAgent.beginReadChain(Unknown Source)
      at org.apache.derby.client.am.Agent.flow(Unknown Source)
      at org.apache.derby.client.am.Statement.flowExecute(Unknown Source)
      at org.apache.derby.client.am.Statement.executeUpdateX(Unknown Source)
      at org.apache.derby.client.am.Statement.executeUpdate(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.jdbcapi.XATest.morph(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.jdbcapi.XATest.main(Unknown Source)

      To reproduce I used the following script to set up my environment (change for your locations):

      export JAVA_HOME=C:/p4/marsden_trunk/ibm15
      export PATH="$JAVA_HOME/bin;$PATH"
      export JUNIT="C:/svn/tools/junit.jar"
      export ORO="C:/svn/tools/jakarta-oro-2.0.8.jar"
      export TEN5JARS=C:/kmarsden/projects/10.5.3testing/db-derby-10.5.3.0-lib-debug/lib
      export TEN1JARS=c:/kmarsden/svnreleases/jars/10.1.3.1
      export CLASSPATH=".;$JUNIT;$ORO;$TEN5JARS/derby.jar;$TEN5JARS/derbynet.jar;$TEN1JARS/derbytools.jar;$TEN1JARS/derbyclient.jar;$TEN1JARS/derbyTesting.jar"
      java org.apache.derby.tools.sysinfo

      and ran the derbynetclientmats suite. I imagine just running XATest with network client will show the failure too, but have not confirmed.

      I have not narrowed down the course of events that cause the failure but because we are seeing the 25001 error too, I am guessing this is another case where network server is not rolling back before closing a connection after the DERBY-3319 fix. If you run with the latest on the 10.5 branch (with the partial fix for DERBY-1191), you should be able to see where the error is occurring on the network server side.

      I also have not checked to see if this is a problem with versions later than 10.1

        Activity

        Hide
        Rick Hillegas added a comment -

        In mixed client/server testing, the XATest has accumulated the following errors:

        1) An error message formatting difference introduced by 10.4

        2) An open transaction error introduced by 10.5.

        I ran the XATest with a 10.1.3.1 client against the following servers with the following results:

        10.1.3.1 OK
        10.2.2.1 OK
        10.3.3.0 OK

        10.4.2.1 saw these diffs:

        MasterFileName = master/XATest.out
        175 del
        < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        175a175
        > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        177 del
        < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        177a177
        > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        Test Failed.

        10.5.1.1 saw these diffs:

        MasterFileName = master/XATest.out
        63 del
        < A
        64 del
        < -----------
        65 del
        < A
        66 del
        < -----------
        67 del
        < 2001
        68 del
        < 2002
        69 del
        < 2003
        70 del
        < 2005
        71 del
        < 2007
        72 del
        < Correct XAException on starting a global transaction with an active local transaction (autocommit false)
        73 del
        < EXPECTED SQLSTATE(XJ059): Cannot close a connection while a global transaction is still active.
        74 del
        < A
        75 del
        < -----------
        76 del
        < A
        77 del
        < -----------
        78 del
        < 2001
        79 del
        < 2002
        80 del
        < 2003
        81 del
        < 2005
        82 del
        < 2007
        82a63,65
        > FAIL – unexpected exception ****************
        > SQLSTATE(25001): Cannot close a connection while a transaction is still active.
        > java.sql.SQLException: Cannot close a connection while a transaction is still active.
        175 del
        < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        175a158
        > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        177 del
        < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        177a160
        > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction.
        Test Failed.

        Show
        Rick Hillegas added a comment - In mixed client/server testing, the XATest has accumulated the following errors: 1) An error message formatting difference introduced by 10.4 2) An open transaction error introduced by 10.5. I ran the XATest with a 10.1.3.1 client against the following servers with the following results: 10.1.3.1 OK 10.2.2.1 OK 10.3.3.0 OK 10.4.2.1 saw these diffs: MasterFileName = master/XATest.out 175 del < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 175a175 > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 177 del < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 177a177 > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. Test Failed. 10.5.1.1 saw these diffs: MasterFileName = master/XATest.out 63 del < A 64 del < ----------- 65 del < A 66 del < ----------- 67 del < 2001 68 del < 2002 69 del < 2003 70 del < 2005 71 del < 2007 72 del < Correct XAException on starting a global transaction with an active local transaction (autocommit false) 73 del < EXPECTED SQLSTATE(XJ059): Cannot close a connection while a global transaction is still active. 74 del < A 75 del < ----------- 76 del < A 77 del < ----------- 78 del < 2001 79 del < 2002 80 del < 2003 81 del < 2005 82 del < 2007 82a63,65 > FAIL – unexpected exception **************** > SQLSTATE(25001): Cannot close a connection while a transaction is still active. > java.sql.SQLException: Cannot close a connection while a transaction is still active. 175 del < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 175a158 > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 177 del < 01J07 :SQL Warning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. 177a160 > 01J07 :java.sql.SQLWarning: ResultSetHoldability restricted to ResultSet.CLOSE_CURSORS_AT_COMMIT for a global transaction. Test Failed.
        Hide
        Kathey Marsden added a comment -

        Triage for 10.8.

        Show
        Kathey Marsden added a comment - Triage for 10.8.

          People

          • Assignee:
            Unassigned
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development