[ 
https://issues.apache.org/jira/browse/YARN-11398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17649114#comment-17649114
 ] 

ASF GitHub Bot commented on YARN-11398:
---------------------------------------

Daniel-009497 commented on code in PR #5233:
URL: https://github.com/apache/hadoop/pull/5233#discussion_r1051729343


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/security/DelegationTokenRenewer.java:
##########
@@ -1017,12 +1017,26 @@ public void run() {
                     "Exhausted max retry attempts {} in token renewer "
                         + "thread for {}",
                     tokenRenewerThreadRetryMaxAttempts, 
evt.getApplicationId());
+                continue;
               }
             }
           } catch (Exception e) {
             LOG.info("Problem in submitting renew tasks in token renewer "
                 + "thread.", e);
+            continue;
           }
+
+          // For normally finished DT renew event, it should be removed from 
futures.
+          futures.remove(evt);
+        }
+
+        // If the cluster is idle for some time, futures map is empty or no 
event handler found which may still cause high CPU utilization
+        // Therefore a short nap should be added here.
+        try {
+          Thread.sleep(1000);

Review Comment:
   Giving up CPU, 





> ResourceManager DelegationTokenRenewer timeout feature may cause high 
> utilization of CPU and object leak.
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-11398
>                 URL: https://issues.apache.org/jira/browse/YARN-11398
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 3.3.1, 3.3.2, 3.3.3, 3.3.4
>            Reporter: Daniel Ma
>            Priority: Major
>              Labels: pull-request-available
>
> ResourceManager DelegationTokenRenewer timeout feature may cause high 
> utilization of CPU and object leak.
> 1-If yarn cluster is in idle state, that is almost no token renewer event 
> triggered, the DelegationTokenRenewerPoolTracker thread will do nothing but 
> dead loop, it will cause high CPU utilization.
> 2-The renewer event is hold in a map named futures, there is no removal logic 
> , the map will become increasingly big with time going by.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to