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

NPE in istat daemon when encountering critical exception during shutdown

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: Services, Store
    • Labels:
      None

      Description

      If the istat daemon encounters a critical error during shutdown and the data dictionary module has been stopped, it will run into a NPE.
      This bug is highly timing-dependent in two ways: the data dictionary module must have been stopped first, and then the istat daemon must encounter a critical error "at the right time".
      I have seen this bug once on my laptop.

        Issue Links

          Activity

          Hide
          kristwaa Kristian Waagan added a comment -

          Here's the stacktrace:

          Exception in thread "index-stat-thread" java.lang.NullPointerException
          at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.disableIndexStatsRefresher(DataDictionaryImpl.java:13745)
          at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.handleFatalErrors(IndexStatisticsDaemonImpl.java:896)
          at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.run(IndexStatisticsDaemonImpl.java:761)

          Show
          kristwaa Kristian Waagan added a comment - Here's the stacktrace: Exception in thread "index-stat-thread" java.lang.NullPointerException at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.disableIndexStatsRefresher(DataDictionaryImpl.java:13745) at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.handleFatalErrors(IndexStatisticsDaemonImpl.java:896) at org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl.run(IndexStatisticsDaemonImpl.java:761)
          Hide
          kristwaa Kristian Waagan added a comment -

          Attaching patch 1a, which removes the possibility of the NPE.
          Also removed unnecessary variable 'daemonStopped', replacing it with 'daemonDisabled' where used.

          Committed to trunk with revision 1076445.

          Show
          kristwaa Kristian Waagan added a comment - Attaching patch 1a, which removes the possibility of the NPE. Also removed unnecessary variable 'daemonStopped', replacing it with 'daemonDisabled' where used. Committed to trunk with revision 1076445.
          Hide
          kristwaa Kristian Waagan added a comment -

          Closing, no more work expected on this issue.

          Show
          kristwaa Kristian Waagan added a comment - Closing, no more work expected on this issue.

            People

            • Assignee:
              kristwaa Kristian Waagan
              Reporter:
              kristwaa Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Development