diff --git a/CHANGES.txt b/CHANGES.txt index 063e1c511e2..04a7ba5aa4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -34,6 +34,9 @@ Trunk (unreleased changes) HADOOP-7045. TestDU fails on systems with local file systems with extended attributes. (eli) + HADOOP-6939. Inconsistent lock ordering in + AbstractDelegationTokenSecretManager. (Todd Lipcon via tomwhite) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java b/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java index fda62bf4ec6..7ed13ff067c 100644 --- a/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java +++ b/src/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenSecretManager.java @@ -95,11 +95,13 @@ extends AbstractDelegationTokenIdentifier> } /** should be called before this object is used */ - public synchronized void startThreads() throws IOException { + public void startThreads() throws IOException { updateCurrentKey(); - running = true; - tokenRemoverThread = new Daemon(new ExpiredTokenRemover()); - tokenRemoverThread.start(); + synchronized (this) { + running = true; + tokenRemoverThread = new Daemon(new ExpiredTokenRemover()); + tokenRemoverThread.start(); + } } /**