Tech Tip – Apache HTTP Server Not Starting on Windows

iam tech tips

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:, time stamp: 0x56187590

Faulting module name: mod_sm24.dll, version:, time stamp: 0x55f7cc05

Exception code: 0xc00000fd

Fault offset: 0x0000000000167987

Faulting process id: 0xab4

Faulting application start time: 0x01d1570bf07d34be

Faulting application path: C:\Apache24\bin\httpd.exe

Faulting module path: C:\Program Files\CA\webagent\win64\bin\mod_sm24.dll

Report Id: 2ea325cc-c2ff-11e5-8abf-000c29d059bd

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

In httpd__PID__1556__Date__12_02_2015__Time_11_29_21AM__813__Second_Chance_Exception_C00000FD.dmp the assembly instruction at mod_sm24!CSmPasswordMsgWriter::WriteMessage+6d4c7 in C:\Program Files\CA\webagent\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

  • Web Agent Version: r12.52 SP1 CR2 (However, this is applicable for any r12.5x version)
  • Web Server OS : Windows
  • Web Server : Apache 2.4/2.2
Root 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 webserver executable (httpd.exe) is built with a default stack reserve of 256KB.

This is not enough 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.


An external utility, EDITBIN.exe, can be used to change the binary executable’s header and the required stack reserve memory can be specified.

Sample syntax:

EDITBIN.EXE /STACK:reserve <files>

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

EDITBIN.EXE /STACK:524288 httpd.exe

This tool is bundled with Visual studio by default.

However, it can also be installed standalone using the following download link :


Additionally, both Visual studio and the attached editbin standalone zip comes with “link” tool which can be used to dump header information from the executable.


1. Step 1 : Find stack information from the header dump

C:\Apache24\bin\editbin>link /dump /headers httpd.exe | find “stack”

40000 size of stack reserve

1000 size of stack commit

2. Step 2: Using editbin.exe increase stack reserve memory to 512KB

C:\Apache24\bin\editbin>editbin /stack:524288 httpd.exe

Microsoft (R) COFF/PE Editor Version 8.00.50727.42

Copyright (C) Microsoft Corporation.  All rights reserved.

3. Step 3: Verify using the header dump if the stack reserve memory is increased or not

C:\Apache24\bin\editbin>link /dump /headers httpd.exe | find “stack”

80000 size of stack reserve

1000 size of stack commit

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

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *