Skip to content

[6.0] CI failure in OSX: Unable to load shared library 'MovedNativeLib' in DllImportPathTest.sh #80476

Closed

Description

@carlossanlop

Found this failure in a release/6.0 backport PR.

Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 6.0.11)
  Discovering: Interop.DllImportAttribute.XUnitWrapper (method display = ClassAndMethod, method display options = None)
  Discovered:  Interop.DllImportAttribute.XUnitWrapper (found 2 test cases)
  Starting:    Interop.DllImportAttribute.XUnitWrapper (parallel test collections = on, max threads = 6)
    Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh [FAIL]
      
      Return code:      1
      Raw output file:      /tmp/helix/working/A4F20917/w/A31C08D1/uploads/Reports/Interop.DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.output.txt
      Raw output:
      BEGIN EXECUTION
      /tmp/helix/working/A4F20917/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false DllImportPathTest.dll ''
      System.DllNotFoundException: Unable to load shared library 'MovedNativeLib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMovedNativeLib, 0x0001): tried: 'libMovedNativeLib' (no such file), '/usr/local/lib/libMovedNativeLib' (no such file), '/usr/lib/libMovedNativeLib' (no such file), '/private/tmp/helix/working/A4F20917/w/A31C08D1/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/libMovedNativeLib' (no such file)
         at Test.GetZero_PathEnv()
         at Test.Main(String[] args)
      Expected: 100
      Actual: 101
      END EXECUTION - FAILED
      Test Harness Exitcode is : 1
      To run the test:
      > set CORE_ROOT=/tmp/helix/working/A4F20917/p
      > /private/tmp/helix/working/A4F20917/w/A31C08D1/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh
      Expected: True
      Actual:   False
      Stack Trace:
           at Interop_DllImportAttribute._DllImportPath_DllImportPathTest_DllImportPathTest_._DllImportPath_DllImportPathTest_DllImportPathTest_sh()
      Output:
        
        Return code:      1
        Raw output file:      /tmp/helix/working/A4F20917/w/A31C08D1/uploads/Reports/Interop.DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.output.txt
        Raw output:
        BEGIN EXECUTION
        /tmp/helix/working/A4F20917/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false DllImportPathTest.dll ''
        System.DllNotFoundException: Unable to load shared library 'MovedNativeLib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMovedNativeLib, 0x0001): tried: 'libMovedNativeLib' (no such file), '/usr/local/lib/libMovedNativeLib' (no such file), '/usr/lib/libMovedNativeLib' (no such file), '/private/tmp/helix/working/A4F20917/w/A31C08D1/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/libMovedNativeLib' (no such file)
           at Test.GetZero_PathEnv()
           at Test.Main(String[] args)
        Expected: 100
        Actual: 101
        END EXECUTION - FAILED
        Test Harness Exitcode is : 1
        To run the test:
        > set CORE_ROOT=/tmp/helix/working/A4F20917/p
        > /private/tmp/helix/working/A4F20917/w/A31C08D1/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh
{
  "ErrorMessage": "System.DllNotFoundException: Unable to load shared library 'MovedNativeLib' or one of its dependencies.",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Report

Build Definition Test Pull Request
165842 dotnet/runtime Interop.WorkItemExecution #81858
164770 dotnet/runtime Interop.WorkItemExecution
164488 dotnet/runtime Interop.WorkItemExecution
163905 dotnet/runtime Interop.WorkItemExecution
163740 dotnet/runtime Interop.WorkItemExecution
163452 dotnet/runtime Interop.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
2 6 6

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Jan 11, 2023
  2. akoeplinger commented on Jan 13, 2023

    @akoeplinger
    Member

    We've apparently also seen this back when trying to move to OSX 12: #59085 (comment)

  3. self-assigned this
    on Jan 15, 2023
  4. added this to the 8.0.0 milestone on Jan 15, 2023
  5. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Jan 15, 2023
  6. elinor-fung commented on Feb 1, 2023

    @elinor-fung
    Member

    We've apparently also seen this back when trying to move to OSX 12

    I believe this was from macOS purging environment variables like LD_LIBRARY_PATH/DYLD_LIBRARY_PATH, which the test relies on. We ended up disabling the one failing case on macOS when we actually did the move - #64565 - so I guess we want that in 6.0 too.

  7. carlossanlop commented on Feb 8, 2023

    @carlossanlop
    ContributorAuthor

    This is still happening in PRs in the release/6.0 branch:

    Callstack
    Microsoft.DotNet.XUnitConsoleRunner v2.5.0 (64-bit .NET 6.0.13)
      Discovering: Interop.DllImportAttribute.XUnitWrapper (method display = ClassAndMethod, method display options = None)
      Discovered:  Interop.DllImportAttribute.XUnitWrapper (found 2 test cases)
      Starting:    Interop.DllImportAttribute.XUnitWrapper (parallel test collections = on, max threads = 6)
        Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh [FAIL]
          
          Return code:      1
          Raw output file:      /tmp/helix/working/A72A0967/w/A6FB08DB/uploads/Reports/Interop.DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.output.txt
          Raw output:
          BEGIN EXECUTION
          /tmp/helix/working/A72A0967/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false DllImportPathTest.dll ''
          System.DllNotFoundException: Unable to load shared library 'MovedNativeLib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMovedNativeLib, 0x0001): tried: 'libMovedNativeLib' (no such file), '/usr/local/lib/libMovedNativeLib' (no such file), '/usr/lib/libMovedNativeLib' (no such file), '/private/tmp/helix/working/A72A0967/w/A6FB08DB/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/libMovedNativeLib' (no such file)
             at Test.GetZero_PathEnv()
             at Test.TestNativeLibraryProbingOnPathEnv()
             at Test.Main(String[] args)
          Expected: 100
          Actual: 101
          END EXECUTION - FAILED
          Test Harness Exitcode is : 1
          To run the test:
          > set CORE_ROOT=/tmp/helix/working/A72A0967/p
          > /private/tmp/helix/working/A72A0967/w/A6FB08DB/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh
          Expected: True
          Actual:   False
          Stack Trace:
               at Interop_DllImportAttribute._DllImportPath_DllImportPathTest_DllImportPathTest_._DllImportPath_DllImportPathTest_DllImportPathTest_sh()
          Output:
            
            Return code:      1
            Raw output file:      /tmp/helix/working/A72A0967/w/A6FB08DB/uploads/Reports/Interop.DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.output.txt
            Raw output:
            BEGIN EXECUTION
            /tmp/helix/working/A72A0967/p/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false DllImportPathTest.dll ''
            System.DllNotFoundException: Unable to load shared library 'MovedNativeLib' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libMovedNativeLib, 0x0001): tried: 'libMovedNativeLib' (no such file), '/usr/local/lib/libMovedNativeLib' (no such file), '/usr/lib/libMovedNativeLib' (no such file), '/private/tmp/helix/working/A72A0967/w/A6FB08DB/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/libMovedNativeLib' (no such file)
               at Test.GetZero_PathEnv()
               at Test.TestNativeLibraryProbingOnPathEnv()
               at Test.Main(String[] args)
            Expected: 100
            Actual: 101
            END EXECUTION - FAILED
            Test Harness Exitcode is : 1
            To run the test:
            > set CORE_ROOT=/tmp/helix/working/A72A0967/p
            > /private/tmp/helix/working/A72A0967/w/A6FB08DB/e/Interop/DllImportAttribute/DllImportPath/DllImportPathTest/DllImportPathTest.sh
    
  8. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 8, 2023
  9. elinor-fung commented on Feb 8, 2023

    @elinor-fung
    Member

    #81856 backports the change to disable the test case.

  10. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 9, 2023
  11. elinor-fung commented on Feb 9, 2023

    @elinor-fung
    Member

    #81856 has been merged.

  12. ghost locked as resolved and limited conversation to collaborators on Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions