Showing posts with label Debugging. Show all posts
Showing posts with label Debugging. Show all posts

Tuesday, December 1, 2009

Essential BizTalk Debugging Skills


On the topic of debugging skills, there are many things said and to be said, but I thought I’d take a moment to reflect on a few skills I believe BizTalk developers should develop to solve problems on their solutions effectively (in no particular order):

  1. Trace the execution of BizTalk processes end-to-end, covering both messaging and orchestrations. While this seems obvious at first, it can be tough on complex solutions that rely heavily on pub/sub and direct binding!
  2. Discovering the reasons why a service instance might be getting suspended. In particular, quickly finding any possible exception information coming from faulted instances.
  3. Using the orchestration debugger to figure out where a given Orchestration instance is getting suspended.
  4. Matching any receive shapes in an orchestration to the origin of messages coming for it. This might require matching logical ports with physical ports as well as possible direct-binding sources of messages.
  5. Tracking possible reasons for routing failures, particularly when correlations are involved. This includes being able to understand routing failure reports, checking the state of any required promoted property, comparing subscription information either directly on the message box as well as from reading orchestration code, and so on.
  6. Detecting and solving situations that stop flow/processing of messages, related to thread pool issues or thread starvation.
  7. Detecting zombie message instances and their possible consequences.
  8. Knowing how to enable the BAM tracing infrastructure to debug and solve issues with BAM not writing data to the BAM primary import database.
  9. Using the Visual Studio Debugger or WinDBG to debug BizTalk processes. This includes figuring out the right processes to attach to!
  10. Debugging assembly-loading/versioning issues. This includes how to use Fuslogvw.exe and friends.
(Source: Tomas Restrepo)

Monday, October 26, 2009

ProcDump sysinternals tool - really really helpful to create a memory dump

As described in Sysinternals documentation
http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx

ProcDump is a command-line utility whose primary purpose is monitoring an application for CPU spikes and generating crash dumps during a spike that an administrator or developer can use to determine the cause of the spike. ProcDump also includes hung window monitoring (using the same definition of a window hang that Windows and Task Manager use) and unhandled exception monitoring. It also can serve as a general process dump utility that you can embed in other scripts.

You don’t need to write your own utility to create a memory dump by monitoring performance counter. Don’t forget to use the switch “-ma” to dump full memory(especially for .net app) because by default it only dumps thread and handle.

This is really helpful to get a memory dump based on CPU usage and we could probably get the memory dump without using ADPlus in most of the cases.

syntax to dump full memory given process id is

procdump -ma

syntax to dump full memory given process id and cpu usage 80%(threshold)

procdump -ma -c 80