Skip to content

JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll fails under gcstress on linux-arm64 #88618

Closed

Description

@AndyAyersMS

https://dev.azure.com/dnceng-public/public/_build/results?buildId=333077&view=ms.vss-test-web.build-test-results-tab

Console log: https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-db9631cc71ea487795/JIT.performance.0.1/1/console.04cf4a49.log?helixlogtype=result


export DOTNET_TieredCompilation=0
export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
export DOTNET_DbgMiniDumpName=$HELIX_DUMP_FOLDER/coredump.%d.dmp
export DOTNET_GCStress=0xC
...

15:31:17.857 Running test: JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll
[createdump] Gathering state for process 23 corerun
[createdump] Crashing thread 0017 signal 11 (000b)

{
  "ErrorMessage": "Running test: JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll\\n[createdump]",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=333077
Error message validated: Running test: JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll\n[createdump]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 7/18/2023 9:44:11 AM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Activity

  1. ghost added
    area-CodeGen-coreclr
    on Jul 10, 2023
  2. ghost added
    untriaged
    on Jul 10, 2023
  3. added
    os-linux
    and removed
    untriaged
    on Jul 10, 2023
  4. added this to the 8.0.0 milestone on Jul 14, 2023
  5. JulieLeeMSFT commented on Jul 14, 2023

    @JulieLeeMSFT
    Member
  6. changed the title [-]jit-cfg pipline gc stress failure on linux x64[/-] [+]JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll fails under gcstress on linux-arm64[/+] on Jul 18, 2023
  7. added
    blocking-clean-ci-optional
    Known Build Error
    on Jul 18, 2023
  8. markples commented on Jul 18, 2023

    @markples
    Contributor

    The pattern ("ErrorPattern": "Running test: JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll.{1,2}\\[createdump\\]") isn't working. Attempting to guess intent, I think the .{1,2} is trying to match \n or \r\n so that it matches on Windows or Linux? ErrorPattern appears to be single-line, and ErrorMessage isn't regex, so I'm not sure how to do this. However, in this case, it appears to be Linux-only, so perhaps \n will suffice (not . since single-line regex). I'll see if I can get a \n past the escaping.

  9. jakobbotsch commented on Jul 18, 2023

    @jakobbotsch
    Member

    The pattern ("ErrorPattern": "Running test: JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll.{1,2}\\[createdump\\]") isn't working. Attempting to guess intent, I think the .{1,2} is trying to match \n or \r\n so that it matches on Windows or Linux? ErrorPattern appears to be single-line, and ErrorMessage isn't regex, so I'm not sure how to do this. However, in this case, it appears to be Linux-only, so perhaps \n will suffice (not . since single-line regex). I'll see if I can get a \n past the escaping.

    Right. I first tried with \s+, but that also didn't work. I'm not sure why, since I tested the regex according to the instructions at https://github.com/dotnet/runtime/blob/main/docs/workflow/ci/failure-analysis.md#what-to-do-if-you-determine-the-failure-is-unrelated and it worked.
    .{1, 2} was my second attempt.

  10. 6 remaining items

  11. jakobbotsch commented on Jul 18, 2023

    @jakobbotsch
    Member

    JitDisasm:

    G_M55734_IG01:        ; bbWeight=1, gcrefRegs=0000 {}, byrefRegs=0000 {}, byref, nogc <-- Prolog IG
                stp     fp, lr, [sp, #-0x60]!
                stp     x19, x20, [sp, #0x38]
                stp     x21, x22, [sp, #0x48]
                str     x23, [sp, #0x58]
                mov     fp, sp
                str     xzr, [fp, #0x10]    // [V08 loc7]
                add     x1, sp, #96
                str     x1, [fp, #0x30]     // [V37 PSPSym]
                mov     x19, x0
                                 ; gcrRegs +[x19]
                                                    ;; size=36 bbWeight=1 PerfScore 7.50
    G_M55734_IG02:        ; bbWeight=1, gcVars=0000000100000000 {V08}, gcrefRegs=80000 {x19}, byrefRegs=0000 {}, gcvars, byref, isz
                                 ; GC ptr vars +{V08 V32}
                mov     x0, x19
                                 ; gcrRegs +[x0]
                movz    x1, #0x7C30      // code for System.Runtime.Serialization.DataContracts.DataContract+DataContractCriticalHelper:GetDataContractAdapterTypeHandle(System.RuntimeTypeHandle):System.RuntimeTypeHandle
                movk    x1, #0x6081 LSL #16
                movk    x1, #0xFFFF LSL #32
                ldr     x1, [x1]
                blr     x1
                                 ; gcrRegs -[x19]
                                 ; gcr arg pop 0
                mov     x19, x0
                                 ; gcrRegs +[x19]
                mrs     x0, tpidr_el0
                ldr     w1, [x0, #0xF8]
                cmp     w1, #3
                blt     G_M55734_IG20
                ldr     x0, [x0, #0x100]
                                 ; gcrRegs -[x0]
                ldr     x0, [x0, #0x18]
                cbz     x0, G_M55734_IG20
                ldr     x0, [x0]
                                 ; byrRegs +[x0]
                add     x20, x0, #16
                                 ; byrRegs +[x20]
                                                    ;; size=64 bbWeight=1 PerfScore 22.50

    @kunalspathak Can you please take a look?

  12. added
    disabled-test
    and removed
    blocking-clean-ci-optional
    on Jul 18, 2023
  13. jakobbotsch commented on Jul 18, 2023

    @jakobbotsch
    Member

    Test disabled in #89072

  14. jakobbotsch commented on Jul 21, 2023

    @jakobbotsch
    Member

    It looks like JIT/Performance/CodeQuality/Serialization/Serialize is failing in the same way now that we get past the Deserialize version, so this is still blocking.

  15. added
    blocking-clean-ci-optional
    on Jul 21, 2023
  16. kunalspathak commented on Jul 28, 2023

    @kunalspathak
    Contributor

    We read TPIDR_EL0 into x0, but x0 is marked as containing a GC pointer here and there is no update in GC reporting to unmark that.

    @jakobbotsch - tpidr_el0 is a system register containing current thread local statics pointer and should not be marked as GC pointer, so that is the problem. Perhaps, when I added mrs instruction, I didn't set the right flags to make sure that destination is not a GCref. But I don't see anything like ; gcrRegs +[x0] after mrs instruction. So wondering how you know that the code is thinking that x0 is holding a GC ref?

    If you see the JITDump, it is marked as long:

    Generating: N015 (  1,  2) [000018] Hc---------                   t18 =    CNS_INT(h) long   0 tls REG NA
                                                                            /--*  t18    long   
    Generating: N017 (  5,  5) [000019] DA---------                         *  STORE_LCL_VAR long   V04 rat1          x14 REG x14
    IN0006:             mrs     x14, tpidr_el0
    							V04 in reg x14 is becoming live  [000019]
    							Live regs: 80000 {x19} => 84000 {x14 x19}
    				Live vars after [000019]: {V02} => {V02 V04}
    Generating: N019 (  3,  2) [000022] -----------                   t22 =    LCL_VAR   long   V04 rat1          x14 REG x14
                                                                            /--*  t22    long   
    Generating: N021 (  5,  5) [000023] -c---------                   t23 = *  LEA(b+248) long   REG NA
                                                                            /--*  t23    long   
    Generating: N023 (  6,  4) [000024] #----------                   t24 = *  IND       int    REG x15
    IN0007:             ldr     w15, [x14, #0xF8]
    

    Also remind me, in the dump >>> means the GC was triggered at that instruction (ldr) or the previous instruction (mrs)?

  17. markples commented on Jul 28, 2023

    @markples
    Contributor

    Does the +[x0] carry over from the previous definition of x0? (up until the -next- definition which has a -[x0])

  18. jakobbotsch commented on Jul 28, 2023

    @jakobbotsch
    Member

    So wondering how you know that the code is thinking that x0 is holding a GC ref?

    Right, it's what Mark said -- you can see it was previously marked as holding a GC ref here:

                mov     x0, x19
                                 ; gcrRegs +[x0]

    GC reporting is not changed as a result of the call since the call returns a GC ref in x0:

                blr     x1
                                 ; gcrRegs -[x19]
                                 ; gcr arg pop 0
                mov     x19, x0
                                 ; gcrRegs +[x19]

    (if the call didn't return a GC ref we would expect x0 to be unmarked here).

    Also remind me, in the dump >>> means the GC was triggered at that instruction (ldr) or the previous instruction (mrs)?

    The GC was triggered at the ldr instruction. The >>> is displayed because I did clru with that address -- I extracted the address from the current GC related function that is on top of the stack with the crash happens.

  19. ghost added
    in-pr
    on Jul 29, 2023
  20. ghost removed
    in-pr
    on Jul 31, 2023
  21. ghost locked as resolved and limited conversation to collaborators on Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GCStressKnown Build Errorarch-arm64area-CodeGen-coreclrblocking-clean-ci-optionaldisabled-testos-linux

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions