Skip to content

Test failure: Interop/PInvoke/CriticalHandles/Test/Test/Test.cmd #103939

Closed

Description

@v-wenyuxu

Failed in: runtime-coreclr r2r-extra 20240623.1

Failed tests:

R2R-CG2 linux arm Checked gcstress0xc @ (Debian.12.Arm32.Open)Ubuntu.2004.ArmArch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-helix-arm32v7
    - Interop/PInvoke/CriticalHandles/Test/Test/Test.cmd

Error message:

 /root/helix/work/workitem/e/Interop/Interop/../PInvoke/CriticalHandles/Test/Test/Test.sh: line 315: -r:/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/IL-CG2/*.dll: No such file or directory

Return code:      1
Raw output file:      /root/helix/work/workitem/uploads/PInvoke/CriticalHandles/Test/Test/output.txt
Raw output:
BEGIN EXECUTION
in takeLock
/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/IL-CG2/Test.dll
05:22:36
Response file: /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll.rsp
/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/IL-CG2/Test.dll
-o:/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll
-r:/root/helix/work/correlation/System.*.dll
-r:/root/helix/work/correlation/Microsoft.*.dll
-r:/root/helix/work/correlation/xunit.*.dll
-r:/root/helix/work/correlation/mscorlib.dll
--verify-type-and-field-layout
--method-layout:random
--targetarch:arm
--targetos:linux
Running CrossGen2:  dotnet /root/helix/work/correlation/crossgen2/crossgen2.dll @/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll.rsp  
Emitting R2R PE file: /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll
Running R2RDump:  dotnet /root/helix/work/correlation/R2RDump/R2RDump.dll --header --sc --in /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll --out /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/Test.dll.r2rdump --val
05:22:38
/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/IL-CG2/TestLibrary.dll
05:22:38
Response file: /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll.rsp
/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/IL-CG2/TestLibrary.dll
-o:/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll
-r:/root/helix/work/correlation/System.*.dll
-r:/root/helix/work/correlation/Microsoft.*.dll
-r:/root/helix/work/correlation/xunit.*.dll
-r:/root/helix/work/correlation/mscorlib.dll
--verify-type-and-field-layout
--method-layout:random
--targetarch:arm
--targetos:linux
Running CrossGen2:  dotnet /root/helix/work/correlation/crossgen2/crossgen2.dll @/root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll.rsp  
Emitting R2R PE file: /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll
Running R2RDump:  dotnet /root/helix/work/correlation/R2RDump/R2RDump.dll --header --sc --in /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll --out /root/helix/work/workitem/e/Interop/PInvoke/CriticalHandles/Test/Test/TestLibrary.dll.r2rdump --val
05:22:40
in ReleaseLock
in takeLock
/root/helix/work/correlation/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true Test.dll ''
Test Failure: Xunit.Sdk.TrueException: Assert.True() Failure
Expected: True
Actual:   False
   at Xunit.Assert.True(Boolean condition) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 97
   at CriticalHandleTest.Ref()
   at Test.TestEntryPoint()
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
   at __GeneratedMainWrapper.Main()
in ReleaseLock
Expected: 100
Actual: 101
END EXECUTION - FAILED
Test failed. Trying to see if dump file was created in /home/helixbot/dotnetbuild/dumps since 6/24/2024 5:22:36 AM
Test Harness Exitcode is : 1
To run the test:
Set up CORE_ROOT and run.
> /root/helix/work/workitem/e/Interop/Interop/../PInvoke/CriticalHandles/Test/Test/Test.sh

Stack trace:

   at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146
   at Xunit.Assert.True(Boolean condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 128
   at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
   at Program.<<Main>$>g__TestExecutor263|25_264(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)

Activity

  1. v-wenyuxu commented on Jul 15, 2024

    @v-wenyuxu
    Author

    Failed in: runtime-coreclr gcstress0x3-gcstress0xc 20240714.1

    Failed tests:

    coreclr windows x64 Checked gcstress0x3 @ Windows.10.Amd64.Open
        - Interop/PInvoke/CriticalHandles/Test/Test/Test.cmd
    

    Error message:

     
    Return code:      1
    Raw output file:      C:hwAD1D0946wB0D8099FuploadsPInvokeCriticalHandlesTestTestoutput.txt
    Raw output:
    BEGIN EXECUTION
     "C:hwAD1D0946pcorerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  Test.dll 
    Test Failure: Xunit.Sdk.TrueException: Assert.True() Failure
    Expected: True
    Actual:   False
       at CriticalHandleTest.Ref()
       at Test.TestEntryPoint()
    Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
    Expected: 100
    Actual:   101
       at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
       at __GeneratedMainWrapper.Main()
    Expected: 100
    Actual: 101
    END EXECUTION - FAILED
    FAILED
    Test failed. Trying to see if dump file was created in C:cores since 7/14/2024 3:01:14 PM
    Test Harness Exitcode is : 1
    To run the test:
    Set up CORE_ROOT and run.
    > C:hwAD1D0946wB0D8099FeInteropInterop../PInvoke/CriticalHandles/Test/Test/Test.cmd
    

    Stack trace:

       at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor263|25_264(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
    
  2. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    and removed on Jul 15, 2024
  3. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 15, 2024
  4. added this to the 9.0.0 milestone on Jul 15, 2024
  5. dotnet-policy-service commented on Jul 15, 2024

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
    See info in area-owners.md if you want to be subscribed.

  6. JulieLeeMSFT commented on Jul 15, 2024

    @JulieLeeMSFT
    Member
  7. JulieLeeMSFT commented on Jul 15, 2024

    @JulieLeeMSFT
    Member

    Also failed in runtime-coreclr gcstress0x3-gcstress0xc/20240714.1

    15:01:14.557 Running test: Interop/PInvoke/CriticalHandles/Test/Test/Test.cmd
    
    Return code:      1
    Raw output file:      C:\h\w\AD1D0946\w\B0D8099F\uploads\PInvoke\CriticalHandles\Test\Test\output.txt
    Raw output:
    BEGIN EXECUTION
     "C:\h\w\AD1D0946\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false" -p "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true"  Test.dll 
    Test Failure: Xunit.Sdk.TrueException: Assert.True() Failure
    Expected: True
    Actual:   False
       at CriticalHandleTest.Ref()
       at Test.TestEntryPoint()
    Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
    Expected: 100
    Actual:   101
       at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/Microsoft.DotNet.XUnitAssert/src/EqualityAsserts.cs:line 168
       at __GeneratedMainWrapper.Main()
    Expected: 100
    Actual: 101
    END EXECUTION - FAILED
    FAILED
    Test failed. Trying to see if dump file was created in C:\cores since 7/14/2024 3:01:14 PM
    Test Harness Exitcode is : 1
    To run the test:
    Set up CORE_ROOT and run.
    > C:\h\w\AD1D0946\w\B0D8099F\e\Interop\Interop\../PInvoke/CriticalHandles/Test/Test/Test.cmd
    

    Stack trace:

       at Xunit.Assert.True(Nullable`1 condition, String userMessage) in /_/src/Microsoft.DotNet.XUnitAssert/src/BooleanAsserts.cs:line 146
       at TestLibrary.OutOfProcessTest.RunOutOfProcessTest(String assemblyPath, String testPathPrefix)
       at Program.<<Main>$>g__TestExecutor263|25_264(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass25_0&)
    
  8. AndyAyersMS commented on Jul 21, 2024

    @AndyAyersMS
    Member

    I was able to repro this on windows x64, but it took 506 runs... doesn't feel like a codegen issue, but will keep looking.

  9. added
    Priority:2Work that is important, but not critical for the release
    on Jul 25, 2024
  10. AndyAyersMS commented on Jul 25, 2024

    @AndyAyersMS
    Member

    @VSadov does this seem like the kind of issue you're fixing with #105289?

  11. VSadov commented on Jul 25, 2024

    @VSadov
    Member

    Yes, it could be.

    This test has a bunch of scenarios that rely on deterministic

            GC.Collect();
            GC.WaitForPendingFinalizers()
  12. VSadov commented on Jul 25, 2024

    @VSadov
    Member

    I saw your comment, but was waiting for my fix to go in and just suggest to wait for more failures, if they happen.

    It is easy to rely on determinism of WaitForPendingFinalizers(), while not guaranteeing that the object is indeed unreachable. Then fixing WaitForPendingFinalizers() would not help.

    It may take some more time for my fix to go in though. Hopefully less than an hour. I am waiting for GC stress to finish.
    I do not expect any failures from GC stress, just want to be sure the fix does not mess up the GC stress itself, as that also has some special casing for WaitForPendingFinalizers

  13. VSadov commented on Jul 25, 2024

    @VSadov
    Member

    #105289 has been merged. Hopefully this issue will be fixed with that.

  14. AndyAyersMS commented on Jul 29, 2024

    @AndyAyersMS
    Member

    No failures over the weekend, so closing this.

  15. locked and limited conversation to collaborators on Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GCStressPriority:2Work that is important, but not critical for the releasearch-arm32area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIblocking-clean-ci-optionalBlocking optional rolling runsos-linuxLinux OS (any supported distro)

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions