hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1376639 - in /hadoop/common/branches/branch-1: CHANGES.txt src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java
Date Thu, 23 Aug 2012 18:30:43 GMT
Author: atm
Date: Thu Aug 23 18:30:43 2012
New Revision: 1376639

URL: http://svn.apache.org/viewvc?rev=1376639&view=rev
Log:
MAPREDUCE-2374. "Text File Busy" errors launching MR tasks. Contributed by Andy Isaacson.

Modified:
    hadoop/common/branches/branch-1/CHANGES.txt
    hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java

Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1376639&r1=1376638&r2=1376639&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Thu Aug 23 18:30:43 2012
@@ -189,6 +189,9 @@ Release 1.2.0 - unreleased
 
     MAPREDUCE-4567. Fix failing TestJobKillAndFail in branch-1. (tomwhite)
 
+    MAPREDUCE-2374. "Text File Busy" errors launching MR tasks. (Andy Isaacson
+    via atm)
+
 Release 1.1.0 - unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java?rev=1376639&r1=1376638&r2=1376639&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java
(original)
+++ hadoop/common/branches/branch-1/src/mapred/org/apache/hadoop/mapred/DefaultTaskController.java
Thu Aug 23 18:30:43 2012
@@ -125,8 +125,17 @@ public class DefaultTaskController exten
 
       String commandFile = writeCommand(cmdLine, rawFs, p);
       rawFs.setPermission(p, TaskController.TASK_LAUNCH_SCRIPT_PERMISSION);
+      /*
+       * MAPREDUCE-2374: if another thread fork(2)ed a child process during the
+       * window when writeCommand (above) had taskjvm.sh open for write, that
+       * child process might still have a writeable fd open to the script.
+       *
+       * If we run the script with "bash -c /path/to/taskjvm.sh", then bash
+       * would try to execve(2) the script and get ETXTBSY.  Instead, just have
+       * bash interpret the script with "bash /path/to/taskjvm.sh".
+       */
       shExec = new ShellCommandExecutor(new String[]{
-          "bash", "-c", commandFile},
+          "bash", commandFile},
           currentWorkDirectory);
       shExec.execute();
     } catch (Exception e) {



Mime
View raw message