-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT/Performance/CodeQuality/Serialization/Deserialize/Deserialize.dll fails under gcstress on linux-arm64 #88618
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue Details
|
@jakobbotsch, PTAL. |
The pattern ( |
Right. I first tried with |
I don't think ErrorPattern is going to work because a single-line match is performed. |
The single-line regex option doesn't mean you cannot match multiple lines, it just affects the behavior of how newlines are matched (https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-options#single-line-mode). So I would still expect us to be able to match both lines with a pattern. Sorry, I didn't realize you were trying something else, I just noticed the |
Of course you're right, so now I agree with you in not understanding why it isn't working. I guess I still don't know how the string is actually processed (first there's JSON decoding, and that string appears to be displayed in the "Known issue validation" box, but then is some C# dynamically compiled, Console.ReadLine, something else?) and if that has some special requirement. |
This is crashing the gcstress run, so we should disable the test anyways.
Though it occurs to me that I don't know how to disable a gcstress test on a particular architecture. I see some |
See #89072 but feel free to close it and do something else |
Thanks @markples. Sounds good to me to disable it. On topic of the actual issue here: this looks related to #87082. We are running GC during the inlined TLS access sequence when we hit an invalid GC ref: (lldb) clru -gcinfo 0x0000ffffb8826044
Normal JIT generated code
System.Runtime.Serialization.DataContracts.DataContract+DataContractCriticalHelper.GetId(System.RuntimeTypeHandle)
ilAddr is 0000FFBF8B592764 pImport is 0000000040DA4390
Begin 0000FFFFB8826000, size 484
/runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @ 395:
Prolog size: 0
Security object: <none>
GS cookie: <none>
PSPSym: caller.sp-30
Generics inst context: <none>
PSP slot: caller.sp-30
GenericInst slot: <none>
Varargs: 0
Frame pointer: Fp
Has tailcalls: 0
Size of parameter area: 0
Return Kind: Scalar
Code size: 484
0000ffffb8826000 fd7bbaa9 stp x29, x30, [sp, #-0x60]!
0000ffffb8826004 f3d303a9 stp x19, x20, [sp, #0x38]
0000ffffb8826008 f5db04a9 stp x21, x22, [sp, #0x48]
0000ffffb882600c f72f00f9 str x23, [sp, #0x58]
0000ffffb8826010 fd030091 mov x29, sp
0000ffffb8826014 bf0b00f9 str xzr, [x29, #0x10]
0000ffffb8826018 e1830191 add x1, sp, #0x60
0000ffffb882601c a11b00f9 str x1, [x29, #0x30]
0000ffffb8826020 f30300aa mov x19, x0
00000024 interruptible
00000024 +Fp+10 +X19
0000ffffb8826024 e00313aa mov x0, x19
00000028 +X0
0000ffffb8826028 01868fd2 mov x1, #0x7c30
0000ffffb882602c e12eb7f2 movk x1, #0xb977, lsl #16
0000ffffb8826030 e1ffdff2 movk x1, #0xffff, lsl #32
0000ffffb8826034 210040f9 ldr x1, [x1]
0000ffffb8826038 20003fd6 blr x1
0000003c -X19
0000ffffb882603c f30300aa mov x19, x0
/runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/DataContract.cs @ 396:
00000040 +X19
0000ffffb8826040 40d03bd5 mrs x0, TPIDR_EL0
>>> 0000ffffb8826044 01f840b9 ldr w1, [x0, #0xf8] We read |
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? |
Test disabled in #89072 |
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. |
@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 If you see the JITDump, it is marked as
Also remind me, in the dump |
Does the |
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 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
The GC was triggered at the |
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
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
The text was updated successfully, but these errors were encountered: