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 "Chandra Prakash Bhagtani (JIRA)" <ji...@apache.org> on 2009/11/03 11:07:59 UTC

[jira] Created: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Reducers fail with OutOfMemoryError while copying Map outputs
-------------------------------------------------------------

                 Key: HADOOP-6357
                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 0.20.0
            Reporter: Chandra Prakash Bhagtani


Reducers fail while copying Map outputs with following exception

java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:

Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
I even tried with -Xmx6.5g to each reducer but it's still failing 

While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Commented: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Amar Kamat (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773008#action_12773008 ] 

Amar Kamat commented on HADOOP-6357:
------------------------------------

Amazing!!

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-6357.patch
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Commented: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773004#action_12773004 ] 

Amareshwari Sriramadasu commented on HADOOP-6357:
-------------------------------------------------

Can you give more details like the values for configuration parameters such as mapred.job.shuffle.input.buffer.percent and mapred.inmem.merge.threshold, if you are not using default values? 

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Updated: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Chandra Prakash Bhagtani (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandra Prakash Bhagtani updated HADOOP-6357:
---------------------------------------------

    Attachment: HADOOP-6357.patch

this patch is against hadoop-0.20.0 release

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-6357.patch
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Commented: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Chandra Prakash Bhagtani (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772999#action_12772999 ] 

Chandra Prakash Bhagtani commented on HADOOP-6357:
--------------------------------------------------

I ran the job with CDH2 (hadoop 0.20.1+133)

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Commented: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Amareshwari Sriramadasu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773005#action_12773005 ] 

Amareshwari Sriramadasu commented on HADOOP-6357:
-------------------------------------------------

Sorry, didn't see you previous comment. Please ignore my last comment.

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Updated: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Chandra Prakash Bhagtani (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chandra Prakash Bhagtani updated HADOOP-6357:
---------------------------------------------

    Fix Version/s: 0.20.0
           Status: Patch Available  (was: Open)

The problem was related to java int usein ReducerTask ShuffleRamManager reserve method check-
                                      // Wait till the request can be fulfilled...
                                      while ((size + requestedSize) > maxSize) {

The check fails if (size+requestedSize) exceeds Integer.MAX_VALUE and "wraps around" into a negative value thus failing the check. This forces all subsequent requests to keep on reserving the RAM and finally crash the JVM.

My fix is:  while (((long)size + (long)requestedSize) > maxSize) {

It worked!!!!!

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Updated: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Arun C Murthy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arun C Murthy updated HADOOP-6357:
----------------------------------

    Status: Open  (was: Patch Available)

The patch is generated incorrectly, we also need to fix this in trunk.

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-6357.patch
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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


[jira] Commented: (HADOOP-6357) Reducers fail with OutOfMemoryError while copying Map outputs

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773010#action_12773010 ] 

Hadoop QA commented on HADOOP-6357:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12423911/HADOOP-6357.patch
  against trunk revision 832249.

    +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: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/124/console

This message is automatically generated.

> Reducers fail with OutOfMemoryError while copying Map outputs
> -------------------------------------------------------------
>
>                 Key: HADOOP-6357
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6357
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 0.20.0
>            Reporter: Chandra Prakash Bhagtani
>             Fix For: 0.20.0
>
>         Attachments: HADOOP-6357.patch
>
>
> Reducers fail while copying Map outputs with following exception
> java.lang.OutOfMemoryError: Java heap space at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.shuffleInMemory(ReduceTask.java:1539) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.getMapOutput(ReduceTask.java:1432) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.copyOutput(ReduceTask.java:1285) at org.apache.hadoop.mapred.ReduceTask$ReduceCopier$MapOutputCopier.run(ReduceTask.java:1216) ,Error:
> Reducer's memory usage keeps on increasing and ultimately exceeds -Xmx value  
> I even tried with -Xmx6.5g to each reducer but it's still failing 
> While looking into the reducer logs, I found that reducers were doing shuffleInMemory every time, rather than doing shuffleOnDisk

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