Skip to content

[jitstress] GC hole in libraries test with JitStress=2 #88168

Closed

Description

@jakobbotsch

Looking at this failure: https://dev.azure.com/dnceng-public/public/_build/results?buildId=323067&view=ms.vss-test-web.build-test-results-tab&runId=6640628&resultId=201899&paneView=dotnet-dnceng.dnceng-anon-build-release-tasks.helix-anon-test-information-tab
Console log: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-88090-merge-db22b0df4ffd4c4bae/System.Runtime.Serialization.Xml.Tests/1/console.c66fcf9f.log?helixlogtype=result

C:\h\w\C0A909A9\w\A6330968\e>set DOTNET 
DOTNET_JitStress=2
DOTNET_TieredCompilation=0

C:\h\w\C0A909A9\w\A6330968\e>call RunTests.cmd --runtime-path C:\h\w\C0A909A9\p 
----- start Wed 06/28/2023  5:16:38.33 ===============  To repro directly: =====================================================
pushd C:\h\w\C0A909A9\w\A6330968\e\
"C:\h\w\C0A909A9\p\dotnet.exe" exec --runtimeconfig System.Runtime.Serialization.Xml.Tests.runtimeconfig.json --depsfile System.Runtime.Serialization.Xml.Tests.deps.json xunit.console.dll System.Runtime.Serialization.Xml.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing 
popd
===========================================================================================================

C:\h\w\C0A909A9\w\A6330968\e>"C:\h\w\C0A909A9\p\dotnet.exe" exec --runtimeconfig System.Runtime.Serialization.Xml.Tests.runtimeconfig.json --depsfile System.Runtime.Serialization.Xml.Tests.deps.json xunit.console.dll System.Runtime.Serialization.Xml.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Runtime.Serialization.Xml.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Runtime.Serialization.Xml.Tests (found 279 of 280 test cases)
  Starting:    System.Runtime.Serialization.Xml.Tests (parallel test collections = on, max threads = 4)

Assert failure(PID 904 [0x00000388], Thread: 1924 [0x0784]): !CREATE_CHECK_STRING(!"Detected use of a corrupted OBJECTREF. Possible GC hole.")

CORECLR! GetCLRRuntimeHost + 0xEE190 (0x72415e80)
CORECLR! GetCLRRuntimeHost + 0xEDC38 (0x72415928)
CORECLR! GetCLRRuntimeHost + 0xE97F6 (0x724114e6)
CORECLR! GetCLRRuntimeHost + 0x173CB1 (0x7249b9a1)
CORECLR! GetCLRRuntimeHost + 0x173B6B (0x7249b85b)
<no module>! <no symbol> + 0x0 (0x0d748f93)
<no module>! <no symbol> + 0x0 (0x0d8dedbe)
<no module>! <no symbol> + 0x0 (0x0d748360)
<no module>! <no symbol> + 0x0 (0x0b4d1184)
SYSTEM.PRIVATE.CORELIB! <no symbol> + 0x0 (0x714dfc74)
    File: D:\a\_work\1\s\src\coreclr\vm\object.cpp Line: 600
    Image: C:\h\w\C0A909A9\p\dotnet.exe

Note that this is win-x86. It reproduces locally for me on every run with DOTNET_TieredCompilation=0, DOTNET_JitStress=2 and DOTNET_GCStress=c.

Activity

  1. added this to the 8.0.0 milestone on Jun 28, 2023
  2. ghost added
    needs-area-label
    on Jun 28, 2023
  3. added
    area-CodeGen-coreclr
    on Jun 28, 2023
  4. added
    JitStress
    and removed
    needs-area-label
    on Jun 28, 2023
  5. jakobbotsch commented on Jun 28, 2023

    @jakobbotsch
    MemberAuthor

    Also repros consistently with -maxthreads 1 -parallel none -method System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export_NegativeCases, so seems quite deterministic.

  6. added
    Priority:3
    on Jun 30, 2023
  7. BruceForstall commented on Jul 7, 2023

    @BruceForstall
    Contributor

    Stack trace is

    coreclr!DbgAssertDialog(char * szFile = 0x63ba00d0 "C:\gh\runtime\src\coreclr\vm\object.cpp", int iLine = 0n522, char * szExpr = 0x63ba01ec "!CREATE_CHECK_STRING(pMT && pMT->Validate())")+0x210
    coreclr!Object::ValidateInner(int bDeep = 0n1, int bVerifyNextHeader = 0n1, int bVerifySyncBlock = 0n1)+0x14c
    coreclr!Object::Validate(int bDeep = 0n1, int bVerifyNextHeader = 0n1, int bVerifySyncBlock = 0n1)+0x98
    coreclr!OBJECTREF::OBJECTREF(class OBJECTREF * objref = 0x02d5b76c)+0x1f
    coreclr!VSD_ResolveWorker(struct TransitionBlock * pTransitionBlock = 0x02d5b768, unsigned long siteAddrForRegisterIndirect = 0, unsigned int token = 0x857b6f9e)+0xee
    coreclr!ResolveWorkerAsmStub(void)+0x1b
    system_private_datacontractserialization!System.Runtime.Serialization.XsdDataContractExporter.Export(<Win32 error 0n318>)+0x1b3
    ...
    

    I can repro with:

    set DOTNET_TieredCompilation=0
    set DOTNET_GCStress=C
    
    pushd C:\gh\runtime\artifacts\bin\System.Runtime.Serialization.Xml.Tests\Release\net8.0
    c:\gh\runtime\artifacts\tests\coreclr\windows.x86.Checked\Tests\Core_Root\corerun.exe xunit.console.dll System.Runtime.Serialization.Xml.Tests.dll -xml testResults.xml -maxthreads 1 -parallel none -method System.Runtime.Serialization.Xml.XsdDataContractExporterTests.ExporterApiTests.Export_NegativeCases
    popd
    
    0:000> !u 179e4a13     
    Normal JIT generated code
    System.Runtime.Serialization.XsdDataContractExporter.Export(System.Collections.Generic.ICollection`1<System.Reflection.Assembly>)
    ilAddr is 149609A0 pImport is 0A2A6CE0
    Begin 179E4860, size 21b
    
    ...
    01a4 179e4a04 837dd000        cmp     dword ptr [ebp-30h],0
    01a8 179e4a08 7409            je      system_private_datacontractserialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x1b3 (179e4a13)
    01aa 179e4a0a 8b4dd0          mov     ecx,dword ptr [ebp-30h]
    01ad 179e4a0d ff1580136603    call    dword ptr ds:[3661380h] (CLRStub[VSD_LookupStub]@05320922)
    >>> 01b3 179e4a13 58              pop     eax (gcstress)
    01b4 179e4a14 ffe0            jmp     eax
    ...
    0:000> !gcinfo 179e4a13
    entry point 179E4860
    Normal JIT generated code
    GC info 179F5894
    Method info block:
        method      size   = 021B
        prolog      size   = 14 
        epilog      size   =  8 
        epilog     count   =  1 
        epilog      end    = no  
        callee-saved regs  = EDI ESI EBX EBP 
        ebp frame          = yes  
        fully interruptible= no  
        double align       = no  
        arguments size     =  0 DWORDs
        stack frame size   = 15 DWORDs
        untracked count    =  0 
        var ptr tab count  = 10 
        exception handlers = yes
        epilog # 0    at   01FB
        argTabOffset = 22  
    84 1B AC DF AA | 
    1F 0A 83 7B 22 | 
    
    Pointer table:
    28 11 83 5F    | 0011..01F0  [EBP-28H] a  pointer
    2C 31 83 2E    | 0042..01F0  [EBP-2CH] a  pointer
    30 0B 82 4F    | 004D..019C  [EBP-30H] a  pointer
    38 47 1E    ...| 0094..00B2  [EBP-38H] a  pointer
    3C 07 24    ...| 009B..00BF  [EBP-3CH] a  pointer
    34 2B 2F    ...| 00C6..00F5  [EBP-34H] a  pointer
    40 28 48    ...| 00EE..0136  [EBP-40H] a  pointer
    44 10 38    ...| 00FE..0136  [EBP-44H] a  pointer
    48 22 16    ...| 0120..0136  [EBP-48H] a  pointer
    30 81 04 09    | 01A4..01AD  [EBP-30H] a  pointer
    AB 40    60 ...| 002B        call [ ESI ] argMask=00
    90 60    40 ...| 003B        call [ EDI ESI ] argMask=00
    E8 40    40 ...| 00A3        call [ ESI ] argMask=00
    95 40    40 ...| 00B8        call [ ESI ] argMask=00
    97 40    2D ...| 00CF        call [ ESI ] argMask=00
    2F    90 40 ...| 00DE        call [ ESI ] argMask=00
    2D    40 90 ...| 00EB        call [ ESI ] argMask=00
    90 40    40 ...| 00FB        call [ ESI ] argMask=00
    90 40    2A ...| 010B        call [ ESI ] argMask=00
    28    2C 93 ...| 0113        call [ ESI ] argMask=00
    2A    93 40 ...| 011D        call [ ESI ] argMask=00
    2C    40 B0 ...| 0129        call [ ESI ] argMask=00
    93 40    40 ...| 013C        call [ ESI ] argMask=00
    B0 40    60 ...| 016C        call [ ESI ] argMask=00
    91 60    2A ...| 017D        call [ EDI ESI ] argMask=00
    2A    FF 48 ...| 0187        call [ ESI ] argMask=00
    2A    48 00 ...| 0191        call [ ESI ] argMask=00
    FF    00 00 ...| 
    0:000> !ehinfo 179e4a13
    MethodDesc:   14ab8110
    Method Name:          System.Runtime.Serialization.XsdDataContractExporter.Export(System.Collections.Generic.ICollection`1<System.Reflection.Assembly>)
    Class:                148d0668
    MethodTable:          14ab8324
    mdToken:              06000DA3
    Module:               14918590
    IsJitted:             yes
    Current CodeAddr:     179e4860
    Version History:
      ILCodeVersion:      00000000
      ReJIT ID:           0
      IL Addr:            149609a0
         CodeAddr:           179e4860  (Optimized)
         NativeCodeVersion:  00000000
    
    EHHandler 0: FAULT 
    Clause:  [179e48ad, 179e49f9] [4d, 199]
    Handler: [179e4a04, 179e4a16] [1a4, 1b6]
    
    EHHandler 1: FILTER 
    Clause:  [179e48a2, 179e4a21] [42, 1c1]
    Handler: [179e4a47, 179e4a5b] [1e7, 1fb]
    Filter: [179e4a21] [1c1]
    

    Note that we're in the fault handler of a try/fault, which is itself nested within the try clause of a try/filter/filter-handler clause.

    In the JitDump, the fragment looks like:

    G_M693_IG23:        ; offs=0001A4H, size=000FH, bbWeight=0, PerfScore 0.00, gcVars=02021000 {V00 V02 V03}, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, BB32 [0013], BB33 [0014], gcvars, byref, isz
    
    IN0080: 0001A4 cmp      gword ptr [V03 ebp-30H], 0
    IN0081: 0001A8 je       SHORT G_M693_IG24
    IN0082: 0001AA mov      ecx, gword ptr [V03 ebp-30H]
    IN0083: 0001AD call     [System.IDisposable:Dispose():this]
    
    G_M693_IG24:        ; offs=0001B3H, size=0003H, bbWeight=0, PerfScore 0.00, gcrefRegs=00000000 {}, byrefRegs=00000000 {}, BB34 [0015], byref
    
    IN0084: 0001B3 pop      eax
    IN0085: 0001B4 jmp      eax
    
  8. BruceForstall commented on Jul 7, 2023

    @BruceForstall
    Contributor

    @janvorli Can you take a look at this? It seems like an object used by TransitionFrame must not be properly protected somewhere. The code is in a fault block, so perhaps the EH system is breaking something?

  9. janvorli commented on Jul 18, 2023

    @janvorli
    Member

    I'll take a look.

  10. janvorli commented on Jul 19, 2023

    @janvorli
    Member

    I've reproduced it locally and investigated it. The problem always occurs at the same place when GC is triggered in the exception filter in the
    System.Runtime.Serialization.XsdDataContractExporter.Export method. The filter is supposed to report references of its parent too, but it doesn't do that and that causes the GC hole. Here is a disass of the method including the GC and EH info. The affected slot is the [EBP-2Ch]. The stack walk first reports the frame of the filter at 1324D2DC and then the frame of its parent at 1324D234. As you can see from the list of valid ranges for the [EBP-2CH], the 1324D234 (offset 0xb4) is covered by the range 004F..012A, but the 1324D2DC (offset 15c) is not covered.
    So, I believe it is a problem of incorrect GC info for the filter.

     !u -gcinfo -ehinfo 1324d2dc 
    Normal JIT generated code
    System.Runtime.Serialization.XsdDataContractExporter.Export(System.Collections.Generic.ICollection`1<System.Reflection.Assembly>)
    ilAddr is 0C7F09A0 pImport is 0F54FB18
    Begin 1324D180, size 1c5
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 106:
    0011..017E  [EBP-24H] a  pointer
    0044..017E  [EBP-28H] a  pointer
    004F..012A  [EBP-2CH] a  pointer
    00B4..00D3  [EBP-30H] a  pointer
    0113..0120  [EBP-30H] a  pointer
    0132..013B  [EBP-2CH] a  pointer
    01BD..01C5  [EBP-24H] a  pointer
    01C0..01C5  [EBP-28H] a  pointer
    1324d180 55              push    ebp
    1324d181 8bec            mov     ebp,esp
    1324d183 57              push    edi
    1324d184 56              push    esi
    1324d185 53              push    ebx
    1324d186 83ec24          sub     esp,24h
    1324d189 33c0            xor     eax,eax
    1324d18b 8945e8          mov     dword ptr [ebp-18h],eax
    1324d18e 894ddc          mov     dword ptr [ebp-24h],ecx
    1324d191 8bf2            mov     esi,edx
    1324d193 85f6            test    esi,esi
    1324d195 0f8476010000    je      System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x191 (1324d311)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 108:
    1324d19b 8b790c          mov     edi,dword ptr [ecx+0Ch]
    1324d19e 85ff            test    edi,edi
    1324d1a0 741b            je      System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x3d (1324d1bd)
    1324d1a2 b980070a0e      mov     ecx,0E0A0780h (MT: System.Runtime.Serialization.DataContracts.DataContractSet)
    1324d1a7 e8685e9def      call    CORINFO_HELP_NEWSFAST (02c23014)
    002C        call [ EDI ESI ] argMask=00
    1324d1ac 8bd8            mov     ebx,eax
    1324d1ae 8bd7            mov     edx,edi
    1324d1b0 8bcb            mov     ecx,ebx
    1324d1b2 ff15c067030e    call    dword ptr [CLRStub[MethodDescPrestub]@0E0367C0 (0e0367c0)] (gcstress)
    0038        call [ ESI EBX ] argMask=00
    1324d1b8 e980010000      jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x1bd (1324d33d)
    1324d1bd 33db            xor     ebx,ebx
    1324d1bf e979010000      jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x1bd (1324d33d)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 111:
    EHHandler 1: FILTER CLAUSE BEGIN
    1324d1c4 8bce            mov     ecx,esi
    1324d1c6 ff15802a1b03    call    dword ptr ds:[31B2A80h] (CLRStub[VSD_LookupStub]@12032DFA)
    1324d1cc 8945d4          mov     dword ptr [ebp-2Ch],eax
    EHHandler 0: FAULT CLAUSE BEGIN
    1324d1cf e987000000      jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0xdb (1324d25b)
    1324d1d4 8b4dd4          mov     ecx,dword ptr [ebp-2Ch]
    1324d1d7 ff15882a1b03    call    dword ptr ds:[31B2A88h] (CLRStub[VSD_DispatchStub]@11FEDA67)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 113:
    1324d1dd 85c0            test    eax,eax
    1324d1df 0f8589000000    jne     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0xee (1324d26e)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 114:
    1324d1e5 b97c577608      mov     ecx,876577Ch (MT: System.ArgumentException)
    1324d1ea e8255e9def      call    CORINFO_HELP_NEWSFAST (02c23014)
    1324d1ef 8bf0            mov     esi,eax
    1324d1f1 b9f7430000      mov     ecx,43F7h
    1324d1f6 ba905e7a0c      mov     edx,0C7A5E90h
    1324d1fb e890340f47      call    coreclr!JIT_StrCns (5a340690)
    0080        call [ ESI ] argMask=00
    1324d200 8bc8            mov     ecx,eax
    1324d202 ff15c0e4040e    call    dword ptr [CLRStub[MethodDescPrestub]@0E04E4C0 (0e04e4c0)] (System.SR.GetResourceString(System.String), mdToken: 06000013)
    0088        call [ ESI ] argMask=00
    1324d208 8bf8            mov     edi,eax
    1324d20a b9fe930000      mov     ecx,93FEh
    1324d20f ba905e7a0c      mov     edx,0C7A5E90h
    1324d214 e877340f47      call    coreclr!JIT_StrCns (5a340690)
    0099        call [ EDI ESI ] argMask=00
    1324d219 8bd0            mov     edx,eax
    1324d21b 8bcf            mov     ecx,edi
    1324d21d ff15f0e4040e    call    dword ptr [CLRStub[MethodDescPrestub]@0E04E4F0 (0e04e4f0)] (System.SR.Format(System.String, System.Object), mdToken: 06000015)
    00A3        call [ ESI ] argMask=00
    1324d223 8bd0            mov     edx,eax
    1324d225 8bce            mov     ecx,esi
    1324d227 ff15e0df7808    call    dword ptr [CLRStub[MethodDescPrestub]@0878DFE0 (0878dfe0)] (System.ArgumentException..ctor(System.String), mdToken: 06000B6F)
    00AD        call [ ESI ] argMask=00
    1324d22d 8bce            mov     ecx,esi
    1324d22f e8cc780f47      call    coreclr!IL_Throw (5a344b00)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 118:
    1324d234 8b4dd0          mov     ecx,dword ptr [ebp-30h]
    1324d237 33d2            xor     edx,edx
    1324d239 ff158878030e    call    dword ptr [CLRStub[MethodDescPrestub]@0E037888 (0e037888)] (gcstress)
    00BF        call [ ESI ] argMask=00
    1324d23f 85c0            test    eax,eax
    1324d241 745d            je      System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x120 (1324d2a0)
    1324d243 8b4ddc          mov     ecx,dword ptr [ebp-24h]
    1324d246 ff15604f040e    call    dword ptr [CLRStub[MethodDescPrestub]@0E044F60 (0e044f60)] (gcstress)
    00CC        call [ ESI ] argMask=00
    1324d24c 8bc8            mov     ecx,eax
    1324d24e 8b55d0          mov     edx,dword ptr [ebp-30h]
    1324d251 3909            cmp     dword ptr [ecx],ecx
    1324d253 ff156868030e    call    dword ptr [CLRStub[MethodDescPrestub]@0E036868 (0e036868)] (gcstress)
    00D9        call [ ESI ] argMask=00
    1324d259 eb45            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x120 (1324d2a0)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 111:
    1324d25b 8b4dd4          mov     ecx,dword ptr [ebp-2Ch]
    1324d25e ff15842a1b03    call    dword ptr ds:[31B2A84h] (CLRStub[VSD_DispatchStub]@11FEDA53)
    1324d264 85c0            test    eax,eax
    1324d266 0f8568ffffff    jne     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x54 (1324d1d4)
    1324d26c eb39            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x127 (1324d2a7)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 116:
    1324d26e 8bc8            mov     ecx,eax
    1324d270 8b00            mov     eax,dword ptr [eax]
    1324d272 8b402c          mov     eax,dword ptr [eax+2Ch]
    1324d275 ff5014          call    dword ptr [eax+14h] (gcstress)
    1324d278 8bf0            mov     esi,eax
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 117:
    1324d27a 33ff            xor     edi,edi
    1324d27c 8b5e04          mov     ebx,dword ptr [esi+4]
    1324d27f 85db            test    ebx,ebx
    1324d281 7ed8            jle     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0xdb (1324d25b)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 118:
    1324d283 8b54be08        mov     edx,dword ptr [esi+edi*4+8]
    1324d287 8b4ddc          mov     ecx,dword ptr [ebp-24h]
    1324d28a ff152050040e    call    dword ptr [CLRStub[MethodDescPrestub]@0E045020 (0e045020)] (gcstress)
    0110        call [ ESI ] argMask=00
    1324d290 8945d0          mov     dword ptr [ebp-30h],eax
    1324d293 8bc8            mov     ecx,eax
    1324d295 8b10            mov     edx,dword ptr [eax]
    1324d297 8b5264          mov     edx,dword ptr [edx+64h]
    1324d29a ff12            call    dword ptr [edx] (gcstress)
    011C        call [ ESI ] argMask=00
    1324d29c 85c0            test    eax,eax
    1324d29e 7494            je      System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0xb4 (1324d234)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 117:
    1324d2a0 47              inc     edi
    1324d2a1 3bfb            cmp     edi,ebx
    1324d2a3 7db6            jge     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0xdb (1324d25b)
    1324d2a5 ebdc            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x103 (1324d283)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 111:
    EHHandler 0: FAULT CLAUSE END
    1324d2a7 8b4dd4          mov     ecx,dword ptr [ebp-2Ch]
    1324d2aa ff158c2a1b03    call    dword ptr ds:[31B2A8Ch] (gcstress)
    1324d2b0 eb12            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x144 (1324d2c4)
    EHHandler 0: FAULT HANDLER BEGIN
    1324d2b2 837dd400        cmp     dword ptr [ebp-2Ch],0
    1324d2b6 7409            je      System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x141 (1324d2c1)
    1324d2b8 8b4dd4          mov     ecx,dword ptr [ebp-2Ch]
    1324d2bb ff158c2a1b03    call    dword ptr ds:[31B2A8Ch] (CLRStub[VSD_LookupStub]@04AF091A)
    1324d2c1 58              pop     eax (gcstress)
    1324d2c2 ffe0            jmp     eax
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 121:
    EHHandler 0: FAULT HANDLER END
    1324d2c4 8b4ddc          mov     ecx,dword ptr [ebp-24h]
    1324d2c7 ff156850040e    call    dword ptr [CLRStub[MethodDescPrestub]@0E045068 (0e045068)] (gcstress) (System.Xml.Schema.XmlSchemaObjectEnumerator..ctor(System.Collections.IEnumerator))
    1324d2cd eb3a            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x189 (1324d309)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 122:
    EHHandler 1: FILTER CLAUSE END
    EHHandler 1: FILTER FILTER BEGIN
    1324d2cf 8bd0            mov     edx,eax
    1324d2d1 b9bcb92a08      mov     ecx,82AB9BCh (MT: System.Exception)
    1324d2d6 ff15f8fd2708    call    dword ptr [CLRStub[MethodDescPrestub]@0827FDF8 (0827fdf8)] (System.Runtime.CompilerServices.CastHelpers.IsInstanceOfClass(Void*, System.Object), mdToken: 060063E3)
    >>> 1324d2dc 8bc8            mov     ecx,eax
    1324d2de 85c9            test    ecx,ecx
    1324d2e0 7504            jne     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x166 (1324d2e6)
    1324d2e2 33c0            xor     eax,eax
    1324d2e4 eb0e            jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x174 (1324d2f4)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 123:
    1324d2e6 ff15286c030e    call    dword ptr [CLRStub[MethodDescPrestub]@0E036C28 (0e036c28)] (System.Runtime.Serialization.ExceptionUtility.IsFatal(System.Exception), mdToken: 0600092C)
    1324d2ec 85c0            test    eax,eax
    1324d2ee 0f94c0          sete    al
    1324d2f1 0fb6c0          movzx   eax,al
    1324d2f4 c3              ret
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 125:
    EHHandler 1: FILTER HANDLER BEGIN
    1324d2f5 8b4ddc          mov     ecx,dword ptr [ebp-24h]
    1324d2f8 8d510c          lea     edx,[ecx+0Ch]
    1324d2fb 8b5dd8          mov     ebx,dword ptr [ebp-28h]
    1324d2fe e8392d95ef      call    CORINFO_HELP_ASSIGN_REF_EBX (02ba003c)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 126:
    1324d303 e8c87d0f47      call    coreclr!IL_Rethrow (5a3450d0)
    1324d308 cc              int     3
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 128:
    EHHandler 1: FILTER HANDLER END
    1324d309 8d65f4          lea     esp,[ebp-0Ch]
    1324d30c 5b              pop     ebx (gcstress)
    1324d30d 5e              pop     esi (gcstress)
    1324d30e 5f              pop     edi (gcstress)
    1324d30f 5d              pop     ebp (gcstress)
    1324d310 c3              ret (gcstress)
    
    F:\git\runtime7\src\libraries\System.Private.DataContractSerialization\src\System\Runtime\Serialization\XsdDataContractExporter.cs @ 106:
    1324d311 b990158108      mov     ecx,8811590h (MT: System.ArgumentNullException)
    1324d316 e8f95c9def      call    CORINFO_HELP_NEWSFAST (02c23014)
    1324d31b 8bd8            mov     ebx,eax
    1324d31d b9fe930000      mov     ecx,93FEh
    1324d322 ba905e7a0c      mov     edx,0C7A5E90h
    1324d327 e864330f47      call    coreclr!JIT_StrCns (5a340690)
    01AC        call [ EBX ] argMask=00
    1324d32c 8bd0            mov     edx,eax
    1324d32e 8bcb            mov     ecx,ebx
    1324d330 ff15c85f7908    call    dword ptr [CLRStub[MethodDescPrestub]@08795FC8 (08795fc8)] (System.ArgumentNullException..ctor(System.String), mdToken: 06000B7D)
    01B6        call [ EBX ] argMask=00
    
    1324d336 8bcb            mov     ecx,ebx
    1324d338 e8c3770f47      call    coreclr!IL_Throw (5a344b00)
    1324d33d 895dd8          mov     dword ptr [ebp-28h],ebx
    1324d340 e97ffeffff      jmp     System_Private_DataContractSerialization!System.Runtime.Serialization.XsdDataContractExporter.Export+0x44 (1324d1c4)
    
  11. ghost added
    in-pr
    on Jul 20, 2023
  12. BruceForstall commented on Jul 20, 2023

    @BruceForstall
    Contributor

    Thank you @janvorli for the investigation!

    It turns out this same issue was found and fixed with dotnet/coreclr#23044, but that fix had a minor problem with top-level filter clauses. I've put up a fix with #89228.

  13. added a commit that references this issue on Jul 20, 2023
    47baf4f
  14. added a commit that references this issue on Jul 20, 2023
    76b5e50
  15. added a commit that references this issue on Jul 21, 2023
    18024f4
  16. ghost removed
    in-pr
    on Jul 21, 2023
  17. ghost locked as resolved and limited conversation to collaborators on Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

JitStressPriority:3arch-x86area-CodeGen-coreclr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions