Derby
  1. Derby
  2. DERBY-5153

Intermittent ASSERT FAILED Internal Error-- statistics not found in selectivityForConglomerate when running InterruptResilienceTest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: SQL
    • Labels:
      None

      Description

      Cf the enclosed derby.log:

      While executing this statement: "select * from mtTab where i=?", we see this stacktrace:

      org.apache.derby.shared.common.sanity.AssertFailure: ASSERT FAILED Internal Error-- statistics not found in selectivityForConglomerate.
      cd = ConglomerateDescriptor: conglomerateNumber = 1249 name = SQL110325154339720 uuid = f04340b7-012e-ed78-50c3-00005e21fe7a indexable = true
      numKeys = 1
      at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:162)
      at org.apache.derby.shared.common.sanity.SanityManager.THROWASSERT(SanityManager.java:147)
      at org.apache.derby.iapi.sql.dictionary.TableDescriptor.selectivityForConglomerate(TableDescriptor.java:1443)
      at org.apache.derby.impl.sql.compile.PredicateList.selectivity(PredicateList.java:3903)
      at org.apache.derby.impl.sql.compile.FromBaseTable.estimateCost(FromBaseTable.java:1295)
      at org.apache.derby.impl.sql.compile.OptimizerImpl.estimateTotalCost(OptimizerImpl.java:2626)
      at org.apache.derby.impl.sql.compile.OptimizerImpl.costBasedCostOptimizable(OptimizerImpl.java:2172)
      at org.apache.derby.impl.sql.compile.OptimizerImpl.costOptimizable(OptimizerImpl.java:1985)
      at org.apache.derby.impl.sql.compile.FromBaseTable.optimizeIt(FromBaseTable.java:526)
      at org.apache.derby.impl.sql.compile.ProjectRestrictNode.optimizeIt(ProjectRestrictNode.java:316)
      at org.apache.derby.impl.sql.compile.OptimizerImpl.costPermutation(OptimizerImpl.java:1939)
      at org.apache.derby.impl.sql.compile.SelectNode.optimize(SelectNode.java:1916)
      at org.apache.derby.impl.sql.compile.DMLStatementNode.optimizeStatement(DMLStatementNode.java:315)
      at org.apache.derby.impl.sql.compile.CursorNode.optimizeStatement(CursorNode.java:587)
      at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:384)
      at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:85)
      at org.apache.derby.impl.sql.GenericPreparedStatement.rePrepare(GenericPreparedStatement.java:229)
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:409)
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:317)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1686)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(EmbedPreparedStatement.java:284)
      at org.apache.derbyTesting.functionTests.tests.store.InterruptResilienceTest$WorkerThread.run(InterruptResilienceTest.java:414)

      I saw this twice with the enclosed patch to InterruptResilienceTest (adds a test case in preparation for DERBY-5152) - but the error occurs before we execute that fixture, so I think the patch is irrelevant (a third and fourth execution failed to show the issue). I am posting it here in case somebody can guess what could be wrong, I'll run more experiments to see if I can reproduce it. Could it be related to our new index statistics daemon?

      1. remove-asserts.diff
        3 kB
        Knut Anders Hatlen
      2. test.diff
        4 kB
        Knut Anders Hatlen
      3. D5153.java
        2 kB
        Knut Anders Hatlen
      4. derby.log
        74 kB
        Dag H. Wanvik

        Issue Links

          Activity

          Dag H. Wanvik created issue -
          Dag H. Wanvik made changes -
          Field Original Value New Value
          Attachment derby.log [ 12474623 ]
          Dag H. Wanvik made changes -
          Component/s SQL [ 11408 ]
          Knut Anders Hatlen made changes -
          Link This issue is duplicated by DERBY-5169 [ DERBY-5169 ]
          Knut Anders Hatlen made changes -
          Attachment D5153.java [ 12475202 ]
          Knut Anders Hatlen made changes -
          Attachment test.diff [ 12475212 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Attachment remove-asserts.diff [ 12475215 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.8.0.0 [ 12315561 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Link This issue breaks DERBY-5174 [ DERBY-5174 ]
          Dag H. Wanvik made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Rick Hillegas made changes -
          Affects Version/s 10.8.1.1 [ 12316356 ]
          Affects Version/s 10.8.1.0 [ 12315561 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.0 [ 12315561 ]
          Rick Hillegas made changes -
          Affects Version/s 10.8.1.2 [ 12316362 ]
          Affects Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.2 [ 12316362 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Gavin made changes -
          Workflow jira [ 12608654 ] Default workflow, editable Closed status [ 12801721 ]

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Dag H. Wanvik
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development