Skip to content

ARM/Linux Assert Fail: Testing Roslyn 2. #5501

@myungjoo

Description

@myungjoo

Environment: ARM/Linux (armv7l / gnueabi / Cortex A9 x 4 / Linux 3.10)
Codebase: fe08910 + dotnet/coreclr#3990 (PR in coreclr) + https://github.com/myungjoo/coreclr/tree/implement/4040 (implementing #5475)
Target App: Roslyn (csc.exe, dotnet/roslyn: 9d6fdb07b9d63ef018b7fbf6f5ae72824c51da32)

Related pending fixes applied (the two not-yet-merged patchsets described above), csc.exe at ARM has progressed much more. However, I'm seeing another strange behavior right now:

sh-3.2# ./corerun csc.exe

Assert failure(PID 6173 [0x0000181d], Thread: 6173 [0x181d]): Consistency check failed: FAILED: state.fFound
    File: /home/abuild/rpmbuild/BUILD/coreclr-0.0.1/src/vm/exceptionhandling.cpp Line: 354
    Image: /sdcard/sf/clean45/Debug/csccore/corerun

**** MessageBox invoked, title 'corerun - Assert Failure (PID 6173, Thread 6173/0x181d)' ****
  Consistency check failed: FAILED: state.fFound

/home/abuild/rpmbuild/BUILD/coreclr-0.0.1/src/vm/exceptionhandling.cpp, Line: 354

Abort - Kill program
Retry - Debug
Ignore - Keep running


Image:
/sdcard/sf/clean45/Debug/csccore/corerun

********

Aborted
sh-3.2# 

With breaks, getting right before the asserting,

(gdb) info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0xb6375a46 in Thread::StackWalkFramesEx(REGDISPLAY*, StackWalkAction (*)(CrawlFrame*, void*), void*, unsigned int, Frame*)
                                           at /usr/src/debug/coreclr-0.0.1/src/vm/stackwalk.cpp:909
        breakpoint already hit 30 times
(gdb) run
Starting program: /sdcard/sf/clean45/Debug/csccore/corerun csc.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb6155450 (LWP 6186)]
[New Thread 0xb58f5450 (LWP 6187)]
[New Thread 0xb4eff450 (LWP 6188)]
[New Thread 0xb24fe450 (LWP 6189)]

Breakpoint 1, Thread::StackWalkFramesEx (this=0x56a50, pRD=0xbeffb120, pCallback=0xb651271d <SystemDomain::CallersMethodCallbackWithStackMark(CrawlFrame*, void*)>, pData=0xbeffb730, flags=33,
    pStartFrame=0x0) at /usr/src/debug/coreclr-0.0.1/src/vm/stackwalk.cpp:917
(gdb) c 29
Will ignore next 28 crossings of breakpoint 1.  Continuing.

Breakpoint 1, Thread::StackWalkFramesEx (this=0x56a50, pRD=0xbeffcf88, pCallback=0xb64f0e1d <UpdateObjectRefInResumeContextCallback(CrawlFrame*, void*)>, pData=0xbeffcf14, flags=0,
    pStartFrame=0xbeffe0e8) at /usr/src/debug/coreclr-0.0.1/src/vm/stackwalk.cpp:917
(gdb) break src/vm/stackwalk.cpp:973
Breakpoint 3 at 0xb6375b64: file /usr/src/debug/coreclr-0.0.1/src/vm/stackwalk.cpp, line 973.
(gdb) disable 2
(gdb) c
Continuing.

Breakpoint 3, Thread::StackWalkFramesEx (this=0x56a50, pRD=0xbeffcf88, pCallback=0xb64f0e1d <UpdateObjectRefInResumeContextCallback(CrawlFrame*, void*)>, pData=0xbeffcf14, flags=0,
    pStartFrame=0xbeffe0e8) at /usr/src/debug/coreclr-0.0.1/src/vm/stackwalk.cpp:974
(gdb) p/s retVal
$24 = SWA_CONTINUE
(gdb) p/x iter.IsValid()
$25 = 0x0
(gdb) p/x iter
$26 = {m_crawl = {codeManState = {dwIsSet = 0x0, stateBuf = {0xcd <repeats 512 times>}}, isFrameless = 0x0, isFirst = 0x0, isInterrupted = 0x0, hasFaulted = 0x0, isIPadjusted = 0x0,
    isNativeMarker = 0x0, isProfilerDoStackSnapshot = 0x0, isNoFrameTransition = 0x0, taNoFrameTransitionMarker = 0x0, pFrame = 0xffffffff, pFunc = 0x0, pAppDomain = 0x43870, pRD = 0xbeffcf88,
    codeInfo = {m_codeAddress = 0xb650b59b, m_methodToken = {m_pRangeSection = 0x8b680, m_pCodeHeader = 0xb1ad883c}, m_pMD = 0x0, m_pJM = 0x0, m_relOffset = 0x0, m_pFunctionEntry = 0x0},
    isFilterFunclet = 0x0, isFilterFuncletCached = 0x0, fShouldParentToFuncletSkipReportingGCReferences = 0x0, fShouldCrawlframeReportGCReferences = 0x1,
    fShouldParentFrameUseUnwindTargetPCforGCReporting = 0x0, ehClauseForCatch = {Flags = 0xbeffe3a0, TryStartPC = 0xbeffcea8, TryEndPC = 0x0, HandlerStartPC = 0x54990, HandlerEndPC = 0xbeffd8a4, {
        TypeHandle = 0xbeffdbd8, ClassToken = 0xbeffdbd8, FilterOffset = 0xbeffdbd8}}, pThread = 0x56a50, pSecurityObject = 0x0, isCachedMethod = 0x0, stackWalkCache = {m_CacheEntry = {IP = 0x0,
        ESPOffset = 0x3bd4, securityObjectOffset = 0x2, fUseEbp = 0x0, fUseEbpAsFrameReg = 0x1, argSize = 0x5b6}, static s_Enabled = 0x0}, pCurGSCookie = 0xbefff990, pFirstGSCookie = 0xbeffe0e4},
  m_uFramesProcessed = 0x19, m_frameState = 0x7, m_pThread = 0x56a50, m_pStartFrame = 0xbeffe0e8, m_pRealStartFrame = 0xbeffe0e8, m_flags = 0x0, m_codeManFlags = 0x8, m_scanFlag = 0x1,
  m_cachedCodeInfo = {m_codeAddress = 0xb1ad88b1, m_methodToken = {m_pRangeSection = 0x8b680, m_pCodeHeader = 0xb1ad883c}, m_pMD = 0xb592aa3c, m_pJM = 0x492d8, m_relOffset = 0x70,
    m_pFunctionEntry = 0xafe33574}, m_pCachedGSCookie = 0x0, m_sfParent = {static maxVal = 0xffffffff, SP = 0x0}, m_sfFuncletParent = {static maxVal = 0xffffffff, SP = 0x0},
  m_fProcessNonFilterFunclet = 0x0, m_sfIntermediaryFuncletParent = {static maxVal = 0xffffffff, SP = 0x0}, m_fProcessIntermediaryNonFilterFunclet = 0x0, m_fDidFuncletReportGCReferences = 0x1,
  m_pvResumableFrameTargetSP = 0x0}
(gdb) 

After this, we head to that assertion because we have not hit state.fFound = true in the callback, UpdateObjectRefInResumeContextCallback.


(gdb) n 
(gdb) n
ExceptionTracker::FindNonvolatileRegisterPointers (pThread=0x56a50, uOriginalSP=3204440952, pRegDisplay=0xbeffcf88, uResumeFrameFP=3204441000)
    at /usr/src/debug/coreclr-0.0.1/src/vm/exceptionhandling.cpp:347
(gdb) n
(gdb) n
(gdb) n
(gdb) n

Program received signal SIGTRAP, Trace/breakpoint trap.
0xb6b3443e in DBG_DebugBreak () from /sdcard/sf/clean45/Debug/csccore/libcoreclr.so
(gdb) 

Any hints, the meaning and intention of this assertion, will be much helpful.

Thank you.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions