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

Tolerate JDK-8047340-related exceptions in Shell#isSetSidAvailable preventing class init

    Details

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

      Description

      Address the root cause of HADOOP-11916 per https://issues.apache.org/jira/browse/HADOOP-11916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528009#comment-14528009

      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.

        Attachments

        1. HADOOP-11924.001.patch
          2 kB
          Tsuyoshi Ozawa
        2. HADOOP-11924.002.patch
          2 kB
          Tsuyoshi Ozawa
        3. HADOOP-11924.003.patch
          2 kB
          Tsuyoshi Ozawa

          Issue Links

            Activity

              People

              • Assignee:
                ozawa Tsuyoshi Ozawa
                Reporter:
                jira.shegalov Gera Shegalov
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: