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

Tests on ARM segfaulted #1517

Closed
kant2002 opened this issue Sep 6, 2021 · 2 comments
Closed

Tests on ARM segfaulted #1517

kant2002 opened this issue Sep 6, 2021 · 2 comments
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation

Comments

@kant2002
Copy link
Contributor

kant2002 commented Sep 6, 2021

I run tests on ARM and they failed.
I copy DeadCodeElimination, compile and run under GDB

(gdb) backtrace
#0 0x76c1fc98 in ?? ()
#1 0x0001ffbe in ThreadStore::AttachCurrentThread (fAcquireThreadStoreLock=224) at /home/pi/runtimelab/src/coreclr/nativeaot/Runtime/threadstore.cpp:142
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

This error happens on first thread
Disasm before error condition happens.

   0x0001fb98 <+180>:   ldr.w   r9, [r0]
   0x0001fb9c <+184>:   ldr.w   r0, [r9]
   0x0001fba0 <+188>:   lsls    r0, r0, #30
   0x0001fba2 <+190>:   bpl.n   0x1fbc6 <Thread::ReversePInvokeAttachOrTrapThread(ReversePInvokeFrame*)+226>
   0x0001fba4 <+192>:   ldr.w   r6, [r8]
   0x0001fba8 <+196>:   ldr     r0, [r4, #68]   ; 0x44
   0x0001fbaa <+198>:   str     r6, [r4, #44]   ; 0x2c
   0x0001fbac <+200>:   cmp     r0, #0
   0x0001fbae <+202>:   ittt    ne
   0x0001fbb0 <+204>:   ldrne   r1, [r4, #64]   ; 0x40
   0x0001fbb2 <+206>:   strne   r0, [r1, #0]
   0x0001fbb4 <+208>:   strdne  r5, r5, [r4, #64]       ; 0x40
   0x0001fbb8 <+212>:   bl      0x1ab1c <RedhawkGCInterface::WaitForGCCompletion()>
   0x0001fbbc <+216>:   str     r5, [r4, #44]   ; 0x2c
   0x0001fbbe <+218>:   ldr.w   r0, [r9]
   0x0001fbc2 <+222>:   lsls    r0, r0, #30
   0x0001fbc4 <+224>:   bmi.n   0x1fba8 <Thread::ReversePInvokeAttachOrTrapThread(ReversePInvokeFrame*)+196>
=> 0x0001fbc6 <+226>:   ldmia.w sp!, {r8, r9, r11}
   0x0001fbca <+230>:   pop     {r4, r5, r6, r7, pc}
   0x0001fbcc <+232>:   ldmia   r2, {r2, r3, r4}
   0x0001fbce <+234>:   lsls    r4, r0, #1
   0x0001fbd0 <+236>:   add     r0, sp, #880    ; 0x370
   0x0001fbd2 <+238>:   movs    r7, r6
End of assembler dump.
(gdb) si
0x0001fbca      1226    }
(gdb) si
0x76c1fc98 in ?? ()
@jkotas
Copy link
Member

jkotas commented Sep 6, 2021

Looks like the return address is getting corrupted somewhere in RhpReversePInvoke

@MichalStrehovsky MichalStrehovsky added the area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation label Sep 17, 2021
@filipnavara
Copy link
Member

Presumably this is fixed now since all the smoke tests pass with dotnet/runtime#97269.

@jkotas jkotas closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation
Projects
None yet
Development

No branches or pull requests

4 participants