Hadoop Common
  1. Hadoop Common
  2. HADOOP-5980

LD_LIBRARY_PATH not passed to tasks spawned off by LinuxTaskController

    Details

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

      Description

      Currently, task spawned off by LinuxTaskController don't get LD_LIBRARY_PATH in their environment. The tasks should get same LD_LIBRARY_PATH value as when spawned off by DefaultTaskController

      1. hadoop-5980-v20.patch
        2 kB
        Hemanth Yamijala
      2. HADOOP-5980-3.patch
        5 kB
        Sreekanth Ramakrishnan
      3. HADOOP-5980-2.patch
        5 kB
        Sreekanth Ramakrishnan
      4. HADOOP-5980-1.patch
        4 kB
        Sreekanth Ramakrishnan

        Issue Links

          Activity

          Hide
          Sreekanth Ramakrishnan added a comment -

          The issue is because linux does not pass LD_LIBRARY_PATH in list of environment to setuid/setgid executables.

          Show
          Sreekanth Ramakrishnan added a comment - The issue is because linux does not pass LD_LIBRARY_PATH in list of environment to setuid/setgid executables.
          Hide
          Sreekanth Ramakrishnan added a comment -

          Attaching a patch which fixes this issue. This patch can be applied after HADOOP-5981 patch has been applied.

          Show
          Sreekanth Ramakrishnan added a comment - Attaching a patch which fixes this issue. This patch can be applied after HADOOP-5981 patch has been applied.
          Hide
          Sreekanth Ramakrishnan added a comment -

          Attaching patch merging with lastest patch on HADOOP-5981

          Show
          Sreekanth Ramakrishnan added a comment - Attaching patch merging with lastest patch on HADOOP-5981
          Hide
          Hemanth Yamijala added a comment -

          Code changes look ok. We are not adding newlines to the exported environment. Is this OK ?

          Some comments on the test case:

          • testEnvironment: The test shouldRun() should be made.
          • If the test in TestMiniMRChildTask fails, we will not do cleanup operations like deleting the outDir. I think we should call the runTestTaskEnv method in a try...catch...finally block and in the finally, do cleanup.
          • Do we need to check if the job execution fails ?
          Show
          Hemanth Yamijala added a comment - Code changes look ok. We are not adding newlines to the exported environment. Is this OK ? Some comments on the test case: testEnvironment: The test shouldRun() should be made. If the test in TestMiniMRChildTask fails, we will not do cleanup operations like deleting the outDir. I think we should call the runTestTaskEnv method in a try...catch...finally block and in the finally, do cleanup. Do we need to check if the job execution fails ?
          Hide
          Sreekanth Ramakrishnan added a comment -

          Attaching a patch incorporating Hemanths comments.

          Show
          Sreekanth Ramakrishnan added a comment - Attaching a patch incorporating Hemanths comments.
          Hide
          Hemanth Yamijala added a comment -

          Looks fine to me. +1.

          Show
          Hemanth Yamijala added a comment - Looks fine to me. +1.
          Hide
          Sreekanth Ramakrishnan added a comment -

          Result from ant test-patch

               [exec] +1 overall.
               [exec]
               [exec]     +1 @author.  The patch does not contain any @author tags.
               [exec]
               [exec]     +1 tests included.  The patch appears to include 6 new or modified tests.
               [exec]
               [exec]     +1 javadoc.  The javadoc tool did not generate any warning messages.
               [exec]
               [exec]     +1 javac.  The applied patch does not increase the total number of javac compiler warnings.
               [exec]
               [exec]     +1 findbugs.  The patch does not introduce any new Findbugs warnings.
               [exec]
               [exec]     +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
               [exec]
               [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.
          
          Show
          Sreekanth Ramakrishnan added a comment - Result from ant test-patch [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 6 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings. [exec] [exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
          Hide
          Sreekanth Ramakrishnan added a comment -

          Ant test passed locally.

          Show
          Sreekanth Ramakrishnan added a comment - Ant test passed locally.
          Hide
          Hemanth Yamijala added a comment -

          I just committed this. Thanks, Sreekanth !

          Show
          Hemanth Yamijala added a comment - I just committed this. Thanks, Sreekanth !
          Hide
          Hudson added a comment -
          Show
          Hudson added a comment - Integrated in Hadoop-trunk #867 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/867/ )
          Hide
          Hemanth Yamijala added a comment -

          This patch is for earlier version of Hadoop. Not to be committed.

          Show
          Hemanth Yamijala added a comment - This patch is for earlier version of Hadoop. Not to be committed.
          Hide
          hg added a comment -

          Hello,

          I tried applying hadoop-5980-v20.patch to hadoop-0.20.2 and I got the following error:
          patching file src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java
          Hunk #1 FAILED at 24.
          Hunk #2 FAILED at 125.
          2 out of 2 hunks FAILED – saving rejects to file src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java.rej

          v20.patch seems to end abruptly at line 38. What should I do?

          Best Regards,
          H

          Show
          hg added a comment - Hello, I tried applying hadoop-5980-v20.patch to hadoop-0.20.2 and I got the following error: patching file src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java Hunk #1 FAILED at 24. Hunk #2 FAILED at 125. 2 out of 2 hunks FAILED – saving rejects to file src/mapred/org/apache/hadoop/mapred/LinuxTaskController.java.rej v20.patch seems to end abruptly at line 38. What should I do? Best Regards, H

            People

            • Assignee:
              Sreekanth Ramakrishnan
              Reporter:
              Sreekanth Ramakrishnan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development