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

gcroot on ARM64 segfaults in DAC #485

Closed
mikem8361 opened this issue Sep 18, 2019 · 1 comment
Closed

gcroot on ARM64 segfaults in DAC #485

mikem8361 opened this issue Sep 18, 2019 · 1 comment
Assignees
Labels
arm64 ARM64 architecture related issue bug Something isn't working dotnet-dump
Milestone

Comments

@mikem8361
Copy link
Member

Under lldb or dotnet-dump analyze "gcroot" of a object from the clrstack -a command segfaults and crashes the debugger.

* thread #1, name = 'dotnet', stop reason = signal SIGSEGV: invalid address (fault address: 0xffffffffffffffff)
  * frame #0: 0x0000ffff7b527760 libmscordaccore.so`GcInfoDecoder::ReportSlotToGC(GcSlotDecoder&, unsigned int, REGDISPLAY*, bool, unsigned int, void (*)(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION), void*) [inlined] GcInfoDecoder::IsScratchStackSlot(spBase=<unavailable>) at gcinfodecoder.cpp:0
    frame #1: 0x0000ffff7b52772c libmscordaccore.so`GcInfoDecoder::ReportSlotToGC(this=0x0000ffffc0289528, slotDecoder=0x0000ffffc02890a0, slotIndex=8, pRD=0x0000ffffc0289a60, reportScratchSlots=false, inputFlags=<unavailable>, pCallBack=(libmscordaccore.so`DacStackReferenceWalker::GCEnumCallbackSOS(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION) at daccess.cpp:8363), hCallBack=0x0000ffffc028a778)(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION), void*) at gcinfodecoder.h:683
    frame #2: 0x0000ffff7b524c08 libmscordaccore.so`GcInfoDecoder::EnumerateLiveSlots(this=0x0000ffffc0289528, pRD=0x0000ffffc0289a60, reportScratchSlots=<unavailable>, inputFlags=<unavailable>, pCallBack=<unavailable>, hCallBack=<unavailable>)(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION), void*) at gcinfodecoder.cpp:947
    frame #3: 0x0000ffff7b58fa0c libmscordaccore.so`EECodeManager::EnumGcRefs(this=<unavailable>, pRD=0x0000ffffc0289a60, pCodeInfo=0x0000ffffc02898b8, flags=0, pCallBack=(libmscordaccore.so`DacStackReferenceWalker::GCEnumCallbackSOS(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION) at daccess.cpp:8363), hCallBack=0x0000ffffc028a778, relOffsetOverride=<unavailable>)(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION), void*, unsigned int) at eetwain.cpp:5140
    frame #4: 0x0000ffff7b4d02f8 libmscordaccore.so`DacStackReferenceWalker::Callback(pCF=0x0000ffffc0289680, pData=0x0000ffffc028a778) at daccess.cpp:8500
    frame #5: 0x0000ffff7b5a7c30 libmscordaccore.so`Thread::StackWalkFramesEx(REGDISPLAY*, StackWalkAction (*)(CrawlFrame*, void*), void*, unsigned int, __VPtr<Frame>) [inlined] Thread::MakeStackwalkerCallback(pCallback=(libmscordaccore.so`DacStackReferenceWalker::Callback(CrawlFrame*, void*) at daccess.cpp:8461), pData=0x0000ffffc028a778)(CrawlFrame*, void*), void*) at stackwalk.cpp:880
    frame #6: 0x0000ffff7b5a7c24 libmscordaccore.so`Thread::StackWalkFramesEx(this=<unavailable>, pRD=<unavailable>, pCallback=(libmscordaccore.so`DacStackReferenceWalker::Callback(CrawlFrame*, void*) at daccess.cpp:8461), pData=0x0000ffffc028a778, flags=<unavailable>, pStartFrame=<unavailable>)(CrawlFrame*, void*), void*, unsigned int, __VPtr<Frame>) at stackwalk.cpp:960
    frame #7: 0x0000ffff7b5a8034 libmscordaccore.so`Thread::StackWalkFrames(this=0x0000ffff7b036fc0, pCallback=(libmscordaccore.so`DacStackReferenceWalker::Callback(CrawlFrame*, void*) at daccess.cpp:8461), pData=0x0000ffffc028a778, flags=99584, pStartFrame=PTR_Frame @ x19)(CrawlFrame*, void*), void*, unsigned int, __VPtr<Frame>) at stackwalk.cpp:1043
    frame #8: 0x0000ffff7b4d11f4 libmscordaccore.so`unsigned int DacStackReferenceWalker::WalkStack<unsigned int, _SOS_StackRefData>(this=0x0000000032e480d0, count=0, refs=0x0000000000000000, promote=(libmscordaccore.so`DacStackReferenceWalker::GCReportCallbackSOS(__DPtr<__DPtr<Object> >, ScanContext*, unsigned int) at daccess.cpp:8422), enumFunc=(libmscordaccore.so`DacStackReferenceWalker::GCEnumCallbackSOS(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION) at daccess.cpp:8363))(__DPtr<__DPtr<Object> >, ScanContext*, unsigned int), void (*)(void*, __DPtr<Object>*, unsigned int, _DAC_SLOT_LOCATION)) at dacimpl.h:1994
    frame #9: 0x0000ffff7b4cf524 libmscordaccore.so`DacStackReferenceWalker::GetCount(this=0x0000000032e480d0, pCount=0x0000ffffc028acf4) at daccess.cpp:8297
    frame #10: 0x0000ffff7b829fa0 libsos.so`GetGCRefs(osID=4825, ppRefs=0x0000ffffc028ae18, pRefCnt=0x0000ffffc028ae24, ppErrors=0x0000000000000000, pErrCount=0x0000000000000000) at util.cpp:5907
    frame #11: 0x0000ffff7b7be488 libsos.so`GCRootImpl::PrintRootsOnThread(this=0x0000ffffc028b090, osThreadId=4825) at gcroot.cpp:731
    frame #12: 0x0000ffff7b7bc3d8 libsos.so`GCRootImpl::PrintRootsOnAllThreads(this=0x0000ffffc028b090) at gcroot.cpp:717
    frame #13: 0x0000ffff7b7bbcf0 libsos.so`GCRootImpl::PrintRootsForObject(this=0x0000ffffc028b090, target=281465514427248, all=false, noStacks=false) at gcroot.cpp:263
    frame #14: 0x0000ffff7b7f9eec libsos.so`::GCRoot(client=0x0000000032f65240, args=0x0000ffffc028b280) at strike.cpp:10711
    frame #15: 0x0000ffff0b14b498
    frame #16: 0x0000ffff0b14b29c
    frame #17: 0x0000ffff0b14ada8
    frame #18: 0x0000ffff824efd94 libcoreclr.so`CallDescrWorkerInternal at calldescrworkerarm64.S:72
@mikem8361 mikem8361 added bug Something isn't working arm64 ARM64 architecture related issue dotnet-dump labels Sep 18, 2019
@mikem8361 mikem8361 self-assigned this Sep 18, 2019
@tommcdon tommcdon added this to the 3.1 milestone Sep 18, 2019
@mikem8361
Copy link
Member Author

No longer repros with the latest SOS from master and lldb 6.0.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arm64 ARM64 architecture related issue bug Something isn't working dotnet-dump
Projects
None yet
Development

No branches or pull requests

2 participants