Application hang - debugging strategy wanted

Hi all,

i have an application that stops after a few hours ( 3 up to 60 hrs ) with an appllication hang. We use AMD FirePro 8100 with the latest driver. When doing an application analysis with windbg, we see one thread (main thread) spinning with 100% cpu, never leaving a swap buffers call. This is the call stack:

0:000:x86> !analyze -v -hang
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************


CONTEXT:  (.cxr;r)
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=00001050 edi=0018dda8
eip=7728f8d1 esp=0018dd60 ebp=0018ddcc iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00200246
ntdll_77270000!ZwWaitForSingleObject+0x15:
7728f8d1 83c404          add     esp,4

FAULTING_IP: 
+0
00000000 ??              ???

EXCEPTION_RECORD:  (.exr -1)
ExceptionAddress: 0000000000000000
   ExceptionCode: 80000003 (Break instruction exception)
  ExceptionFlags: 00000000
NumberParameters: 0

FAULTING_THREAD:  00000c2c

BUGCHECK_STR:  HANG

PROCESS_NAME:  MMM.exe

ERROR_CODE: (NTSTATUS) 0xcfffffff - <Unable to get error code text>

EXCEPTION_CODE: (NTSTATUS) 0xcfffffff - <Unable to get error code text>

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

APP:  mmm.exe

ANALYSIS_VERSION: 10.0.10240.9 amd64fre

DERIVED_WAIT_CHAIN:  

Dl Eid Cid     WaitType
-- --- ------- --------------------------
   0   624.c2c Unknown                

WAIT_CHAIN_COMMAND:  ~0s;k;;

BLOCKING_THREAD:  0000000000000c2c

DEFAULT_BUCKET_ID:  APPLICATION_HANG_BusyHang

LAST_CONTROL_TRANSFER:  from 0000000075af14ab to 000000007728f8d1

STACK_TEXT:  
0018dd60 75af14ab 00001050 00000000 0018dda8 ntdll_77270000!ZwWaitForSingleObject+0x15
0018ddcc 758b1194 00001050 00000000 00000000 KERNELBASE!WaitForSingleObjectEx+0x98
0018dde4 758b1148 00001050 00000000 00000000 kernel32!WaitForSingleObjectExImplementation+0x75
0018ddf8 70612f4b 00001050 00000000 012497d8 kernel32!WaitForSingleObject+0x12
WARNING: Stack unwind information not available. Following frames may be wrong.
0018de0c 712b13fa 01249828 0018e040 00000001 atioglxx!DrvPresentBuffers+0x6f3b
0018de54 712b108a 023b2f48 00000000 0018e040 atioglxx!DrvPresentBuffers+0xca53ea
0018de94 712aacb9 0018e1a0 0018e0c0 0018e040 atioglxx!DrvPresentBuffers+0xca507a
0018def0 712a641a 0018e190 0018e040 01247c20 atioglxx!DrvPresentBuffers+0xc9eca9
0018df14 7129f7ed 0018e040 01247c20 01247c20 atioglxx!DrvPresentBuffers+0xc9a40a
0018e234 7129dfed 0057c000 00000000 00000001 atioglxx!DrvPresentBuffers+0xc937dd
0018e310 71298977 00000000 00000000 7457c000 atioglxx!DrvPresentBuffers+0xc91fdd
0018e394 7125f61e 01247c20 00000000 00000001 atioglxx!DrvPresentBuffers+0xc8c967
0018e3b0 7125f806 011de6e0 01247c20 00000000 atioglxx!DrvPresentBuffers+0xc5360e
0018e408 71111654 00000001 00001ffc 00030032 atioglxx!DrvPresentBuffers+0xc537f6
0018e428 70613913 40002200 0018ebf0 01249828 atioglxx!DrvPresentBuffers+0xb05644
0018e480 70613cd9 00032ad7 00000000 00030032 atioglxx!DrvPresentBuffers+0x7903
0018e4b8 7063310a 00000000 00000000 01249828 atioglxx!DrvPresentBuffers+0x7cc9
0018ead8 712a61a9 01249828 024fb4c0 0018ebf0 atioglxx!DrvPresentBuffers+0x270fa
0018eb8c 712653b2 0018ebf0 00000001 01df1ce0 atioglxx!DrvPresentBuffers+0xc9a199
0018eba8 71111c2e 01df1028 0018ebf0 01c647cc atioglxx!DrvPresentBuffers+0xc593a2
0018ec38 7111256b 01029808 00000000 0124ccf8 atioglxx!DrvPresentBuffers+0xb05c1e
0018ecf8 71113070 00000000 00000000 0124ccf8 atioglxx!DrvPresentBuffers+0xb0655b
0018ed24 71113351 00000000 01df1c00 00000000 atioglxx!DrvPresentBuffers+0xb07060
0018ed58 7111db70 71ae3000 016a8488 00fe2d00 atioglxx!DrvPresentBuffers+0xb07341
0018fa18 707acce0 01c647b0 71ae3000 0000000b atioglxx!DrvPresentBuffers+0xb11b60
0018fa7c 7111d5ef 71ae3000 01df1ce0 0102d818 atioglxx!DrvPresentBuffers+0x1a0cd0
0018faac 705e902b 1401026d 1401026d 00000001 atioglxx!DrvPresentBuffers+0xb115df
0018facc 705e90c9 00fdbba8 00000000 0018fbc0 atioglxx!DrvRealizeLayerPalette+0xcb
0018fae8 705e95dd 1401026d 00000001 0018fb0c atioglxx!DrvSwapLayerBuffers+0x89
0018faf8 7297c79f 1401026d 1401026d 0124ad10 atioglxx!DrvSwapBuffers+0xd
0018fb0c 72985e90 1401026d 00000001 00000000 opengl32!__DrvSwapBuffers+0x37
0018fb38 75b85c30 1401026d 00010000 72940000 opengl32!wglSwapBuffers+0x6f
0018fb4c 0069ac1d 1401026d 007e7364 ffffffff gdi32!SwapBuffers+0x25
0018fb54 007e7364 ffffffff 1515d578 1515d578 MMM!wxGLCanvas::SwapBuffers+0xd
0018fbcc 006e09bd 1515d578 006aa673 094b7438 MMM!mmmGLCanvas::PrePaint+0x444
0018fbd4 006aa673 094b7438 007e6f20 1515d578 MMM!wxAppConsole::HandleEvent+0xd
0018fbec 006aacda 00c51d38 094b7438 1515d578 MMM!wxEvtHandler::ProcessEventIfMatches+0x53
0018fc0c 006aad6c 1515d578 094b7438 1515d578 MMM!wxEventHashTable::HandleEvent+0x5a
0018fc20 006aa5ca 1515d578 00000001 fffdb800 MMM!wxEvtHandler::ProcessEvent+0x6c
0018fc44 006e0efb 0018fd30 005f9e92 0018fd30 MMM!wxEvtHandler::ProcessPendingEvents+0x6a
0018fc4c 005f9e92 0018fd30 00030000 74d38336 MMM!wxAppConsole::ProcessPendingEvents+0x4b
0018fc58 74d38336 00000000 00000001 0018fd30 MMM!wxIdleWakeUpModule::MsgHookProc+0x22
0018fc88 74d280a9 00030000 00000001 0018fd30 user32!DispatchHookA+0x10e
0018fcc8 74d28ba1 0018fd20 0018fd30 0018fd4c user32!CallHookWithSEH+0x21
0018fd08 7728010a 0018fd20 00000000 0018fdb0 user32!__fnHkINLPMSG+0x75
0018fd50 74d27c1d 0018fd94 00000000 00000000 ntdll_77270000!KiUserCallbackDispatcher+0x2e
0018fd70 0065f8f4 0018fd94 00000000 00000000 user32!GetMessageA+0xa1
0018fdb8 0065fd21 2eed2cdc 00000000 0947aba0 MMM!wxEventLoop::Dispatch+0x44
0018fdec 0062b232 2eed2cc8 09b9b208 00000001 MMM!wxEventLoopManual::Run+0xb1
0018fe1c 007004c4 09b9b208 00000001 fffde000 MMM!wxAppBase::MainLoop+0x72
0018fe44 006e9787 0018fea4 09b9b208 09b9b208 MMM!wxEntryReal+0x94
0018fe78 00622d8a 0018fea4 09b9b208 0018fec8 MMM!wxEntry+0x47
0018fee0 00870cf8 00400000 00000000 00f43571 MMM!wxEntry+0xfa
0018fef8 00576d99 00400000 00000000 00f43571 MMM!WinMain+0x18
0018ff88 758b338a fffde000 0018ffd4 772a9f72 MMM!__tmainCRTStartup+0x11a
0018ff94 772a9f72 fffde000 772ada52 00000000 kernel32!BaseThreadInitThunk+0xe
0018ffd4 772a9f45 00576dec fffde000 00000000 ntdll_77270000!__RtlUserThreadStart+0x70
0018ffec 00000000 00576dec fffde000 00000000 ntdll_77270000!_RtlUserThreadStart+0x1b


FOLLOWUP_IP: 
atioglxx!DrvPresentBuffers+6f3b
70612f4b f7d8            neg     eax

SYMBOL_STACK_INDEX:  4

SYMBOL_NAME:  atioglxx!DrvPresentBuffers+6f3b

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: atioglxx

IMAGE_NAME:  atioglxx.dll

DEBUG_FLR_IMAGE_TIMESTAMP:  5507cb91

STACK_COMMAND:  ~0s ; kb

BUCKET_ID:  X64_HANG_atioglxx!DrvPresentBuffers+6f3b

PRIMARY_PROBLEM_CLASS:  X64_HANG_atioglxx!DrvPresentBuffers+6f3b

FAILURE_PROBLEM_CLASS:  APPLICATION_HANG_BusyHang

FAILURE_EXCEPTION_CODE:  cfffffff

FAILURE_IMAGE_NAME:  atioglxx.dll

FAILURE_FUNCTION_NAME:  DrvPresentBuffers

FAILURE_SYMBOL_NAME:  atioglxx.dll!DrvPresentBuffers

FAILURE_BUCKET_ID:  APPLICATION_HANG_BusyHang_cfffffff_atioglxx.dll!DrvPresentBuffers

ANALYSIS_SOURCE:  UM

FAILURE_ID_HASH_STRING:  um:application_hang_busyhang_cfffffff_atioglxx.dll!drvpresentbuffers

FAILURE_ID_HASH:  {fc38eabf-b1c4-2d08-65bb-ab0fdeef7bdd}

Does anyone know how to track down such problems? The ati driver holds a lock, but its not a deadlock situation:


-----------------------------------------
DebugInfo          = 0x0000000000fbaf50
Critical section   = 0x00000000094947b0 (+0x94947B0)
LOCKED
LockCount          = 0x0
WaiterWoken        = No
OwningThread       = 0x0000000000000c2c
RecursionCount     = 0x1
LockSemaphore      = 0x0
SpinCount          = 0x0000000000000000
OwningThread DbgId = ~0s
OwningThread Stack =
	ChildEBP RetAddr  Args to Child              
	0018dd60 75af14ab 00001050 00000000 0018dda8 ntdll_77270000!ZwWaitForSingleObject+0x15 (FPO: [3,0,0])
	0018ddcc 758b1194 00001050 00000000 00000000 KERNELBASE!WaitForSingleObjectEx+0x98 (FPO: [Non-Fpo])
	0018dde4 758b1148 00001050 00000000 00000000 kernel32!WaitForSingleObjectExImplementation+0x75 (FPO: [Non-Fpo])
	0018ddf8 70612f4b 00001050 00000000 012497d8 kernel32!WaitForSingleObject+0x12 (FPO: [Non-Fpo])
	0018de0c 712b13fa 01249828 0018e040 00000001 atioglxx!DrvPresentBuffers+0x6f3b
	0018de54 712b108a 023b2f48 00000000 0018e040 atioglxx!DrvPresentBuffers+0xca53ea
	0018de94 712aacb9 0018e1a0 0018e0c0 0018e040 atioglxx!DrvPresentBuffers+0xca507a
	0018def0 712a641a 0018e190 0018e040 01247c20 atioglxx!DrvPresentBuffers+0xc9eca9
	0018df14 7129f7ed 0018e040 01247c20 01247c20 atioglxx!DrvPresentBuffers+0xc9a40a
	0018e234 7129dfed 0057c000 00000000 00000001 atioglxx!DrvPresentBuffers+0xc937dd
	0018e310 71298977 00000000 00000000 7457c000 atioglxx!DrvPresentBuffers+0xc91fdd
	0018e394 7125f61e 01247c20 00000000 00000001 atioglxx!DrvPresentBuffers+0xc8c967
	0018e3b0 7125f806 011de6e0 01247c20 00000000 atioglxx!DrvPresentBuffers+0xc5360e
	0018e408 71111654 00000001 00001ffc 00030032 atioglxx!DrvPresentBuffers+0xc537f6
	0018e428 70613913 40002200 0018ebf0 01249828 atioglxx!DrvPresentBuffers+0xb05644
	0018e480 70613cd9 00032ad7 00000000 00030032 atioglxx!DrvPresentBuffers+0x7903
	0018e4b8 7063310a 00000000 00000000 01249828 atioglxx!DrvPresentBuffers+0x7cc9
	0018ead8 712a61a9 01249828 024fb4c0 0018ebf0 atioglxx!DrvPresentBuffers+0x270fa
	0018eb8c 712653b2 0018ebf0 00000001 01df1ce0 atioglxx!DrvPresentBuffers+0xc9a199
	0018eba8 71111c2e 01df1028 0018ebf0 01c647cc atioglxx!DrvPresentBuffers+0xc593a2
${$ntdllwsym}!RtlpStackTraceDataBase is NULL. Probably the stack traces are not enabled.
-----------------------------------------

Any hint what could cause this situation is greatly appreciated. General question: is it by theory possible to cause a driver deadlock through valid usage of OpenGL API? In other words - is this a driver bug? It occurrred in older drivers, too.

More precisely it looks like there is a problem with the driver when the system is connected to a KVM switch. The switch is from ATEN and the system is connected via DVI. It looks like the application freezes when the switch switches from one system to another. Did anyone here experience something similar?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.