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

Many tests failed with Verify_FieldOffset 'ExtendedSocketException._endPoint' Field offset 128!=136(actual) || baseOffset 128!=136(actual) #49982

Closed
VincentBu opened this issue Mar 22, 2021 · 14 comments · Fixed by #50364
Labels
Milestone

Comments

@VincentBu
Copy link
Contributor

Run: runtime-coreclr crossgen2 20210320.1

One of error message:

/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.sh: line 280: -r:/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/IL-CG2/.dll: No such file or directory
rm: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/common.dll.rsp: No such file or directory
rm: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.dll.rsp: No such file or directory

Assert failure(PID 1344 [0x00000540], Thread: 1065195 [0x1040eb]): Verify_FieldOffset 'ExtendedSocketException._endPoint' Field offset 128!=136(actual) || baseOffset 128!=136(actual)
 File: /Users/runner/work/1/s/src/coreclr/vm/jitinterface.cpp Line: 14129
 Image: /private/tmp/helix/working/AD85094A/p/corerun

MachO coredumps are not supported. To enable ELF coredumps on MacOS, set the COMPlus_DbgEnableElfDumpOnMacOS environment variable to 1.
/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.sh: line 401: 1344 Abort trap: 6 (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code: 1
Raw output file: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/Reports/tracing.eventpipe/processinfo/processinfo/processinfo.output.txt
Raw output:
BEGIN EXECUTION
in takeLock
/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/IL-CG2/common.dll
Response file: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/common.dll.rsp
/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/IL-CG2/common.dll
-o:/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/common.dll
-r:/tmp/helix/working/AD85094A/p/System..dll
-r:/tmp/helix/working/AD85094A/p/Microsoft..dll
-r:/tmp/helix/working/AD85094A/p/mscorlib.dll
--verify-type-and-field-layout
--targetarch:x64
-O
Running CrossGen2: dotnet /tmp/helix/working/AD85094A/p/crossgen2/crossgen2.dll @/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/common.dll.rsp 
Emitting R2R PE file: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/common.dll
/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/IL-CG2/processinfo.dll
Response file: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.dll.rsp
/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/IL-CG2/processinfo.dll
-o:/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.dll
-r:/tmp/helix/working/AD85094A/p/System..dll
-r:/tmp/helix/working/AD85094A/p/Microsoft.*.dll
-r:/tmp/helix/working/AD85094A/p/mscorlib.dll
--verify-type-and-field-layout
--targetarch:x64
-O
Running CrossGen2: dotnet /tmp/helix/working/AD85094A/p/crossgen2/crossgen2.dll @/private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.dll.rsp 
Emitting R2R PE file: /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.dll
in ReleaseLock
/tmp/helix/working/AD85094A/p/corerun processinfo.dll ''
 0.0s: Test PID: 1344
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test Harness Exitcode is : 1
To run the test:
> set CORE_ROOT=/tmp/helix/working/AD85094A/p
> /private/tmp/helix/working/AD85094A/w/B37709B8/e/tracing/eventpipe/processinfo/processinfo/processinfo.sh
Expected: True
Actual: False

Stack trace
   at tracing_eventpipe._processinfo_processinfo_processinfo_._processinfo_processinfo_processinfo_sh()

@VincentBu VincentBu added arch-arm64 os-linux Linux OS (any supported distro) os-mac-os-x macOS aka OSX arch-x64 labels Mar 22, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-crossgen2-coreclr untriaged New issue has not been triaged by the area owner labels Mar 22, 2021
@mangod9 mangod9 removed the untriaged New issue has not been triaged by the area owner label Mar 22, 2021
@mangod9 mangod9 added this to the 6.0.0 milestone Mar 22, 2021
@mangod9
Copy link
Member

mangod9 commented Mar 22, 2021

cc @trylek @dotnet/crossgen-contrib. Possibly due to optimizations which were recently enabled?

@davidwrighton
Copy link
Member

This is likely caused by @trylek's change to make our cg2 testing more similar to how we are shipping preview3. Looks to be a small bug in the type layout engine of crossgen2.

@davidwrighton
Copy link
Member

(Note that this isn't likely newly introduced, just newly found)

trylek added a commit to trylek/runtime that referenced this issue Mar 24, 2021
I hit this while creating a regression test for the issue dotnet#49982.
In the initial composite R2R design I proposed slightly different
organization of the header tables when the composite image
only comprises a single file; later on I removed this special
casing as it was confusing and making the format more complicated
but apparently I forgot to fix this runtime bit. When there's a
composite image with only one component in it, we weren't properly
initializing the component header table and so we were unable to
resolve any R2R methods for the composite image.

Thanks

Tomas
trylek added a commit that referenced this issue Mar 24, 2021
I hit this while creating a regression test for the issue #49982.
In the initial composite R2R design I proposed slightly different
organization of the header tables when the composite image
only comprises a single file; later on I removed this special
casing as it was confusing and making the format more complicated
but apparently I forgot to fix this runtime bit. When there's a
composite image with only one component in it, we weren't properly
initializing the component header table and so we were unable to
resolve any R2R methods for the composite image.

Thanks

Tomas
@trylek
Copy link
Member

trylek commented Mar 25, 2021

I finally understand the underlying problem and I believe it exposes a pre-existing debt from the time of composite implementation we need to figure out how to address: the discrepancy is basically between these two lines of code:

if (!ModuleMatchesCompilationUnitIndex(derivedType.Module, baseType.Module) ||

and

return module1->GetCompositeNativeImage() == module2->GetCompositeNativeImage();

The Crossgen2 version basically states that anything outside of the current version bubble is "some other big version bubble" which is true for composite framework but not for single-file framework with large bubble turned off. To support the fully general case we'd probably need to have a way of specifying version bubble boundaries for reference assemblies in Crossgen2. At the very least we'd probably need a boolean flag stating whether the outside of the current version bubble is one bubble or not but that won't support hierarchical version bubbles (e.g. ASP.NET composite on top of framework composite).

I actually think it shouldn't be rocket science to implement even the general case by using a state machine - perhaps a special option, something like --bubble-boundary, that would be used as a reference assembly separator declaring the version bubble boundaries; Alternatively we may be able to devise some extended syntax for reference assemblies that would allow specifying some version bubble ID for each reference - something like -r[FW]:System.*.dll, -r[ASP]:Microsoft.AspNet.*.dll, I just made these up purely for demonstrational purposes.

While the implementation on the Crossgen2 side is mostly trivial in all the proposed cases, I'm reluctant to dive into it before I hear what @davidwrighton has to say on the subject.

@davidwrighton
Copy link
Member

That's very interesting. I am reluctant to try to specify the shape of the various bubbles, but instead would prefer to make the system a bit more conservative. In general the point of not being in the current version bubble is that the shape of other assemblies version bubbles should be immaterial. In general, if we are able to know the shape of the other assembly version bubble, we should probably be able to include that code in the current version bubble.

@VincentBu
Copy link
Contributor Author

Test Interop/LayoutClass/LayoutClassTest/LayoutClassTest.sh failed with similar Assert failure.
Run: runtime-coreclr crossgen2 20210324.1

Failed tests:

 -Interop/LayoutClass/LayoutClassTest/LayoutClassTest.sh
 -Interop\\LayoutClass\\LayoutClassTest\\LayoutClassTest.cmd

Error message:

/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.sh: line 254: -r:/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/IL-CG2/.dll: No such file or directory
rm: cannot remove '/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.dll.rsp': No such file or directory
rm: cannot remove '/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/TestLibrary.dll.rsp': No such file or directory

Assert failure(PID 2847 [0x00000b1f], Thread: 2847 [0x0b1f]): Verify_FieldOffset 'PInvokeTests.SeqDerivedClass.a' Field offset 8!=12(actual) || baseOffset 8!=16(actual)
 File: /__w/1/s/src/coreclr/vm/jitinterface.cpp Line: 14129
 Image: /root/helix/work/correlation/corerun

apply_reg_state: ip and cfa unchanged; stopping here (ip=0x7fad8b5184)
apply_reg_state: ip and cfa unchanged; stopping here (ip=0x7fad8b5184)
apply_reg_state: ip and cfa unchanged; stopping here (ip=0x7fad8aa24c)
/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.sh: line 377: 2847 Aborted (core dumped) $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"

Return code: 1
Raw output file: /root/helix/work/workitem/Interop/LayoutClass/Reports/Interop.LayoutClass/LayoutClassTest/LayoutClassTest.output.txt
Raw output:
BEGIN EXECUTION
in takeLock
/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/IL-CG2/LayoutClassTest.dll
Response file: /root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.dll.rsp
/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/IL-CG2/LayoutClassTest.dll
-o:/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.dll
-r:/root/helix/work/correlation/System..dll
-r:/root/helix/work/correlation/Microsoft..dll
-r:/root/helix/work/correlation/mscorlib.dll
--verify-type-and-field-layout
--targetarch:arm64
-O
Running CrossGen2: dotnet /root/helix/work/correlation/crossgen2/crossgen2.dll @/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.dll.rsp 
Emitting R2R PE file: /root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.dll
/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/IL-CG2/TestLibrary.dll
Response file: /root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/TestLibrary.dll.rsp
/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/IL-CG2/TestLibrary.dll
-o:/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/TestLibrary.dll
-r:/root/helix/work/correlation/System..dll
-r:/root/helix/work/correlation/Microsoft.*.dll
-r:/root/helix/work/correlation/mscorlib.dll
--verify-type-and-field-layout
--targetarch:arm64
-O
Running CrossGen2: dotnet /root/helix/work/correlation/crossgen2/crossgen2.dll @/root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/TestLibrary.dll.rsp 
Emitting R2R PE file: /root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/TestLibrary.dll
in ReleaseLock
/root/helix/work/correlation/corerun LayoutClassTest.dll ''
Running SequentialClass...
Running DerivedClassWithEmptyBase...
Gathering state for process 2847 corerun
Writing minidump with heap to file /home/helixbot/dotnetbuild/dumps/coredump.2847.dmp
Written 63365120 bytes (15470 pages) to core file
Dump successfully written
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test Harness Exitcode is : 1
To run the test:
> set CORE_ROOT=/root/helix/work/correlation
> /root/helix/work/workitem/Interop/LayoutClass/LayoutClassTest/LayoutClassTest.sh
Expected: True
Actual: False

Stack trace
   at Interop_LayoutClass._LayoutClassTest_LayoutClassTest_._LayoutClassTest_LayoutClassTest_sh()

@trylek
Copy link
Member

trylek commented Mar 26, 2021

Hello David!

Thanks for your feedback. I agree that specifying the shape of external version bubbles is unfortunate and fundamentally undermines the R2R resiliency principles. Let me first describe what exactly happens in this particular case to better demonstrate the underlying problem. The problem is basically SocketException deriving from Win32Exception deriving from Exception via ExternalException and SystemException. Exception by itself has 128 (0x80) bytes (including the method table pointer) on x64. ExternalException and SystemException don't add any data, it's only Win32Exception which adds the native 32-bit HRESULT and that misaligns the class size to 132 (0x84). At runtime, methodtablebuilder for SocketException queries whether base class alignment is needed between SocketException in System.Net.Internals and Win32Exception in System.ComponentModel and that subsequently causes the discrepancy.

Today, base alignment is considered to be needed when the framework assemblies are compiled one by one; when the framework is compiled in composite or large version bubble mode, CoreCLR runtime decides that the alignment is not needed. If, in accordance with your feedback, we don't want to specify this framework build detail in every single app with a class deriving from SocketException, I believe we either need to remove the distinction or defer its resolution to the runtime.

For "removing the distinction", aligning the base class always would presumably incur memory consumption regression (some class instances would become larger). For dynamic resolution, we would need to make sure base class size information is accessed via helpers; in fact I was under the impression that R2R already implements these helpers - maybe we're just doing something wrong in getFieldInfo the Crossgen2 compiler so that the wrong access method is used; or perhaps we're encoding the field access properly and the type / field layout check is generated when it shouldn't be.

Thanks

Tomas

/cc @jkotas

@jkotas
Copy link
Member

jkotas commented Mar 26, 2021

I agree that specifying the shape of external version bubbles would be very unfortunate.

The field offset verification logic does not seem to handle this case correctly. Is the problem just in the field offset verification logic; or is the actual code also wrong?

@trylek
Copy link
Member

trylek commented Mar 26, 2021

Thanks Jan for your comment. For now my super-simple regression test looks as follows:

class Program
{
    private class MockEndPoint : EndPoint
    {
    }

    private sealed class ExtendedSocketException : SocketException
    {
        private readonly EndPoint? _endPoint;

        public ExtendedSocketException(EndPoint? endPoint)
            : base(0)
        {
            _endPoint = endPoint;
        }
        
        public bool EndPointEquals(EndPoint? endPoint)
        {
            return _endPoint == endPoint;
        }
    }

    static bool TestExtendedSocketException()
    {
        EndPoint endPoint = new MockEndPoint();
        ExtendedSocketException extendedSocketException = new ExtendedSocketException(endPoint);
        Console.WriteLine("ExtendedSocketException: {0}", extendedSocketException.GetType());
        return extendedSocketException.EndPointEquals(endPoint);
    }

    static int Main()
    {
        Console.WriteLine("Extended socket exception:");
        return TestExtendedSocketException() ? 100 : 1;
    }
}

The R2RDump disassembly for the TestExtendedSocketException method looks like this (with field layout verification turned off as otherwise it would crash the test app):

bool Program.TestExtendedSocketException()
Handle: 0x06000001
Rid: 1
EntryPointRuntimeFunctionId: 0
Number of RuntimeFunctions: 1
Number of fixups: 4
    TableIndex 4, Offset 0000: Program+MockEndPoint (TYPE_HANDLE)
    TableIndex 4, Offset 0001: Program+ExtendedSocketException (TYPE_HANDLE)
    TableIndex 4, Offset 0002: Program+ExtendedSocketException (FIELD_BASE_OFFSET)
    TableIndex 5, Offset 0000: "ExtendedSocketException: {0}" (STRING_HANDLE)

bool Program.TestExtendedSocketException()
Id: 0
StartAddress: 0x000013A0
Size: 123 bytes
UnwindRVA: 0x00001270
Version:            1
Flags:              0x03 EHANDLER UHANDLER
SizeOfProlog:       0x0008
CountOfUnwindCodes: 5
FrameRegister:      None
FrameOffset:        0x0
PersonalityRVA:     0x199C
UnwindCode[0]: CodeOffset 0x0008 FrameOffset 0x0000 NextOffset 0x0 Op 40
UnwindCode[2]: CodeOffset 0x0003 FrameOffset 0x0000 NextOffset 0x0 Op RBP(5)
UnwindCode[4]: CodeOffset 0x0001 FrameOffset 0x0000 NextOffset 0x0 Op RDI(7)

Debug Info
    Bounds:
    Native Offset: 0x0, Prolog, Source Types: StackEmpty
    Native Offset: 0x8, IL Offset: 0x0001, Source Types: StackEmpty
    Native Offset: 0x1A, IL Offset: 0x0007, Source Types: StackEmpty
    Native Offset: 0x42, IL Offset: 0x000e, Source Types: StackEmpty
    Native Offset: 0x68, IL Offset: 0x001f, Source Types: StackEmpty
    Native Offset: 0x72, IL Offset: 0x0029, Source Types: StackEmpty
    Native Offset: 0x72, Epilog, Source Types: StackEmpty

13a0: 57                        push    rdi
                                UWOP_PUSH_NONVOL RDI(7)                                0

13a1: 56                        push    rsi
                                UWOP_PUSH_NONVOL RSI(6)                                0

13a2: 55                        push    rbp
                                UWOP_PUSH_NONVOL RBP(5)                                0

13a3: 53                        push    rbx
                                UWOP_PUSH_NONVOL RBX(3)                                0

13a4: 48 83 ec 28               sub     rsp, 40
                                UWOP_ALLOC_SMALL 40                                0

13a8: ff 15 0a 0d 00 00         call    qword ptr [0x20b8]    // Program+MockEndPoint (NEW_OBJECT)
13ae: 48 8b f0                  mov     rsi, rax
13b1: 48 8b ce                  mov     rcx, rsi
13b4: ff 15 0e 0d 00 00         call    qword ptr [0x20c8]    // void System.Net.EndPoint..ctor() (METHOD_ENTRY_REF_TOKEN)
13ba: ff 15 00 0d 00 00         call    qword ptr [0x20c0]    // Program+ExtendedSocketException (NEW_OBJECT)
13c0: 48 8b f8                  mov     rdi, rax
13c3: 48 8b cf                  mov     rcx, rdi
13c6: 33 d2                     xor     edx, edx
13c8: ff 15 02 0d 00 00         call    qword ptr [0x20d0]    // void System.Net.Sockets.SocketException..ctor(int) (METHOD_ENTRY_REF_TOKEN)
13ce: 48 8b 1d 2b 0d 00 00      mov     rbx, qword ptr [0x2100] // Program+ExtendedSocketException (FIELD_BASE_OFFSET)
13d5: 48 8d 0c 1f               lea     rcx, [rdi + rbx]
13d9: 48 8b d6                  mov     rdx, rsi
13dc: ff 15 be 0c 00 00         call    qword ptr [0x20a0]    // WRITE_BARRIER (HELPER)
13e2: 48 8b 0d 1f 0d 00 00      mov     rcx, qword ptr [0x2108] // "ExtendedSocketException: {0}" (STRING_HANDLE)
13e9: 48 8b 29                  mov     rbp, qword ptr [rcx]
13ec: 48 8b cf                  mov     rcx, rdi
13ef: 4c 8d 1d 82 0c 00 00      lea     r11, [0x2078]         // System.Type System.Exception.GetType() (VIRTUAL_ENTRY)
13f6: ff 15 7c 0c 00 00         call    qword ptr [0x2078]    // System.Type System.Exception.GetType() (VIRTUAL_ENTRY)
13fc: 48 8b d0                  mov     rdx, rax
13ff: 48 8b cd                  mov     rcx, rbp
1402: ff 15 d8 0c 00 00         call    qword ptr [0x20e0]    // void System.Console.WriteLine(string, object) (METHOD_ENTRY_REF_TOKEN)
1408: 48 39 34 1f               cmp     qword ptr [rdi + rbx], rsi
140c: 0f 94 c0                  sete    al
140f: 0f b6 c0                  movzx   eax, al
1412: 48 83 c4 28               add     rsp, 40
1416: 5b                        pop     rbx
1417: 5d                        pop     rbp
1418: 5e                        pop     rsi
1419: 5f                        pop     rdi
141a: c3                        ret

According to the disassembly I believe the codegen is correct and the field layout verification is "overzealous" in the sense that in these cases it should probably only verify the relative field offset to the base. I'll investigate in more detail how exactly we're producing these fixups and whether I might be able to adjust the logic as appropriate. I suspect that a "rough-hewn" solution is to disable field layout checks in this case, a more precise solution would probably require either creating another fixup or defining some special form of the existing type / field verification fixup (e.g. by specifying base class size = 0) that would only cater for the relative differences and ignore the superclass - in accordance with your feedback from previous issues of this type I believe we shouldn't be querying for / verifying the layouts in version bubbles external to the current compilation.

@davidwrighton
Copy link
Member

@trylek yes, that sounds like a good approach. In the meantime, if this is going to take you a while to enable, we should just disable generation of the field layout checks for the test binaries so that we can get our test system off of the ground.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Mar 29, 2021
@VincentBu
Copy link
Contributor Author

Failed again in runtime-coreclr crossgen2 20210405.2

Failed test:

R2R-CG2 windows x64 Checked no_tiered_compilation @ Windows.10.Amd64.Open
 -Interop\\LayoutClass\\LayoutClassTest\\LayoutClassTest.cmd

Error message:

Could Not Find C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\LayoutClassNative.dll.rsp
Could Not Find C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll.rsp
Could Not Find C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\TestLibrary.dll.rsp

Assert failure(PID 872 [0x00000368], Thread: 2012 [0x07dc]): Verify_FieldOffset 'PInvokeTests.SeqDerivedClass.a' Field offset 8!=12(actual) || baseOffset 8!=16(actual)

CORECLR! GetCLRRuntimeHost + 0xB3F9F (0x00007ffbff93fcef)
CORECLR! <no symbol> + 0x0 (0x00007ffbff80fe2b)
CORECLR! GetCLRRuntimeHost + 0x2053FD (0x00007ffbffa9114d)
CORECLR! GetCLRRuntimeHost + 0x206F8B (0x00007ffbffa92cdb)
CORECLR! GetCLRRuntimeHost + 0x16ADEC (0x00007ffbff9f6b3c)
CORECLR! GetCLRRuntimeHost + 0x16ABCA (0x00007ffbff9f691a)
CORECLR! GetCLRRuntimeHost + 0x16DB9E (0x00007ffbff9f98ee)
CORECLR! GetCLRRuntimeHost + 0x16D85D (0x00007ffbff9f95ad)
CORECLR! <no symbol> + 0x0 (0x00007ffbff86ee95)
CORECLR! GetCLRRuntimeHost + 0x1677B6 (0x00007ffbff9f3506)
 File: D:\workspace\_work\1\s\src\coreclr\vm\jitinterface.cpp Line: 14128
 Image: C:\h\w\B88109EF\p\corerun.exe


Return code: 1
Raw output file: C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\Reports\Interop.LayoutClass\LayoutClassTest\LayoutClassTest.output.txt
Raw output:
BEGIN EXECUTION
LayoutClassNative.dll
LayoutClassTest.dll
TestLibrary.dll
 3 file(s) copied.
Response file: C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassNative.dll.rsp
C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\LayoutClassNative.dll
-o:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassNative.dll
--targetarch:x64
--verify-type-and-field-layout
-r:C:\h\w\B88109EF\p\System..dll
-r:C:\h\w\B88109EF\p\Microsoft..dll
-r:C:\h\w\B88109EF\p\mscorlib.dll
-r:C:\h\w\B88109EF\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B88109EF\p\crossgen2\crossgen2.dll" @"C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassNative.dll.rsp" -r:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\.dll"
No input files are loadable
Response file: C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassTest.dll.rsp
C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\LayoutClassTest.dll
-o:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassTest.dll
--targetarch:x64
--verify-type-and-field-layout
-r:C:\h\w\B88109EF\p\System..dll
-r:C:\h\w\B88109EF\p\Microsoft..dll
-r:C:\h\w\B88109EF\p\mscorlib.dll
-r:C:\h\w\B88109EF\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B88109EF\p\crossgen2\crossgen2.dll" @"C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassTest.dll.rsp" -r:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\.dll -r:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\.dll"
Emitting R2R PE file: C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\LayoutClassTest.dll
Response file: C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\TestLibrary.dll.rsp
C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\TestLibrary.dll
-o:C:\h\w\B88109EF\w\B1DD0965\e\Interop\LayoutClass\LayoutClassTest\\TestLibrary.dll
--targetarch:x64
--verify-type-and-field-layout
-r:C:\h\w\B88109EF\p\System..dll
-r:C:\h\w\B88109EF\p\Microsoft.*.dll
-r:C:\h\w\B88109EF\p\mscorlib

Stack trace
   at Interop_LayoutClass._LayoutClassTest_LayoutClassTest_._LayoutClassTest_LayoutClassTest_cmd()

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Apr 7, 2021
@ghost ghost locked as resolved and limited conversation to collaborators May 7, 2021
@VincentBu
Copy link
Contributor Author

Failed again in runtime-coreclr outerloop 20210616.5

Failed test:

R2R-CG2 windows x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open

- Interop\\LayoutClass\\LayoutClassTest\\LayoutClassTest.cmd

Error message:

Could Not Find C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassNative.dll.rsp
Could Not Find C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll.rsp
Could Not Find C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\TestLibrary.dll.rsp

Assert failure(PID 3660 [0x00000e4c], Thread: 4572 [0x11dc]): Verify_FieldOffset 'PInvokeTests.SeqDerivedClass.a' Field offset 8!=4(actual) || baseOffset 8!=8(actual)

CORECLR! LoadDynamicInfoEntry + 0xB34 (0x7069d3d4)
CORECLR! Module::FixupNativeEntry + 0x1A0 (0x705d66e0)
CORECLR! Module::FixupDelayListAux<Module ,int (__thiscall Module::)(CORCOMPILE_IMPORT_SECTION *,unsigned long,unsigned long *)> + 0x34A (0x7079b4e8)
CORECLR! ReadyToRunInfo::GetEntryPoint + 0x223 (0x7079c910)
CORECLR! MethodDesc::GetPrecompiledR2RCode + 0x9A (0x70727045)
CORECLR! MethodDesc::GetPrecompiledCode + 0x8C (0x70726e66)
CORECLR! MethodDesc::PrepareILBasedCode + 0x243 (0x707293e8)
CORECLR! MethodDesc::PrepareCode + 0xB0 (0x70729173)
CORECLR! CodeVersionManager::PublishVersionableCodeIfNecessary + 0x25D (0x7061e3a0)
CORECLR! MethodDesc::DoPrestub + 0x6D9 (0x70724698)
File: D:\workspace_work\1\s\src\coreclr\vm\jitinterface.cpp Line: 14251
Image: C:\h\w\B55F09AF\p\corerun.exe

Return code:      1
Raw output file:      C:\h\w\B55F09AF\w\B2BF099E\uploads\Reports\Interop.LayoutClass\LayoutClassTest\LayoutClassTest.output.txt
Raw output:
BEGIN EXECUTION
LayoutClassNative.dll
LayoutClassTest.dll
TestLibrary.dll
3 file(s) copied.
Response file: C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassNative.dll.rsp
C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\LayoutClassNative.dll
-o:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassNative.dll
--targetarch:x86
--verify-type-and-field-layout
-r:C:\h\w\B55F09AF\p\System..dll
-r:C:\h\w\B55F09AF\p\Microsoft..dll
-r:C:\h\w\B55F09AF\p\mscorlib.dll
-r:C:\h\w\B55F09AF\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B55F09AF\p\crossgen2\crossgen2.dll" @"C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassNative.dll.rsp"   -r:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2*.dll"
No input files are loadable
Response file: C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll.rsp
C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\LayoutClassTest.dll
-o:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll
--targetarch:x86
--verify-type-and-field-layout
-r:C:\h\w\B55F09AF\p\System..dll
-r:C:\h\w\B55F09AF\p\Microsoft..dll
-r:C:\h\w\B55F09AF\p\mscorlib.dll
-r:C:\h\w\B55F09AF\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B55F09AF\p\crossgen2\crossgen2.dll" @"C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll.rsp"   -r:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2*.dll -r:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2*.dll"
Emitting R2R PE file: C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\LayoutClassTest.dll
Response file: C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\TestLibrary.dll.rsp
C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2\TestLibrary.dll
-o:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\TestLibrary.dll
--targetarch:x86
--verify-type-and-field-layout
-r:C:\h\w\B55F09AF\p\System..dll
-r:C:\h\w\B55F09AF\p\Microsoft..dll
-r:C:\h\w\B55F09AF\p\mscorlib.dll
-r:C:\h\w\B55F09AF\p\netstandard.dll
-O
" "dotnet" "C:\h\w\B55F09AF\p\crossgen2\crossgen2.dll" @"C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\TestLibrary.dll.rsp"   -r:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutClass\LayoutClassTest\IL-CG2*.dll -r:C:\h\w\B55F09AF\w\B2BF099E\e\Interop\LayoutC


Stack trace
   at Interop_LayoutClass._LayoutClassTest_LayoutClassTest_._LayoutClassTest_LayoutClassTest_cmd() in Interop.LayoutClass.XUnitWrapper.dll:token 0x6000004+0x284

@jkotas
Copy link
Member

jkotas commented Jun 17, 2021

@VincentBu This issue is closed. Could you please open a new one?

@VincentBu
Copy link
Contributor Author

@VincentBu This issue is closed. Could you please open a new one?

Opened a new one here 54316 , thanks for reminding

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants