Apache service is not starting up on Windows Web Agent
search cancel

Apache service is not starting up on Windows Web Agent

book

Article ID: 39493

calendar_today

Updated On: 04-09-2025

Products

CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign-On CA Single Sign On Agents (SiteMinder) SITEMINDER

Issue/Introduction


Apache Web Server fails to start while loading SiteMinder module mod_sm24/mod_sm22, and following error message appears in Windows event viewer:

Faulting application name: httpd.exe, version: 2.4.17.0, time stamp: 0x56187590
Faulting module name: mod_sm24.dll, version: 12.52.103.767, time stamp: 0x55f7cc05
Exception code: 0xc00000fd
Fault offset: 0x0000000000167987
Faulting process id: 0xab4
Faulting application start time: 0x01d1570bf07d34be
Faulting application path: C:\{home_apache}\bin\httpd.exe
Faulting module path: C:\{home_web_agent}\win64\bin\mod_sm24.dll

Analyzing the crash dump with Microsoft Debug Diag shows following exception :

In httpd__PID__Second_Chance_Exception.dmp the assembly instruction at mod_sm24!CSmPasswordMsgWriter::WriteMessage+6d4c7 in C:\{home_web_agent}\win64\bin\mod_sm24.dll from Netegrity, Inc. has caused a stack overflow exception (0xC00000FD) when trying to write to memory location 0x00033000 on thread 0

 

Environment


Web Agent 12.52SP1CR2 on Apache 2.4 on Windows;

(However, this is applicable for any r12.5x version)

Cause


The default size for the reserved stack space (and initially committed stack memory) is specified in the executable file header (httpd.exe).

In Windows, the Apache Web Server executable (httpd.exe) is built with a default stack reserve of 256KB.

This is not sufficient for SiteMinder module, hence while loading SiteMinder module, Apache encounters the stack overflow exception as it can't provide enough memory to reserve the number of bytes requested.

 

Resolution


A Microsoft MSVC utility, EDITBIN.exe, can be used to modify the binary executable’s header, and the required stack reserve memory can be specified (1).

How to run it:

c:\> EDITBIN.EXE /STACK:reserve <files>

So, for the current requirement, increase the stack reserve to default 512KB as below:

c:\> EDITBIN.EXE /STACK:524288 httpd.exe

This tool is bundled with Visual studio by default.

Additionally, both Visual Studio comes with "link" tool which can be used to dump header information from the executable (2).

  1. Find stack information from the header dump:

    C:\{home_msvc}\> link /dump /headers C:\{home_apache}\bin\httpd.exe | find "stack"

    40000 size of stack reserve
    1000 size of stack commit

  2. By using editbin.exe, increase stack reserve memory to 512KB:

    C:\{home_msvc}\> editbin /stack:524288 httpd.exe

    Microsoft (R) COFF/PE Editor Version 8.00.50727.42
    Copyright (C) Microsoft Corporation.  All rights reserved.

  3. By using the header dump, verify if the stack reserver memory is increased or not:

    C:\{home_msvc}\> link /dump /headers httpd.exe | find "stack"

    80000 size of stack reserve
    1000 size of stack commit

Note : 40000hex = 256KB, and 80000hex = 512KB

 

Additional Information

Attachments

1558534405819TEC1957282.zip get_app