Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
carlossanlop opened this issue Jan 11, 2023 · 6 comments
Assignees
Labels
arch-x64 area-Interop-coreclr Known Build Error Use this to report build issues in the .NET Helix tab os-mac-os-x macOS aka OSX test-failure
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Jan 11, 2023

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
@akoeplinger
Copy link
Member

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

@trylek trylek self-assigned this Jan 15, 2023
@trylek trylek added this to the 8.0.0 milestone Jan 15, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Jan 15, 2023
@buyaa-n
Copy link
Contributor

buyaa-n commented Jan 30, 2023

@elinor-fung
Copy link
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.

@carlossanlop
Copy link
Member Author

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

@carlossanlop carlossanlop added the Known Build Error Use this to report build issues in the .NET Helix tab label Feb 8, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 8, 2023
@elinor-fung
Copy link
Member

#81856 backports the change to disable the test case.

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 9, 2023
@elinor-fung
Copy link
Member

#81856 has been merged.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-x64 area-Interop-coreclr Known Build Error Use this to report build issues in the .NET Helix tab os-mac-os-x macOS aka OSX test-failure
Projects
None yet
Development

No branches or pull requests

5 participants