TMG services hang at startup due to third party service.

This post is once again about an issue I worked on few days back. Before I start discussing about the issue and how I resolved it, I would like to mention that objective of this post is to make TMG admins aware of the issue and what can be done to resolve it, The steps performed to determine the root cause of the issue e.g. user mode dump analysis can’t be done without the symbols(which are private) ,so idea is not to help in performing the dump analysis, instead I want to share the details of dump analysis to show at the time of boot, why TMG services can get hung and won’t start . If you are familiar with terms like process, threads and its stack then you can read it by yourself but if you are not I will explain the observations from it.


TMG server admin was rebooting the server and at the time of reboot TMG services were hanging and were not starting. A similar issue was reported pre TMG sp2 but it was fixed post sp2, in this scenario TMG was updated to latest build i.e. TMG sp2 RU2.


Some background: Lot of work has already happened, before I started working on this issue, so in such scenarios you understand the issue and check the steps that have already been taken to resolve the issue and move from there e.g. steps taken in this were performed already . We were getting following event id


Log Name: System

Source: Service Control Manager

Date: 09/11/2012 17:42:30

Event ID: 7022

Task Category: None

Level: Error


User: N/A

Computer: server1

Description: The Microsoft Forefront TMG Firewall service hung on starting.

Event Xml: <Event



<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}"
EventSourceName="Service Control Manager" />

<EventID Qualifiers="49152">7022</EventID>






<TimeCreated SystemTime="2012-11-09T17:42:30.378163900Z" />


<Correlation />

<Execution ProcessID="716" ThreadID="720" />



<Security />



<Data Name="param1">Microsoft Forefront TMG




 Data collection

During the course of troubleshooting we collected user mode dump while trying to restart the services in automatic startup mode, when it got hung again.

User mode dumps collection reference:

Data analysis

Approach taken in this post is very similar to guidelines given in the following link about debugging a deadlock as we were in a scenario similar to a deadlock


In the dump found following critical section was locked

More about critical section and locked critical section refer:

Then I located the owning thread of this locked critical section. In following snapshot we can see the stack of this thread,  Stack is read from bottom to upside, From this call stack it appears that wspsrv (firewall service) is trying to load a  filter called XSISAPI and has deferred its filters start up  till  this filter is  loaded.













Then  I checked the module for this filter XSISAPI and found following, That is, it’s a filter called  Afaria from Sybase.


We configured the XSISAPI filter service to delayed start and after that TMG services started normally after reboot.






























Comments (0)

Skip to main content