Skip to content

Android build is flakey #2494

Closed
Closed

Description

@GMNGeoffrey

I'm seeing flakey failures in the new Android CMake cross compilation build on both pre and post submit. There's one failure that's happened twice and another that's happened once, but the common thread appears to be hooking into the llvm host build.

CMake Error at third_party/llvm-project/llvm/CMakeLists.txt:775 (include):
  include could not find load file:

    /tmpfs/src/github/iree/build/host/third_party/llvm-project/llvm/LLVMBuild.cmake

https://source.cloud.google.com/results/invocations/238ff945-95cf-4b6e-87cc-6bbeff6c4b75/targets/iree%2Fgcp_ubuntu%2Fcmake%2Fandroid%2Farm64-v8a%2Fgoogle/log

CMake Error at third_party/llvm-project/llvm/CMakeLists.txt:767 (message):
  Unexpected failure executing llvm-build: Traceback (most recent call last):

    File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvm-build", line 6, in <module>
      llvmbuild.main()
    File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvmbuild/main.py", line 833, in main
      opts.optional_components)
    File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvmbuild/main.py", line 417, in write_library_table
      elif filecmp.cmp(output_path, output_path+'.new'):
    File "/usr/lib/python3.6/filecmp.py", line 52, in cmp
      s2 = _sig(os.stat(f2))

  FileNotFoundError: [Errno 2] No such file or directory:
  '/tmpfs/src/github/iree/build/host/third_party/llvm-project/llvm/tools/llvm-config/LibraryDependencies.inc.new'

https://source.cloud.google.com/results/invocations/6392cebf-00bd-4c31-b808-77c16b2543c7/targets/iree%2Fgcp_ubuntu%2Fcmake%2Fandroid%2Farm64-v8a%2Fpresubmit/log
https://source.cloud.google.com/results/invocations/a4cbca79-cc53-4c9d-a92f-27aee38553d6/targets/iree%2Fgcp_ubuntu%2Fcmake%2Fandroid%2Farm64-v8a%2Fpresubmit/log

Activity

  1. added
    platform/android 🤖
    infrastructure
    on Jul 12, 2020
  2. antiagainst commented on Jul 13, 2020

    @antiagainst
    Member

    Hmm, interesting. I'm not able to reproduce this on my gLinux machine. Maybe because of the large number of concurrency there. From the face of it, it seems some dependency is not properly wired up.

  3. antiagainst commented on Jul 13, 2020

    @antiagainst
    Member

    Also failing here

    https://source.cloud.google.com/results/invocations/2e82e2e2-f983-4ec4-9b94-de4223f3f4c4/targets/iree%2Fgcp_ubuntu%2Fcmake%2Fandroid%2Farm64-v8a%2Fmain/log

    CMake Error at third_party/llvm-project/llvm/CMakeLists.txt:767 (message):
      Unexpected failure executing llvm-build: Traceback (most recent call last):
    
        File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvm-build", line 6, in <module>
          llvmbuild.main()
        File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvmbuild/main.py", line 833, in main
          opts.optional_components)
        File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvmbuild/main.py", line 372, in write_library_table
          make_install_dir(os.path.dirname(output_path))
        File "/tmpfs/src/github/iree/third_party/llvm-project/llvm/utils/llvm-build/llvmbuild/main.py", line 49, in make_install_dir
          os.makedirs(path)
        File "/usr/lib/python3.6/os.py", line 220, in makedirs
          mkdir(name, mode)
    
      FileExistsError: [Errno 17] File exists:
      '/tmpfs/src/github/iree/build/host/third_party/llvm-project/llvm/tools/llvm-config'
    

    Token a deeper look. The related code in LLVM is

    https://github.com/llvm/llvm-project/blob/e72cba975735c2202b254621d79fb9dbbed08d39/llvm/utils/llvm-build/llvmbuild/main.py#L47-L49

    There already exists a guard to make sure that the directory does not exist before calling into os.makedirs. Some other thread created the directory in the middle? Then this should be revealed more easily with larger concurrency. Mysterious..

  4. added
    bug 🐞
    on Jul 13, 2020
  5. benvanik commented on Nov 22, 2020

    @benvanik
    Collaborator

    @antiagainst are we still --building twice? We need to fix that if so, as this is going to be important to getting a reliable vcpkg build for deployment.

  6. antiagainst commented on Nov 23, 2020

    @antiagainst
    Member

    Yes still. (Sorry about that.) I'll spend some time later to figure this out.

  7. GMNGeoffrey commented on Jan 25, 2021

    @GMNGeoffrey
    MemberAuthor

    If this is indeed fixed, we can enable the Android build on presubmit. Should we just try and find out?

  8. ScottTodd commented on Jan 25, 2021

    @ScottTodd
    Member

    If this is indeed fixed, we can enable the Android build on presubmit. Should we just try and find out?

    Sure :D

  9. antiagainst commented on Jan 25, 2021

    @antiagainst
    Member

    +1000. Thanks @ScottTodd! Ah, now I can sleep without this haunting me during night. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐞infrastructureplatform/android 🤖

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions