You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2014/05/15 03:57:44 UTC

[jira] [Updated] (HADOOP-10489) UserGroupInformation#getTokens and UserGroupInformation#addToken can lead to ConcurrentModificationException

     [ https://issues.apache.org/jira/browse/HADOOP-10489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Kanter updated HADOOP-10489:
-----------------------------------

    Attachment: HADOOP-10489.patch

As suggested in the discussion in HADOOP-10475, I synchronized the methods on the {{subject}} instead of the UGI.  I also added a test that runs a thread that repeatedly calls {{getTokens()}} while the test calls {{addToken(...)}} to cause the CME; it fails without the fix and passes with them.

> UserGroupInformation#getTokens and UserGroupInformation#addToken can lead to ConcurrentModificationException
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-10489
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10489
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Jing Zhao
>            Assignee: Robert Kanter
>         Attachments: HADOOP-10489.patch
>
>
> Currently UserGroupInformation#getTokens and UserGroupInformation#addToken uses UGI's monitor to protect the iteration and modification of Credentials#tokenMap. Per [discussion|https://issues.apache.org/jira/browse/HADOOP-10475?focusedCommentId=13965851&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13965851] in HADOOP-10475, this can still lead to ConcurrentModificationException.



--
This message was sent by Atlassian JIRA
(v6.2#6252)