Using BoundsChecker 7.2 to analyze a windows service

0 Likes

Problem:

How do you use BoundsChecker version 7.2 to debug a windows service?

Resolution:

First some background on the problem:

There are several known issues that can occur when BoundsChecker is used to analyze a Windows service. This includes IIS and customer written services:


  1. BoundsChecker does not fully initialize before the Service Control Manager (SCM) terminates the process for being inactive at service start up.
  2. boundsChecker is overly computer intensive and causes the service not to respond to a SCM Status request message in a timely manner. The SCM then terminates the process.
  3. BoundsChecker is computer or I/O intensive during service shutdown and fails to finish writing out the BoundsChecker log before the SCM terminates the process due to inactivity.

In all three cases the resulting BoundsChecker log will be incomplete.

Solution:

The Advanced Configuration chapter of the BoundsChecker documentation has always stated that the solution to this problem is to re-code the customer service to either be an interactive process or to modify the value of dwWait in the SERVICE_STATUS structure passed to the Service Control Manager.

If you are unable to make these changes, the BoundsChecker team has modified BoundsChecker 7.2 to actively change the value of dwWait in the SERVICE_STATUS structure when calls are made to the Service Control Manager.

By default BoundsChecker will modify dwWait to be 5 minutes.

You can change this default by defining a system wide environment variable called NM_SERVICE_TIMEOUT_SECONDS. If this environment variable is defined BoundsChecker will do the following:


  • variable = 0

    BoundsChecker will not alter the value of dwWait in the service

  • variable = non-zero

    BoundsChecker will set the value of dwWait to the number of seconds specified

The default value of 300 seconds (5 minutes) should be sufficient for most services.

For additional tips on using BoundsChecker 7.2 with Windows services please refer to Chapter 7 of the Understanding BoundsChecker Manual. DevPartner Studio customers can find this same information in the DevPartner Manual.

This article applies to BoundsChecker / Error Detection version 7.2 and above only.

Old KB# 11032
Comment List
Anonymous
Related Discussions
Recommended