Derby
  1. Derby
  2. DERBY-5547

NSSecurityMechanismTest fixture testNetworkServerSecurityMechanism fails intermittentlyt

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.3.0, 10.9.1.0
    • Fix Version/s: 10.8.3.0, 10.9.1.0
    • Component/s: Test
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      There's an intermittent failure in NSSecurityMechanismTest fixture testNetworkServerSecurityMechanism, which I couldn't find was logged separately.

      This is the stack trace:
      1) testNetworkServerSecurityMechanism(org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest)junit.framework.AssertionFailedError: Timed out waiting for network server to start
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:577)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.setSecurityMechanism(NSSecurityMechanismTest.java:430)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:327)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:116)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)

      The test output printed out this in the console:
      (net)derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:197)
      at java.net.SocketInputStream.read(SocketInputStream.java:116)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.fillReplyBuffer(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.readResult(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.pingWithNoOpen(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.ping(Unknown Source)
      at org.apache.derby.drda.NetworkServerControl.ping(Unknown Source)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerUp(NetworkServerTestSetup.java:625)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerStart(NetworkServerTestSetup.java:694)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:576)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.setSecurityMechanism(NSSecurityMechanismTest.java:430)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:327)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:618)
      at junit.framework.TestCase.runTest(TestCase.java:164)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:116)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.textui.TestRunner.doRun(TestRunner.java:121)
      at junit.textui.TestRunner.start(TestRunner.java:185)
      at junit.textui.TestRunner.main(TestRunner.java:143)
      java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:197)
      at java.net.SocketInputStream.read(SocketInputStream.java:116)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.fillReplyBuffer(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.readResult(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.pingWithNoOpen(Unknown Source)
      at org.apache.derby.impl.drda.NetworkServerControlImpl.ping(Unknown Source)
      at org.apache.derby.drda.NetworkServerControl.ping(Unknown Source)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerUp(NetworkServerTestSetup.java:625)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.pingForServerStart(NetworkServerTestSetup.java:694)
      at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:576)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.setSecurityMechanism(NSSecurityMechanismTest.java:430)
      at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:327)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:618)
      at junit.framework.TestCase.runTest(TestCase.java:164)
      at junit.framework.TestCase.runBare(TestCase.java:130)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:116)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:120)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.framework.TestSuite.runTest(TestSuite.java:230)
      at junit.framework.TestSuite.run(TestSuite.java:225)
      at junit.textui.TestRunner.doRun(TestRunner.java:121)
      at junit.textui.TestRunner.start(TestRunner.java:185)
      at junit.textui.TestRunner.main(TestRunner.java:143)

      I've looked through my nightly test records for earlier occurrences on trunk/linux (this apparently has not happened on windows) , and found the following occurrences:
      2011-12-02 (ibm15)

      Slightly different stack traces were seen in other runs:
      2011-09-22 (ibm15)
      2011-10-09 (ibm15)
      2011-10-21 (ibm15)
      2011-10-31 (ibm16)
      2011-11-10 (ibm15)
      2011-12-12 (ibm16)
      2011-12-14 (ibm15)

      1. d5547-1a.diff
        5 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Hide
          Knut Anders Hatlen added a comment -

          This has the same root cause as DERBY-4201, but it doesn't pick up the fix because it doesn't use NetworkServerTestSetup to start the server. This probably also affects DerbyNetNewServerTest and ServerPropertiesTest.

          Show
          Knut Anders Hatlen added a comment - This has the same root cause as DERBY-4201 , but it doesn't pick up the fix because it doesn't use NetworkServerTestSetup to start the server. This probably also affects DerbyNetNewServerTest and ServerPropertiesTest.
          Hide
          Knut Anders Hatlen added a comment -

          Attaching a patch (d5547-1a.diff) that makes the three tests wait for the network server used by the previous test to shut down completely before they attempt to start a new server.

          Using the repro patch DERBY-4201 to expose the problem more reliably, I ran derbynet._Suite with this fix without seeing timeouts in any of these tests.

          Show
          Knut Anders Hatlen added a comment - Attaching a patch (d5547-1a.diff) that makes the three tests wait for the network server used by the previous test to shut down completely before they attempt to start a new server. Using the repro patch DERBY-4201 to expose the problem more reliably, I ran derbynet._Suite with this fix without seeing timeouts in any of these tests.
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 1222155.

          Show
          Knut Anders Hatlen added a comment - Committed revision 1222155.
          Hide
          Mike Matrigali added a comment -

          this test failed again in 10.8. I plan to backport to 10.8 unless there are objections.

          Show
          Mike Matrigali added a comment - this test failed again in 10.8. I plan to backport to 10.8 unless there are objections.
          Hide
          Mike Matrigali added a comment -

          saw again in head of 10.8 branch, ibm1.4.2, windows:
          http://people.apache.org/~myrnavl/derby_test_results/v10_8/windows/testlog/ibm142/1232727-suites.All_diff.txt
          There was 1 failure:
          1) testNetworkServerSecurityMechanism(org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest)junit.framework.AssertionFailedError: Timed out waiting for network server to start
          at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:573)
          at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.setSecurityMechanism(NSSecurityMechanismTest.java:430)
          at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:327)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
          at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
          at junit.extensions.TestSetup.run(TestSetup.java:25)
          at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
          at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
          at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
          at junit.extensions.TestSetup.run(TestSetup.java:25)

          Show
          Mike Matrigali added a comment - saw again in head of 10.8 branch, ibm1.4.2, windows: http://people.apache.org/~myrnavl/derby_test_results/v10_8/windows/testlog/ibm142/1232727-suites.All_diff.txt There was 1 failure: 1) testNetworkServerSecurityMechanism(org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest)junit.framework.AssertionFailedError: Timed out waiting for network server to start at org.apache.derbyTesting.junit.NetworkServerTestSetup.waitForServerStart(NetworkServerTestSetup.java:573) at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.setSecurityMechanism(NSSecurityMechanismTest.java:430) at org.apache.derbyTesting.functionTests.tests.derbynet.NSSecurityMechanismTest.testNetworkServerSecurityMechanism(NSSecurityMechanismTest.java:327) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:61) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code)) at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25) at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24) at junit.extensions.TestSetup$1.protect(TestSetup.java:21) at junit.extensions.TestSetup.run(TestSetup.java:25)
          Hide
          Mike Matrigali added a comment -

          backported fix to 10.8 branch.

          Show
          Mike Matrigali added a comment - backported fix to 10.8 branch.
          Hide
          Knut Anders Hatlen added a comment -

          [bulk update: close all resolved issues that haven't had any activity the last year]

          Show
          Knut Anders Hatlen added a comment - [bulk update: close all resolved issues that haven't had any activity the last year]

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Myrna van Lunteren
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development