You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Scott Chen (JIRA)" <ji...@apache.org> on 2010/12/20 20:03:01 UTC

[jira] Commented: (MAPREDUCE-2224) Synchronization bugs in JvmManager

    [ https://issues.apache.org/jira/browse/MAPREDUCE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12973302#action_12973302 ] 

Scott Chen commented on MAPREDUCE-2224:
---------------------------------------

Good catch!
I have a question. Is the following part necessary? The method kill() is already synchronized.
{code}
@@ -493,7 +501,9 @@ class JvmManager {
           // Check inital context before issuing a kill to prevent situations
           // where kill is issued before task is launched.
           if (initalContext != null && initalContext.env != null) {
-            initalContext.pid = jvmIdToPid.get(jvmId);
+            synchronized (JvmManagerForType.this) {
+              initalContext.pid = jvmIdToPid.get(jvmId);
+            }
{code}

> Synchronization bugs in JvmManager
> ----------------------------------
>
>                 Key: MAPREDUCE-2224
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2224
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: tasktracker
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2224-cdh3.txt, mapreduce-2224.txt, mapreduce-2224.txt
>
>
> JvmManager.JvmManagerForType has several HashMap members that are inconsistently synchronized. I've seen sporadic NPEs in the 0.20 version of this code which has similar bugs.

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