Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11916

TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      The test fails with the below exception. It turns out there is a JVM bug for MAC, http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8047340.

      testLowerAndUpperStrings(org.apache.hadoop.util.TestStringUtils)  Time elapsed: 0.205 sec  <<< ERROR!
      java.lang.Error: posix_spawn is not a supported process launch mechanism on this platform.
      	at java.lang.UNIXProcess$1.run(UNIXProcess.java:104)
      	at java.lang.UNIXProcess$1.run(UNIXProcess.java:93)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.lang.UNIXProcess.<clinit>(UNIXProcess.java:91)
      	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
      	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
      	at org.apache.hadoop.util.Shell.runCommand(Shell.java:486)
      	at org.apache.hadoop.util.Shell.run(Shell.java:456)
      	at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:722)
      	at org.apache.hadoop.util.Shell.isSetsidSupported(Shell.java:391)
      	at org.apache.hadoop.util.Shell.<clinit>(Shell.java:381)
      	at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:80)
      	at org.apache.hadoop.util.TestStringUtils.testLowerAndUpperStrings(TestStringUtils.java:432)
      

      Perhaps we can disable this test case on MAC.

        Issue Links

          Activity

          Hide
          mingma Ming Ma added a comment -

          Attach a patch to skip the test on MAC.

          Show
          mingma Ming Ma added a comment - Attach a patch to skip the test on MAC.
          Hide
          hadoopqa Hadoop QA added a comment -



          +1 overall



          Vote Subsystem Runtime Comment
          0 pre-patch 5m 9s Pre-patch trunk compilation is healthy.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 tests included 0m 0s The patch appears to include 1 new or modified test files.
          +1 javac 7m 28s There were no new javac warning messages.
          +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings.
          +1 checkstyle 1m 3s There were no new checkstyle issues.
          +1 whitespace 0m 0s The patch has no lines that end in whitespace.
          +1 install 1m 32s mvn install still works.
          +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse.
          +1 findbugs 1m 39s The patch does not introduce any new Findbugs (version 2.0.3) warnings.
          +1 common tests 22m 35s Tests passed in hadoop-common.
              40m 23s  



          Subsystem Report/Notes
          Patch URL http://issues.apache.org/jira/secure/attachment/12730245/HADOOP-11916.patch
          Optional Tests javac unit findbugs checkstyle
          git revision trunk / 7dc3c120
          hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/artifact/patchprocess/testrun_hadoop-common.txt
          Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/testReport/
          Java 1.7.0_55
          uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
          Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/console

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 pre-patch 5m 9s Pre-patch trunk compilation is healthy. +1 @author 0m 0s The patch does not contain any @author tags. +1 tests included 0m 0s The patch appears to include 1 new or modified test files. +1 javac 7m 28s There were no new javac warning messages. +1 release audit 0m 20s The applied patch does not increase the total number of release audit warnings. +1 checkstyle 1m 3s There were no new checkstyle issues. +1 whitespace 0m 0s The patch has no lines that end in whitespace. +1 install 1m 32s mvn install still works. +1 eclipse:eclipse 0m 31s The patch built with eclipse:eclipse. +1 findbugs 1m 39s The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 common tests 22m 35s Tests passed in hadoop-common.     40m 23s   Subsystem Report/Notes Patch URL http://issues.apache.org/jira/secure/attachment/12730245/HADOOP-11916.patch Optional Tests javac unit findbugs checkstyle git revision trunk / 7dc3c120 hadoop-common test log https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/artifact/patchprocess/testrun_hadoop-common.txt Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/testReport/ Java 1.7.0_55 uname Linux asf907.gq1.ygridcore.net 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/6477/console This message was automatically generated.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Reproduced the bug with JDK 8u45. +1, committing this shortly.

          Show
          ozawa Tsuyoshi Ozawa added a comment - Reproduced the bug with JDK 8u45. +1, committing this shortly.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Committed this to trunk and branch-2. Thanks Ming Ma for your report and contribution.

          Show
          ozawa Tsuyoshi Ozawa added a comment - Committed this to trunk and branch-2. Thanks Ming Ma for your report and contribution.
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-trunk-Commit #7730 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7730/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #7730 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7730/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Hide
          mingma Ming Ma added a comment -
          Show
          mingma Ming Ma added a comment - Thanks Tsuyoshi Ozawa .
          Hide
          jira.shegalov Gera Shegalov added a comment -

          JDK-8047340 explicitly calls out BSD-like systems, should not we just exclude those systems instead of enabling solely Linux?

          Assume.assumeFalse("Avoiding JDK-8047340 on BSD-based systems", Shell.FREEBSD || Shell.MAC);
          

          However, I don't think this is the right fix. Shell on BSD-like systems is broken with the TR locale. Shell class initialization happens only because StringUtils references Shell.WINDOWS.

          We can simply catch Throwable in Shell#isSetsidSupported instead of IOException. If we want to be pedantic we can rethrow

          if (!(t instanceof IOException) && !(Shell.FREEBSD || Shell.MAC))
          

          With such a change the test can run unchanged.

          Show
          jira.shegalov Gera Shegalov added a comment - JDK-8047340 explicitly calls out BSD-like systems, should not we just exclude those systems instead of enabling solely Linux? Assume.assumeFalse( "Avoiding JDK-8047340 on BSD-based systems" , Shell.FREEBSD || Shell.MAC); However, I don't think this is the right fix. Shell on BSD-like systems is broken with the TR locale. Shell class initialization happens only because StringUtils references Shell.WINDOWS. We can simply catch Throwable in Shell#isSetsidSupported instead of IOException. If we want to be pedantic we can rethrow if (!(t instanceof IOException) && !(Shell.FREEBSD || Shell.MAC)) With such a change the test can run unchanged.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Gera Shegalov good catch, I overlooked the other operating systems. I think many developers use Mac OS for Hadoop, so this fix is useful for them as a workaround.

          Can we create new JIRA to exclude BSD-like systems correctly? Or, should we revert it?

          Show
          ozawa Tsuyoshi Ozawa added a comment - Gera Shegalov good catch, I overlooked the other operating systems. I think many developers use Mac OS for Hadoop, so this fix is useful for them as a workaround. Can we create new JIRA to exclude BSD-like systems correctly? Or, should we revert it?
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #184 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/184/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #184 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/184/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #918 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/918/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #918 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/918/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk #2116 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2116/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/CHANGES.txt
          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2116 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2116/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/CHANGES.txt hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/175/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #175 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/175/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #185 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/185/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #185 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/185/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2134 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2134/)
          HADOOP-11916. TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d)

          • hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java
          • hadoop-common-project/hadoop-common/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2134 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2134/ ) HADOOP-11916 . TestStringUtils#testLowerAndUpperStrings failed on MAC due to a JVM bug. Contributed by Ming Ma. (ozawa: rev 338e88a19eeb01364c7f5bcdc5f4b5c35d53852d) hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/util/TestStringUtils.java hadoop-common-project/hadoop-common/CHANGES.txt
          Hide
          jira.shegalov Gera Shegalov added a comment -

          Hi Tsuyoshi Ozawa, let us fix it in the follow-up JIRA HADOOP-11924 instead of reverting here. We should revert the test change in HADOOP-11924 and it will continue to serve as a good regression test.

          Show
          jira.shegalov Gera Shegalov added a comment - Hi Tsuyoshi Ozawa , let us fix it in the follow-up JIRA HADOOP-11924 instead of reverting here. We should revert the test change in HADOOP-11924 and it will continue to serve as a good regression test.
          Hide
          ozawa Tsuyoshi Ozawa added a comment -

          Gera Shegalov sure, thank you for following up.

          Show
          ozawa Tsuyoshi Ozawa added a comment - Gera Shegalov sure, thank you for following up.
          Hide
          mingma Ming Ma added a comment -

          Thanks Gera Shegalov for the good point. Sorry didn't get time to respond.

          Show
          mingma Ming Ma added a comment - Thanks Gera Shegalov for the good point. Sorry didn't get time to respond.

            People

            • Assignee:
              mingma Ming Ma
              Reporter:
              mingma Ming Ma
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development