我有一个长时间运行的i / o重(网络/磁盘)多线程c#桌面应用程序偶尔会崩溃,并且#34;堆栈cookie检测代码检测到基于堆栈的缓冲区溢出。"
崩溃线程的典型堆栈跟踪如下所示。
该程序运行时间在30分钟到6小时之间,然后通常会以相似的堆栈崩溃。
我在崩溃期间检查了其他应用程序线程的堆栈跟踪,但没有注意到任何模式。
我认为可能存在硬件问题,但机器上有很多活动,没有其他损坏迹象(应用程序崩溃,事件日志错误等)。
根据我的判断,C#应用程序不使用unsafe
块,也没有使用unsafe
块的库。
两个问题:
我的系统是i5-4790k(未超频),Windows 2012R2,目标是.net 4.6 x64,完全打补丁。
Visual Studio 2015,完全修补。
运行Debug
版本。
clr.dll!__report_gsfailure() Unknown
clr.dll!SafeHandle::Release(bool) Unknown
clr.dll!SafeHandle::Dispose(void) Unknown
clr.dll!SafeHandle::DisposeNative(class SafeHandle *) Unknown
System.ni.dll!00007ffa765ddc4b() Unknown
System.ni.dll!00007ffa765dda8a() Unknown
System.ni.dll!00007ffa765e7e0e() Unknown
System.ni.dll!00007ffa765c420f() Unknown
System.ni.dll!00007ffa765c41d4() Unknown
mscorlib.ni.dll!00007ffa7740f18a() Unknown
System.ni.dll!00007ffa76b19bbf() Unknown
System.ni.dll!00007ffa765e0d0b() Unknown
System.ni.dll!00007ffa7657ac4f() Unknown
System.ni.dll!00007ffa765e0508() Unknown
System.ni.dll!00007ffa765e0319() Unknown
System.ni.dll!00007ffa765e714d() Unknown
System.ni.dll!00007ffa765e6cdd() Unknown
System.ni.dll!00007ffa765e0157() Unknown
System.ni.dll!00007ffa765dfe48() Unknown
System.ni.dll!00007ffa765dfdb5() Unknown
System.ni.dll!00007ffa765dfa0d() Unknown
System.ni.dll!00007ffa765de83d() Unknown
System.ni.dll!00007ffa765de401() Unknown
System.ni.dll!00007ffa765de2e0() Unknown
System.ni.dll!00007ffa765dacac() Unknown
System.ni.dll!00007ffa765da9f0() Unknown
System.ni.dll!00007ffa765da22e() Unknown
System.ni.dll!00007ffa765d7fc7() Unknown
System.ni.dll!00007ffa765d743d() Unknown
System.ni.dll!00007ffa76579af6() Unknown
00007ffa19832eb7() Unknown
00007ffa1978eb0f() Unknown
00007ffa19844cfa() Unknown
00007ffa199e83d7() Unknown
00007ffa1978ce48() Unknown
00007ffa1978ccb5() Unknown
00007ffa199e810f() Unknown
mscorlib.ni.dll!00007ffa77d37116() Unknown
mscorlib.ni.dll!00007ffa77d22a90() Unknown
mscorlib.ni.dll!00007ffa77dfa795() Unknown
mscorlib.ni.dll!00007ffa773d2c97() Unknown
mscorlib.ni.dll!00007ffa773fa77e() Unknown
mscorlib.ni.dll!00007ffa773fa617() Unknown
mscorlib.ni.dll!00007ffa773d2f3d() Unknown
mscorlib.ni.dll!00007ffa773d2608() Unknown
mscorlib.ni.dll!00007ffa77386b50() Unknown
clr.dll!CallDescrWorkerInternal() Unknown
clr.dll!CallDescrWorkerWithHandler(struct CallDescrData *,int) Unknown
clr.dll!MethodDescCallSite::CallTargetWorker(unsigned __int64 const *) Unknown
clr.dll!QueueUserWorkItemManagedCallback(void *) Unknown
clr.dll!Frame::Push(void) Unknown
clr.dll!Frame::Push(void) Unknown
clr.dll!Frame::Push(void) Unknown
clr.dll!ManagedPerAppDomainTPCount::DispatchWorkItem(bool *,bool *) Unknown
clr.dll!ManagedPerAppDomainTPCount::DispatchWorkItem(bool *,bool *) Unknown
clr.dll!ThreadpoolMgr::ExecuteWorkRequest(bool *,bool *) Unknown
clr.dll!ThreadpoolMgr::WorkerThreadStart(void *) Unknown
clr.dll!Thread::intermediateThreadProc(void *) Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
答案 0 :(得分:0)
我面临类似的行为。我想这是RyuJIT编译器中的错误。为了避免这种情况,您需要使用app.config中的<useLegacyJit enabled="1" />
退回到JIT64。像这样:
<runtime>
<useLegacyJit enabled="1" />
</runtime>