Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-6565

AbstractDelegationTokenSecretManager.stopThreads() will NPE if called before startThreads()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 0.22.0
    • None
    • security
    • None

    Description

      Looking at the code for starting/stopping SecretManagers, it seems to me that AbstractDelegationTokenSecretManager.stopThreads() assumes that tokenRemoverThread is never null. That assumption is only valid if AbstractDelegationTokenSecretManager.startThreads() was called first.

      the call to tokenRemoverThread.interrupt() should be guarded with a check for tokenRemoverThread!=null

      I haven't encountered this in the field yet, but it should be trivial to replicate in a test and then fix.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: