You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Konstantin Shvachko (JIRA)" <ji...@apache.org> on 2006/04/14 02:29:00 UTC

[jira] Created: (HADOOP-135) Potential deadlock in JobTracker.

Potential deadlock in JobTracker.
---------------------------------

         Key: HADOOP-135
         URL: http://issues.apache.org/jira/browse/HADOOP-135
     Project: Hadoop
        Type: Bug

    Reporter: Konstantin Shvachko


org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
locks resources in this order
                synchronized (jobs) {
                    synchronized (jobInitQueue) {
                        synchronized (jobsByArrival) {

org.apache.hadoop.mapred.JobTracker.submitJob()
locks resources in a different order
        synchronized (jobs) {
            synchronized (jobsByArrival) {
                synchronized (jobInitQueue) {

This potentially can lead to a deadlock.
Unless there is common lock on top of it in which case these
three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-135) Potential deadlock in JobTracker.

Posted by "Sameer Paranjpye (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-135?page=all ]

Sameer Paranjpye updated HADOOP-135:
------------------------------------

    Fix Version: 0.3
        Version: 0.1.0
      Assign To: Owen O'Malley

> Potential deadlock in JobTracker.
> ---------------------------------
>
>          Key: HADOOP-135
>          URL: http://issues.apache.org/jira/browse/HADOOP-135
>      Project: Hadoop
>         Type: Bug

>   Components: mapred
>     Versions: 0.1.0
>     Reporter: Konstantin Shvachko
>     Assignee: Owen O'Malley
>      Fix For: 0.3

>
> org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
> locks resources in this order
>                 synchronized (jobs) {
>                     synchronized (jobInitQueue) {
>                         synchronized (jobsByArrival) {
> org.apache.hadoop.mapred.JobTracker.submitJob()
> locks resources in a different order
>         synchronized (jobs) {
>             synchronized (jobsByArrival) {
>                 synchronized (jobInitQueue) {
> This potentially can lead to a deadlock.
> Unless there is common lock on top of it in which case these
> three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-135) Potential deadlock in JobTracker.

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-135?page=all ]

Owen O'Malley updated HADOOP-135:
---------------------------------

    Attachment: fix-lock-order.patch

Reverse the order of locking for the two fields so that they are always acquired in the same order.

> Potential deadlock in JobTracker.
> ---------------------------------
>
>          Key: HADOOP-135
>          URL: http://issues.apache.org/jira/browse/HADOOP-135
>      Project: Hadoop
>         Type: Bug

>   Components: mapred
>     Versions: 0.1.0
>     Reporter: Konstantin Shvachko
>     Assignee: Owen O'Malley
>      Fix For: 0.4.0
>  Attachments: fix-lock-order.patch
>
> org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
> locks resources in this order
>                 synchronized (jobs) {
>                     synchronized (jobInitQueue) {
>                         synchronized (jobsByArrival) {
> org.apache.hadoop.mapred.JobTracker.submitJob()
> locks resources in a different order
>         synchronized (jobs) {
>             synchronized (jobsByArrival) {
>                 synchronized (jobInitQueue) {
> This potentially can lead to a deadlock.
> Unless there is common lock on top of it in which case these
> three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-135) Potential deadlock in JobTracker.

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-135?page=all ]

Doug Cutting updated HADOOP-135:
--------------------------------

    Component: mapred

> Potential deadlock in JobTracker.
> ---------------------------------
>
>          Key: HADOOP-135
>          URL: http://issues.apache.org/jira/browse/HADOOP-135
>      Project: Hadoop
>         Type: Bug

>   Components: mapred
>     Reporter: Konstantin Shvachko

>
> org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
> locks resources in this order
>                 synchronized (jobs) {
>                     synchronized (jobInitQueue) {
>                         synchronized (jobsByArrival) {
> org.apache.hadoop.mapred.JobTracker.submitJob()
> locks resources in a different order
>         synchronized (jobs) {
>             synchronized (jobsByArrival) {
>                 synchronized (jobInitQueue) {
> This potentially can lead to a deadlock.
> Unless there is common lock on top of it in which case these
> three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HADOOP-135) Potential deadlock in JobTracker.

Posted by "Sameer Paranjpye (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-135?page=all ]

Sameer Paranjpye updated HADOOP-135:
------------------------------------

    Fix Version: 0.4
                     (was: 0.3)

> Potential deadlock in JobTracker.
> ---------------------------------
>
>          Key: HADOOP-135
>          URL: http://issues.apache.org/jira/browse/HADOOP-135
>      Project: Hadoop
>         Type: Bug

>   Components: mapred
>     Versions: 0.1.0
>     Reporter: Konstantin Shvachko
>     Assignee: Owen O'Malley
>      Fix For: 0.4

>
> org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
> locks resources in this order
>                 synchronized (jobs) {
>                     synchronized (jobInitQueue) {
>                         synchronized (jobsByArrival) {
> org.apache.hadoop.mapred.JobTracker.submitJob()
> locks resources in a different order
>         synchronized (jobs) {
>             synchronized (jobsByArrival) {
>                 synchronized (jobInitQueue) {
> This potentially can lead to a deadlock.
> Unless there is common lock on top of it in which case these
> three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HADOOP-135) Potential deadlock in JobTracker.

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HADOOP-135?page=all ]
     
Doug Cutting resolved HADOOP-135:
---------------------------------

    Resolution: Fixed

I just committed this.  Thanks, Owen.

> Potential deadlock in JobTracker.
> ---------------------------------
>
>          Key: HADOOP-135
>          URL: http://issues.apache.org/jira/browse/HADOOP-135
>      Project: Hadoop
>         Type: Bug

>   Components: mapred
>     Versions: 0.1.0
>     Reporter: Konstantin Shvachko
>     Assignee: Owen O'Malley
>      Fix For: 0.4.0
>  Attachments: fix-lock-order.patch
>
> org.apache.hadoop.mapred.JobTracker.RetireJobs.run()
> locks resources in this order
>                 synchronized (jobs) {
>                     synchronized (jobInitQueue) {
>                         synchronized (jobsByArrival) {
> org.apache.hadoop.mapred.JobTracker.submitJob()
> locks resources in a different order
>         synchronized (jobs) {
>             synchronized (jobsByArrival) {
>                 synchronized (jobInitQueue) {
> This potentially can lead to a deadlock.
> Unless there is common lock on top of it in which case these
> three locks are redundant.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira