Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      jcarder identified this deadlock in branch-1 (though it may also be present in trunk):

      • Counters.size() is synchronized and locks Counters before Group
      • Counters.Group.getCounterForName() is synchronized and calls through to Counters.size()

      This creates a potential cycle which could cause a deadlock (though probably quite rare in practice)

      1. 1_jcarder_result_0.dot.png
        32 kB
        Todd Lipcon
      2. MAPREDUCE-4359.patch
        2 kB
        Tom White

        Activity

        Hide
        tomwhite Tom White added a comment -

        Here's a patch to impose a fixed lock acquisition order (Counters then Group), which removes the jcarder warning.

        Show
        tomwhite Tom White added a comment - Here's a patch to impose a fixed lock acquisition order (Counters then Group), which removes the jcarder warning.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12533475/MAPREDUCE-4359.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/2515//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12533475/MAPREDUCE-4359.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-MAPREDUCE-Build/2515//console This message is automatically generated.
        Hide
        tlipcon Todd Lipcon added a comment -

        Patch looks good to me. If this is in trunk we should do a trunk patch at the same time, though.

        Show
        tlipcon Todd Lipcon added a comment - Patch looks good to me. If this is in trunk we should do a trunk patch at the same time, though.
        Hide
        tomwhite Tom White added a comment -

        The counters code is different in trunk since MAPREDUCE-901 so this change doesn't apply. We should do a separate jcarder run for trunk though.

        Show
        tomwhite Tom White added a comment - The counters code is different in trunk since MAPREDUCE-901 so this change doesn't apply. We should do a separate jcarder run for trunk though.
        Hide
        tlipcon Todd Lipcon added a comment -

        Gotcha. +1, then.

        Show
        tlipcon Todd Lipcon added a comment - Gotcha. +1, then.
        Hide
        tomwhite Tom White added a comment -

        I just committed this. (I ran unit tests and test-patch and both looked OK.)

        Show
        tomwhite Tom White added a comment - I just committed this. (I ran unit tests and test-patch and both looked OK.)
        Hide
        mattf Matt Foley added a comment -

        Closed upon release of Hadoop 1.2.0.

        Show
        mattf Matt Foley added a comment - Closed upon release of Hadoop 1.2.0.

          People

          • Assignee:
            tomwhite Tom White
            Reporter:
            tlipcon Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development