Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-10041

Should not use AbstractPath to create unix domain socket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.0
    • test
    • None
    • X86/ARM

      OS: ubuntu 1804

      java: java8

    • Reviewed

    Description

      This issue hits by a very coincidental scene. That 's happend when we test on ARM.

      The test case is:

      org.apache.hadoop.yarn.csi.client.TestCsiClient.testIdentityService

       

      The step is:

      If we make the hadoop source code dir to a very deep dir path, this case would be pass at the first time running, but always fail in the following tries.

      The official jenkins doesn't cover this, because it runs on Docker container and just run test 1 time. So it looks like alway pass.

       

      The  key point is the UNIX domain socket path exceed the limit of UNIX_PATH_MAX(108). Please see [1]

       

      This issue is very difficult to locate, as it will always return binding failed when we exec the test.

       

      Also I saw the hadoop code in trunk branch, the code use the AbsolutePath to create the UNIX DOMAIN SOCKET file. The source code is [2]. So that can not forbid to hit this issue. That's good to provide a second way to set the socket path to '/tmp' or any place when exec this test.

      [1] https://serverfault.com/questions/641347/check-if-a-path-exceeds-maximum-for-unix-domain-socket

      [2] https://github.com/apache/hadoop/blob/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-csi/src/test/java/org/apache/hadoop/yarn/csi/client/TestCsiClient.java#L48

      Attachments

        Issue Links

          Activity

            People

              seanlau liusheng
              bzhaoopenstack zhao bo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: