Page 1 of 1

Poor stacktrace and no mad file?

PostPosted: Mon May 17, 2004 3:06 pm
by dors
I'm using madExcept with a NT Service, and the stack trace is very poor; what's also puzzling me is that I'm not seeing a .mad file -- shouldn't I find one? I do have a .map file though.

Here's an example report:

Code: Select all
date/time         : 2004-05-17 16:33
computer name     : TPOL
user name         : SYSTEM
operating system  : Windows 2000 Service Pack 4 build 2195
system language   : German
system up time    : 13 days 12 hours
program up time   : 39 seconds
physical memory   : 170/511 MB (free/total)
free disk space   : (C:) 608,70 MB
process id        : $128
executable        : RMP2Service.exe
exec. date/time   : 2004-05-17 16:33
madExcept version : 2.7a
exception class   : EOracleError
exception message : ORA-01017: invalid username/password; logon denied.
hdos Worker ($328):
004c0cb8 RMP2Service.exe Oracle       RaiseOracleError
60b163ab oran8.dll                    nioqwa
6048420c OraClient8.Dll               upirtr
77e7833a kernel32.dll                 CreateFileW
004c50a3 RMP2Service.exe Oracle       TOracleSession.ReturnCode
00404380 RMP2Service.exe System       @TryFinallyExit
004022d1 RMP2Service.exe System       SysGetMem
00403e63 RMP2Service.exe System       @ClassCreate
00403ebb RMP2Service.exe System       @AfterConstruction
0042e792 RMP2Service.exe madExcept    HookedTThreadExecute
004460c0 RMP2Service.exe Classes      ThreadProc
004048d0 RMP2Service.exe System       ThreadWrapper
0042e72f RMP2Service.exe madExcept    ThreadExceptFrame
>> created by thread $728 (TServiceThread) at:
0050c00e RMP2Service.exe main      94 TRMP2.ServiceStart
main thread ($3d8):
77e017e8 user32.dll                     WaitMessage
0047caa6 RMP2Service.exe Forms          TApplication.Idle
0047c217 RMP2Service.exe Forms          TApplication.HandleMessage
0047faa3 RMP2Service.exe SvcMgr         TServiceApplication.Run
0050e582 RMP2Service.exe RMP2Service 14 EntryPoint
thread $6f8 (TServiceStartThread):
77882926 ntdll.dll                 NtReadFile
77e785cb kernel32.dll              ReadFile
7936662d advapi32.dll              StartServiceCtrlDispatcherA
0047f8df RMP2Service.exe SvcMgr    TServiceStartThread.Execute
0042e792 RMP2Service.exe madExcept HookedTThreadExecute
004460c0 RMP2Service.exe Classes   ThreadProc
004048d0 RMP2Service.exe System    ThreadWrapper
0042e72f RMP2Service.exe madExcept ThreadExceptFrame
>> created by main thread ($3d8) at:
0047f877 RMP2Service.exe SvcMgr    TServiceStartThread.Create
thread $278:
77882870 ntdll.dll                 NtWaitForSingleObject
77e73b26 kernel32.dll              WaitForSingleObjectEx
77e73b4b kernel32.dll              WaitForSingleObject
00446556 RMP2Service.exe Classes   TThread.WaitFor
0047edb1 RMP2Service.exe SvcMgr    TService.DoStart
0047ece0 RMP2Service.exe SvcMgr    TService.Main
0047f1c3 RMP2Service.exe SvcMgr    TServiceApplication.DispatchServiceMain
0047efe2 RMP2Service.exe SvcMgr    ServiceMain
>> created by thread $6f8 (TServiceStartThread) at:
0042e72f RMP2Service.exe madExcept ThreadExceptFrame
thread $728 (TServiceThread):
77e01555 user32.dll               
77e05fa3 user32.dll                GetMessageA
0047e55f RMP2Service.exe SvcMgr    TServiceThread.ProcessRequests
0047e3dc RMP2Service.exe SvcMgr    TServiceThread.Execute
0042e792 RMP2Service.exe madExcept HookedTThreadExecute
004460c0 RMP2Service.exe Classes   ThreadProc
004048d0 RMP2Service.exe System    ThreadWrapper
0042e72f RMP2Service.exe madExcept ThreadExceptFrame
>> created by thread $278 at:
0047e2df RMP2Service.exe SvcMgr    TServiceThread.Create
thread $488:
7788287e ntdll.dll     NtWaitForMultipleObjects
77e73c21 kernel32.dll  WaitForMultipleObjectsEx
77e78f08 kernel32.dll  WaitForMultipleObjects
00400000 RMP2Service.exe                C:\work\Bosch EW\RMP2\exe
013d0000 oravsn8.dll                    D:\oracle\ora81\bin
013e0000 orannzsbb8.dll                 D:\oracle\ora81\bin
01450000 orancds8.dll                   D:\oracle\ora81\bin
01460000 oranms.dll                     D:\oracle\ora81\bin
01470000 oranmsp.dll                    D:\oracle\ora81\bin
10000000 oci.dll                        D:\oracle\ora81\bin
60000000 orageneric8.dll                D:\oracle\ora81\bin
60200000 oracommon8.dll                 D:\oracle\ora81\bin
60350000 orawtc8.dll                    D:\oracle\ora81\bin
60400000 OraClient8.Dll                 D:\oracle\ora81\bin
60600000 oracore8.dll                   D:\oracle\ora81\bin
60800000 oranls8.dll                    D:\oracle\ora81\bin
60a00000 oranl8.dll                     D:\oracle\ora81\bin
60b00000 oran8.dll                      D:\oracle\ora81\bin
60e00000 orancrypt8.dll                 D:\oracle\ora81\bin
61100000 oranro8.dll                    D:\oracle\ora81\bin
61500000 oranldap8.dll                  D:\oracle\ora81\bin
61700000 oraldapclnt8.dll               D:\oracle\ora81\bin
61900000 oranhost8.dll                  D:\oracle\ora81\bin
62100000 oranoname8.dll                 D:\oracle\ora81\bin
62300000 orantns8.dll                   D:\oracle\ora81\bin
62500000 orannds8.dll                   D:\oracle\ora81\bin
62700000 ORATRACE8.dll                  D:\oracle\ora81\bin
62900000 orapls8.dll                    D:\oracle\ora81\bin
63100000 oraslax8.dll                   D:\oracle\ora81\bin
63200000 orasql8.dll                    D:\oracle\ora81\bin
64700000 orantcp8.dll                   D:\oracle\ora81\bin
70a70000 SHLWAPI.DLL      6.0.2800.1400 C:\WINNT\system32
71710000 comctl32.dll     5.81.4916.400 C:\WINNT\system32
74f40000 msafd.dll        5.0.2195.6602 C:\WINNT\system32
74f80000 wshtcpip.dll     5.0.2195.6601 C:\WINNT\System32
74f90000 WS2HELP.DLL      5.0.2134.1    C:\WINNT\system32
74fa0000 WS2_32.DLL       5.0.2195.6601 C:\WINNT\system32
74fc0000 wsock32.dll      5.0.2195.6603 C:\WINNT\system32
750c0000 SAMLIB.DLL       5.0.2195.6897 C:\WINNT\system32
750e0000 NETAPI32.DLL     5.0.2195.6897 C:\WINNT\system32
75130000 NETRAP.DLL       5.0.2134.1    C:\WINNT\system32
75940000 LZ32.DLL         5.0.2195.6611 C:\WINNT\system32
75df0000 IMM32.DLL        5.0.2195.6655 C:\WINNT\system32
76b00000 comdlg32.dll     5.0.3700.6693 C:\WINNT\system32
772f0000 MPRAPI.DLL       5.0.2181.1    C:\WINNT\system32
77310000 iphlpapi.dll     5.0.2195.6602 C:\WINNT\system32
77330000 DHCPCSVC.DLL     5.0.2195.6685 C:\WINNT\system32
77350000 ADSLDPC.DLL      5.0.2195.6701 C:\WINNT\system32
77380000 ACTIVEDS.DLL     5.0.2195.6601 C:\WINNT\system32
77490000 RASMAN.DLL       5.0.2195.6604 C:\WINNT\system32
774b0000 RASAPI32.DLL     5.0.2195.6625 C:\WINNT\system32
774f0000 ICMP.DLL         5.0.2134.1    C:\WINNT\system32
77500000 TAPI32.DLL       5.0.2195.6664 C:\WINNT\system32
77540000 WINMM.dll        5.0.2161.1    C:\WINNT\system32
77580000 SHELL32.DLL      5.0.3700.6705 C:\WINNT\system32
777d0000 winrnr.dll       5.0.2160.1    C:\WINNT\System32
777e0000 rasadhlp.dll     5.0.2168.1    C:\WINNT\system32
77810000 version.dll      5.0.2195.6623 C:\WINNT\system32
77820000 RTUTILS.DLL      5.0.2168.1    C:\WINNT\system32
77830000 rnr20.dll        5.0.2195.6603 C:\WINNT\System32
77880000 ntdll.dll        5.0.2195.6899 C:\WINNT\system32
77940000 WLDAP32.DLL      5.0.2195.6666 C:\WINNT\system32
77970000 DNSAPI.DLL       5.0.2195.6824 C:\WINNT\system32
779a0000 oleaut32.dll     2.40.4522.0   C:\WINNT\system32
77a40000 ole32.dll        5.0.2195.6906 C:\WINNT\system32
77d20000 RPCRT4.DLL       5.0.2195.6904 C:\WINNT\system32
77e00000 user32.dll       5.0.2195.6897 C:\WINNT\system32
77e70000 kernel32.dll     5.0.2195.6897 C:\WINNT\system32
77f40000 GDI32.DLL        5.0.2195.6898 C:\WINNT\system32
78000000 msvcrt.dll       6.1.9844.0    C:\WINNT\system32
78310000 SETUPAPI.DLL     5.0.2195.6622 C:\WINNT\system32
791a0000 USERENV.DLL      5.0.2195.6794 C:\WINNT\system32
79350000 advapi32.dll     5.0.2195.6876 C:\WINNT\system32
79430000 SECUR32.DLL      5.0.2195.6695 C:\WINNT\system32
004c0caa   mov     ecx, esi
004c0cac   mov     dl, 1
004c0cae   mov     eax, [$4bdbc0]
004c0cb3   call    -$116c ($4bfb4c)       ; EOracleError.Create
004c0cb8 > call    -$bc9f9 ($4042c4)      ; @RaiseExcept
004c0cbd   add     esp, $fa8
004c0cc3   pop     edi
004c0cc4   pop     esi
004c0cc5   pop     ebx

The error is triggered when calling a procedure called "TOracleSession.Logon" in a procedure of the Worker Thread called "DoDbLogin" which again is called in the Execute method of he thread, all in a unit called "main.pas". I cannot find any of that, but shouldn't I?


PostPosted: Mon May 17, 2004 3:28 pm
by madshi
The "mad" file is only there if you disable the option "append map file to binary". If you have that option enabled (which I do recommend) the map file information is stored into your exe file instead of into the external "mad" file.

Could you please update to 2.7b? That might improve the stack trace quality. You can also try the latest beta version. (2.7b) (2.7c beta 8)

The error is triggered when calling a procedure called "TOracleSession.Logon" in a procedure of the Worker Thread called "DoDbLogin" which again is called in the Execute method of he thread, all in a unit called "main.pas". I cannot find any of that, but shouldn't I?

If your description of the events is correct then you should see that, yes. However, the exception is definately raised in a thread named "hdos Worker", there's no doubt about that. That sounds a bit different to what you describe.

PostPosted: Mon May 17, 2004 7:17 pm
by dors
"hdos Worker" is the ThreadName I gave to the TWorkerThread. I have the option "append" enabled, but I think I tried also disabling this and still saw no *.mad file; will check that tomorrow.

I will also try 2.7b tomorrow and see if that improves the trace quality.

PostPosted: Tue May 18, 2004 7:58 am
by dors
First, I found the reason why I didn't see the mad file: that extension is totally eaten by my system; the file type is something like "Link to Microsoft Access Modul", and it even has a small arrow in the icon.

Second, updating to 2.7b really helped:

Code: Select all
hread $720 (TWorkerThread):
004c1234 RMP2Service.exe Oracle        RaiseOracleError
004c445b RMP2Service.exe Oracle        TOracleSession.LogOn
0050d015 RMP2Service.exe main      332 TWorkerThread.DoDbLogin
0050d4e4 RMP2Service.exe main      464 TWorkerThread.Execute
0042ed06 RMP2Service.exe madExcept     HookedTThreadExecute
0044663c RMP2Service.exe Classes       ThreadProc
00404994 RMP2Service.exe System        ThreadWrapper
0042ec9b RMP2Service.exe madExcept     ThreadExceptFrame
>> created by thread $564 (TServiceThread) at:
0050c58a RMP2Service.exe main       94 TRMP2.ServiceStart

BTW: the reason I didn't update earlier was that I was under the impression that madExcept wasn't affected, as it wasn't mentioned in the announcement of the Yahoo! group message.

Anyway, thanks for the quick help and bearing with a noobie! :-)


PostPosted: Tue May 18, 2004 8:29 am
by madshi
Well, madDisAsm was improved in 2.7b and that indirectly helped the stack trace quality, since madExcept's stack tracing depends on a perfectly working disassembler.