Derby
  1. Derby
  2. DERBY-5087

NPE in istat daemon when encountering critical exception during shutdown

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

          Kristian Waagan created issue -
          Hide
          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
          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
          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
          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.
          Kristian Waagan made changes -
          Field Original Value New Value
          Attachment derby-5087-1a-npe_on_shutdown.diff [ 12472484 ]
          Kristian Waagan made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Kristian Waagan made changes -
          Link This issue is part of DERBY-4939 [ DERBY-4939 ]
          Hide
          Kristian Waagan added a comment -

          Closing, no more work expected on this issue.

          Show
          Kristian Waagan added a comment - Closing, no more work expected on this issue.
          Kristian Waagan made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Fix Version/s 10.8.0.0 [ 12315561 ]
          Resolution Fixed [ 1 ]
          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 -
          Fix Version/s 10.8.1.2 [ 12316362 ]
          Affects Version/s 10.8.1.2 [ 12316362 ]
          Affects Version/s 10.8.1.1 [ 12316356 ]
          Fix Version/s 10.8.1.1 [ 12316356 ]
          Gavin made changes -
          Workflow jira [ 12600514 ] Default workflow, editable Closed status [ 12800862 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          50m 49s 1 Kristian Waagan 02/Mar/11 22:54
          In Progress In Progress Closed Closed
          4d 20h 47m 1 Kristian Waagan 07/Mar/11 19:41

            People

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Development