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

                 Key: HADOOP-6565
                 URL: https://issues.apache.org/jira/browse/HADOOP-6565
             Project: Hadoop Common
          Issue Type: Bug
          Components: security
    Affects Versions: 0.22.0
            Reporter: Steve Loughran
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to