Skip to content

Test failure baseservices\\callconvs\\TestCallingConventions\\TestCallingConventions.cmd #78620

Closed

Description

@v-wenyuxu

Run: runtime-coreclr gcstress-extra 20221119.1

Failed test:

coreclr windows x86 Checked gcstress0xc_zapdisable_jitstress2 @ Windows.10.Amd64.Open

- baseservices\\callconvs\\TestCallingConventions\\TestCallingConventions.cmd

Error message:

Assert failure(PID 688 [0x000002b0], Thread: 5040 [0x13b0]): !"About to FailFast. set ComPlus_AssertOnFailFast=0 if this is expected"

CORECLR! DoJITFailFast + 0xBA (0x7070264c)
CORECLR! CrawlFrame::SetCurGSCookie + 0x2F (0x705d499e)
CORECLR! StackFrameIterator::PreProcessingForManagedFrames + 0x51 (0x705d4459)
CORECLR! StackFrameIterator::ProcessCurrentFrame + 0x21C (0x705d47bd)
CORECLR! StackFrameIterator::NextRaw + 0x9E0 (0x705d40dd)
CORECLR! StackFrameIterator::Next + 0x50 (0x705d36b7)
CORECLR! Thread::StackWalkFramesEx + 0x198 (0x705d4d15)
CORECLR! Thread::StackWalkFrames + 0x159 (0x705d4afd)
CORECLR! ScanStackRoots + 0x196 (0x706ab594)
CORECLR! GCToEEInterface::GcScanRoots + 0xF1 (0x706a990f)
File: D:\a_work\1\s\src\coreclr\vm\jithelpers.cpp Line: 4351
Image: C:\h\w\AF8D0979\p\corerun.exe

Return code:      1
Raw output file:      C:\h\w\AF8D0979\w\A73208C3\uploads\Reports\baseservices.callconvs\TestCallingConventions\TestCallingConventions.output.txt
Raw output:
BEGIN EXECUTION
"C:\h\w\AF8D0979\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  TestCallingConventions.dll
Running BlittableFunctionPointers...
-- unmanaged
-- unmanaged cdecl
-- unmanaged stdcall
-- unmanaged modopt(cdecl)
-- unmanaged modopt(stdcall)
-- unmanaged modopt unrecognized
-- unmanaged modopt(stdcall) modopt(cdecl)
-- unmanaged modopt(stdcall) modopt(unrecognized)
-- unmanaged cdecl modopt(stdcall)
-- unmanaged stdcall modopt(cdecl)
Running NonblittableFunctionPointers...
-- unmanaged
-- unmanaged cdecl
-- unmanaged stdcall
-- unmanaged modopt(cdecl)
-- unmanaged modopt(stdcall)
-- unmanaged modopt(unrecognized)
-- unmanaged modopt(stdcall) modopt(cdecl)
-- unmanaged modopt(stdcall) modopt(unrecognized)
-- unmanaged cdecl modopt(stdcall)
Expected: 100
Actual: -1073740286
END EXECUTION - FAILED
FAILED
Test Harness Exitcode is : 1
To run the test:

set CORE_ROOT=C:\h\w\AF8D0979\p
C:\h\w\AF8D0979\w\A73208C3\e\baseservices\callconvs\TestCallingConventions\TestCallingConventions.cmd
Expected: True
Actual:   False


Stack trace
   at baseservices_callconvs._TestCallingConventions_TestCallingConventions_._TestCallingConventions_TestCallingConventions_cmd()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Nov 21, 2022
  2. AaronRobinsonMSFT commented on Nov 25, 2022

    @AaronRobinsonMSFT
    Member

    This looks like a codegen issue.

  3. AaronRobinsonMSFT commented on Nov 25, 2022

    @AaronRobinsonMSFT
    Member

    Perhaps not. There is something slightly confusing in these tests. I think the cdecl and stdcall args are flipped in the following sections. Will try and repro locally and see if changing them fixes the issue.

    {
    Console.WriteLine($" -- unmanaged cdecl modopt(stdcall)");
    int b = CallFunctionPointers.CallUnmanagedCdeclIntInt_ModOptStdcall(cbCdecl, a);
    Assert.Equal(expected, b);
    }
    {
    Console.WriteLine($" -- unmanaged stdcall modopt(cdecl)");
    int b = CallFunctionPointers.CallUnmanagedStdcallIntInt_ModOptCdecl(cbStdcall, a);
    Assert.Equal(expected, b);
    }

    {
    Console.WriteLine($" -- unmanaged cdecl modopt(stdcall)");
    var b = CallFunctionPointers.CallUnmanagedCdeclCharChar_ModOptStdcall(cbCdecl, a);
    Assert.Equal(expected, b);
    }
    {
    Console.WriteLine($" -- unmanaged stdcall modopt(cdecl)");
    var b = CallFunctionPointers.CallUnmanagedStdcallCharChar_ModOptCdecl(cbStdcall, a);
    Assert.Equal(expected, b);
    }

  4. added
    test-bugProblem in test source code (most likely)
    and removed
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Nov 25, 2022
  5. AaronRobinsonMSFT commented on Nov 26, 2022

    @AaronRobinsonMSFT
    Member

    Reading the above tests and code more closely the tests are correct and validating the metadata callconv value is preferred over the modopt for other calling conventions. I stepped through some of this code and it appears that in the calli scenario the JIT's call into the VM isn't using the CallConvBuilder, which I think it should. I don't recall all the code paths here, but I can say the VM side hasn't changed much since it was written, but the JIT side appears to have changed substantially. Perhaps something was missed in that transition?

    /cc @jakobbotsch since I see your alias the most on recent changes in this area. Please let me know if I can help in any way.

  6. 17 remaining items

  7. v-wenyuxu commented on Feb 13, 2023

    @v-wenyuxu
    Author

    Failed in Run: runtime-coreclr gcstress-extra 20230212.1

    Failed tests:

    coreclr windows x86 Checked gcstress0xc_zapdisable_jitstress2 @ Windows.10.Amd64.Open
        - baseservices\\callconvs\\TestCallingConventions\\TestCallingConventions.cmd
    
    coreclr windows x86 Checked gcstress0xc_jitstress2 @ Windows.10.Amd64.Open
        - baseservices\\callconvs\\TestCallingConventions\\TestCallingConventions.cmd 
    

    Error message:

    
    Assert failure(PID 2440 [0x00000988], Thread: 5768 [0x1688]): !"About to FailFast. set ComPlus_AssertOnFailFast=0 if this is expected"
    
    CORECLR! DoJITFailFast + 0xBA (0x70780fec)
    CORECLR! CrawlFrame::SetCurGSCookie + 0x2F (0x7065394f)
    CORECLR! StackFrameIterator::PreProcessingForManagedFrames + 0x51 (0x7065340a)
    CORECLR! StackFrameIterator::ProcessCurrentFrame + 0x21C (0x7065376e)
    CORECLR! StackFrameIterator::NextRaw + 0x9E0 (0x7065308e)
    CORECLR! StackFrameIterator::Next + 0x50 (0x70652668)
    CORECLR! Thread::StackWalkFramesEx + 0x198 (0x70653cc6)
    CORECLR! Thread::StackWalkFrames + 0x159 (0x70653aae)
    CORECLR! ScanStackRoots + 0x196 (0x70729f14)
    CORECLR! GCToEEInterface::GcScanRoots + 0xF1 (0x7072826f)
       File: D:\a\_work\1\s\src\coreclr\vm\jithelpers.cpp Line: 4351
       Image: C:\h\w\B5340A00\p\corerun.exe
    
    
    Return code:      1
    Raw output file:      C:\h\w\B5340A00\w\96F907F5\uploads\Reports\baseservices.callconvs\TestCallingConventions\TestCallingConventions.output.txt
    Raw output:
    BEGIN EXECUTION
    "C:\h\w\B5340A00\p\corerun.exe" -p "System.Reflection.Metadata.MetadataUpdater.IsSupported=false"  TestCallingConventions.dll 
    Running BlittableFunctionPointers...
    -- unmanaged
    -- unmanaged cdecl
    -- unmanaged stdcall
    -- unmanaged modopt(cdecl)
    -- unmanaged modopt(stdcall)
    -- unmanaged modopt unrecognized
    -- unmanaged modopt(stdcall) modopt(cdecl)
    -- unmanaged modopt(stdcall) modopt(unrecognized)
    -- unmanaged cdecl modopt(stdcall)
    -- unmanaged stdcall modopt(cdecl)
    Running NonblittableFunctionPointers...
    -- unmanaged
    Expected: 100
    Actual: -1073740286
    END EXECUTION - FAILED
    FAILED
    Test Harness Exitcode is : 1
    To run the test:
    > set CORE_ROOT=C:\h\w\B5340A00\p
    > C:\h\w\B5340A00\w\96F907F5\e\baseservices\callconvs\TestCallingConventions\TestCallingConventions.cmd
    Expected: True
    Actual:   False
    

    Stack trace:

      at baseservices_callconvs._TestCallingConventions_TestCallingConventions_._TestCallingConventions_TestCallingConventions_cmd()
      at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
      at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    
  8. BruceForstall commented on Feb 13, 2023

    @BruceForstall
    Contributor

    @EgorBo This test continues to fail regularly. PTAL.

  9. added
    disabled-testThe test is disabled in source code against the issue
    and removed on Feb 14, 2023
  10. BruceForstall commented on Feb 14, 2023

    @BruceForstall
    Contributor

    The test is now disabled (for GCStress), so remove blocking label, add disabled-test label

  11. removed
    Priority:1Work that is critical for the release, but we could probably ship without
    on Aug 14, 2023
  12. BruceForstall commented on Sep 21, 2023

    @BruceForstall
    Contributor

    I can't reproduce this locally. Submitted PR to re-enable for GCStress and triggered GCStress pipelines: #92445

  13. BruceForstall commented on Sep 22, 2023

    @BruceForstall
    Contributor

    I re-enabled the test. If it fails again, we'll get a new issue.

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

Metadata

Metadata

Assignees

Labels

GCStressJitStressCLR JIT issues involving JIT internal stress modesarch-x86area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIos-windows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions