Debugging with dumps



I'm trying to debug a Windows Service application written with C# and
..NET framework 2.0. We have taken some dumps at the customer location
on a Windows 2000 Server platform. We are using Userdump to take dumps
on exceptions. I'm trying to debug using Windbg and SOS.

I have a few questions:

How do I make SOS display source file line numbers? I have the .PDB
files from building the server and have given WindDbg the source path
to the folder with the .PDB and .DLL files.

How do I ask SOS to display the current location (ideally as a name and
line number)?

The output of the !threads command often has an exception displayed at
the right of the line for a thread (e.g.,"9 7 cd4 001b3720
880b220 Enabled 009753d4:009773ac 00148378 1 MTA (Threadpool
Completion Port) System.NullReferenceException (009045b0)")). What does
this mean? As you can see in the example at the end of this message,
the !clrstack -a command doesn't seem to show any exceptions.

Thanks

Mike

OS Thread Id: 0xcd4 (9)
ESP EIP
03cfeabc 77f82ca0 [NDirectMethodFrameStandalone: 03cfeabc]
Microsoft.Win32.SafeNativeMethods.OutputDebugString(System.String)
03cfeacc 7a4f9126
System.Diagnostics.DefaultTraceListener.internalWrite(System.String)
PARAMETERS:
this = <no data>
message = <no data>

03cfead4 7a4f904a
System.Diagnostics.DefaultTraceListener.Write(System.String, Boolean)
PARAMETERS:
this = 0x007a00a4
message = 0x0079ec84
useLogFile = 0x00000001
LOCALS:
<no data>

03cfeae8 7a4f900f
System.Diagnostics.DefaultTraceListener.Write(System.String)
PARAMETERS:
this = <no data>
message = <no data>

03cfeaec 7a4ff5b6 System.Diagnostics.TraceInternal.Write(System.String)
PARAMETERS:
message = 0x0079ec84
LOCALS:
<CLR reg> = 0x007a00a4
<no data>
0x03cfeaf8 = 0x00795db0
0x03cfeaf4 = 0x009753b8
<no data>
<no data>
<no data>
<no data>

03cfeb28 7a4f86a5 System.Diagnostics.Debug.Write(System.String)
PARAMETERS:
message = <no data>

03cfeb2c 02967469
TSYS.BPM.CTI.Server.Logging.LoggingManager.ProcessLogRequestQueue()
LOCALS:
0x03cfeb3c = 0x00910308
0x03cfeb38 = 0x0091031c
0x03cfeb4c = 0x0000005d
0x03cfeb34 = 0x00904640
0x03cfeb48 = 0x0000011b
0x03cfeb30 = 0x00000000
0x03cfeb2c = 0x00789ac8
0x03cfeb44 = 0x00000000
0x03cfeb40 = 0x00000001

03cfeb78 02964ff2
TSYS.BPM.CTI.Server.Logging.LoggingManager.LogMessage(System.Reflection
..Assembly, System.Object, System.Object, System.String)
PARAMETERS:
assembly = 0x007ccf34
o1 = 0x008f1488
o2 = 0x009045b0
messageID = 0x00825c54
LOCALS:
0x03cfeb84 = 0x0090461c
0x03cfeb80 = 0x00904640
0x03cfeb7c = 0x00000000
0x03cfeb90 = 0x00000001
0x03cfeb78 = 0x00789ac8

03cfebc4 02964e7c
TSYS.BPM.CTI.Server.Logging.LoggingManager.LogMessage(System.Object,
System.Object, System.String)
PARAMETERS:
o1 = 0x008f1488
o2 = 0x009045b0
messageID = 0x00825c54

03cfebd8 03fa4935
TSYS.BPM.CTI.Server.Transport.TcpDelimitedPacket.Connection.OnConnect(S
ystem.IAsyncResult)
PARAMETERS:
this = 0x008f1488
ar = 0x008f4cb0
LOCALS:
0x03cff84c = 0x009045b0

03cff880 7a5653d7 System.Net.LazyAsyncResult.Complete(IntPtr)
PARAMETERS:
this = 0x008f4cb0
userToken = <no data>
LOCALS:
0x03cff888 = 0x00000000
0x03cff880 = 0x0081f904

03cff8b4 7a565c72
System.Net.ContextAwareResult.CompleteCallback(System.Object)
PARAMETERS:
this = <no data>
state = <no data>

03cff8bc 793683dd
System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext
, System.Threading.ContextCallback, System.Object)
PARAMETERS:
executionContext = <no data>
callback = <no data>
state = <no data>
LOCALS:
<no data>

03cff8d4 7a565c3b System.Net.ContextAwareResult.Complete(IntPtr)
PARAMETERS:
this = <no data>
userToken = <no data>
LOCALS:
<no data>

03cff8ec 7a5652eb
System.Net.LazyAsyncResult.ProtectedInvokeCallback(System.Object,
IntPtr)
PARAMETERS:
this = <no data>
result = <no data>
userToken = <no data>
LOCALS:
<no data>

03cff900 7a602235 System.Net.Sockets.Socket.ConnectCallback()
PARAMETERS:
this = <no data>
LOCALS:
<no data>
<no data>
<no data>
<no data>
<no data>

03cff940 7a60a16a
System.Net.Sockets.Socket.RegisteredWaitCallback(System.Object,
Boolean)
PARAMETERS:
state = <no data>
timedOut = <no data>
LOCALS:
<no data>
<no data>

03cff948 793d93bc
System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallb
ack(System.Object, Boolean)
PARAMETERS:
state = <no data>
timedOut = <no data>
LOCALS:
<no data>
<no data>





.



Relevant Pages

  • RE: Unable to copy file. ... Access to the path ... is denied.
    ... The Debug Directory was included in the project. ... ** it the service app used(configured in windows Service manager) when you ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Re: Debugging in the same machine
    ... If you're doing something which can use the user-mode driver framework then you do single machine debugging very easily since you aren't writing kernel code. ... Of course, if you do that, expect to burn up a hell of a lot more dollars than it would cost to get a second machine+1394 and use WinDbg or purchase SoftIce. ... What you get with a pauper single system debug: ... IRP dumps ...
    (microsoft.public.development.device.drivers)
  • Re: VS.NET 2003 - F1 help, doesnt display 1st time, but does 2nd time?
    ... to debug a Windows Service. ... Just curious what OS and what .NET framework version are you using? ... > Hi Rob ...
    (microsoft.public.dotnet.general)
  • Re: Debugging in the same machine
    ... second machine+1394 and use WinDbg or purchase SoftIce. ... What you get with a pauper single system debug: ... IRP dumps ... and of course traces and debug spew. ...
    (microsoft.public.development.device.drivers)
  • Using MAPI and Outlook in a Windows Service
    ... I have written a windows service in VB.NET using .NET 1.1 ... These dlls are in a folder which is a path variable for the machine ... The executable was compiled in debug mode. ... When I comment out any code which references the above dll's, ...
    (microsoft.public.win32.programmer.messaging)

Loading