TCMD 21.0.25 Integer divide-by-zero - code c0000094

Jan 19, 2009
23
1
The following exception is generated periodically on Windows 7 64-bit.

0:000> .ecxr
*** ERROR: Symbol file could not be found. Defaulted to export symbols for tcmd.exe -
rax=0000000000000000 rbx=000000013f8da740 rcx=000000fb9e802cc6
rdx=0000000000000000 rsi=00000000017d6be0 rdi=000000013fd98360
rip=000000013f8e33f1 rsp=000000000148e5a0 rbp=000000000148e720
r8=00000000100046d0 r9=00003027cab385dc r10=00002e554ab7cbdc
r11=0000000000000000 r12=00000000017d6be0 r13=0000000000000000
r14=0000000000000001 r15=0000000000000001
iopl=0 nv up ei pl zr na po nc
cs=0033 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
tcmd!CPUUsage+0x91:
00000001`3f8e33f1 49f7f3 div rax,r11



0:000> kb
*** Stack trace for last set context - .thread/.cxr resets it
RetAddr : Args to Child : Call Site
00000001`3f8da7a7 : 00000000`00003618 00000000`000037d8 00000000`00000000 00000000`00000030 : tcmd!CPUUsage+0x91
00000001`3f91719a : 00000000`00000591 00000001`3f8da740 00000001`3f8c0000 00000001`3fd98360 : tcmd+0x1a7a7
00000001`3f8e2b66 : 00000000`017d6be0 00000000`00000000 00000000`00000001 00000000`00000000 : tcmd!CPUUsage+0x33e3a
00000001`3f918f8e : 00000001`3f8e2ae0 00000000`00000001 00000000`00000000 00000000`017d6be0 : tcmd+0x22b66
00000001`3f911e3d : 00000000`00000000 00000001`3f918f40 00000000`00000001 00000000`0eb5c704 : tcmd!CPUUsage+0x35c2e
00000001`3f912954 : 00000000`00000229 00000000`7751228c 00000000`0148f884 00000001`3f912900 : tcmd!CPUUsage+0x2eadd
00000000`774e9bbd : 00000001`3f912900 00000000`00000001 00000000`00000000 00000000`00000000 : tcmd!CPUUsage+0x2f5f4
00000000`774e3b94 : 00000000`0006079a 00000001`3f912900 00000000`00000113 00000000`00000000 : user32!UserCallWinProcCheckWow+0x1ad
00000000`774e3b10 : 00000000`01625808 00000001`3f912900 00000000`00000113 00000000`00000000 : user32!CallWindowProcAorW+0xdc
00000001`3fb687b7 : 00000000`01625808 00000001`3f912900 00000000`00000113 00000000`00000113 : user32!CallWindowProcW+0x18
00000000`774e9bbd : 00000000`00000000 00000000`00000000 00000000`00000001 00000000`00000000 : tcmd!CPUUsage+0x285457
00000000`774e98c2 : 00000000`016257c8 00000001`3fb686b0 00000000`01625770 00000000`020a93b0 : user32!UserCallWinProcCheckWow+0x1ad
00000001`3f92ee7e : 00000000`016257c8 00000000`016257c8 00000001`3fb686b0 00000000`00000001 : user32!DispatchMessageWorker+0x3b5
00000001`3f92f5f3 : 00000001`3f92f560 00000000`00000000 00000000`00000001 00002d46`d7090965 : tcmd!CPUUsage+0x4bb1e
00000001`3fc8e99a : 00000001`3f9322f0 00000001`3f8c0000 00000000`00000000 00000000`00000000 : tcmd!CPUUsage+0x4c293
00000001`3fade5e3 : 00000000`0000000a 00000000`00000000 00000000`00000000 00000000`00000000 : tcmd!CPUUsage+0x3ab63a
00000000`775e59cd : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : tcmd!CPUUsage+0x1fb283
00000000`7771a561 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0xd
00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x21
 
Jan 19, 2009
23
1
My apologies for posting to the wrong forum.

.excr is the command entered into WinDbg to display the exception record stored withing a dump file.

The exception is taking place in TCMD code, in particular at offset 0x91 from the beginning of function tcmd!CPUUsage.

Does tcmd.exe not have a function called CPUUsage()? strings tcmd.exe includes

?CPUUsage@@YAHXZ
 
Jan 19, 2009
23
1
tcmd is often in the background and idle when it crashes. I have a minidump if you are interested.
 

rconn

Administrator
Staff member
May 14, 2008
12,556
167
The only way that CPUUsage could fail is if the Windows GetSystemTimes API fails. And the only way that can fail is if you either:

1) Have a busted Windows installation, or
2) Have broken hardware, or
3) Have another app that's intercepting (and breaking) the API.

I made a change in build 28 (already uploaded) that wraps the API call in an exception handler; try that version and let me know if it changes the behavior.