Code works on regular console but fails on StackOverFlow in IIS (0xc00000fd)
I have an entity framework project that simply failed all the time when running under IIS 32bit app while its always working when compiled into a console app.
The first exception is 0xc00000fd - take from the event viewer:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc00000fd
Fault offset: 0x0cc902b7
Faulting process id: 0x2038
Faulting application start time: 0x01cd58d87d82114e
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: unknown
Report Id: c3cbfc5a-c4cb-11e1-bbef-001c422bca8f
I used ADPLUS and used a preconfigured config file:
<ADPlus Version='2'>
<Settings>
<Runmode> Crash </Runmode>
</Settings>
<!-- defining and configuring exceptions -->
<Exceptions>
<!-- First we redefine all exceptions -->
<AllExceptions>
<Actions1>Log</Actions1>
<Actions2>MiniDump;Log;EventLog</Actions2>
</AllExceptions>
<NewException Code="0xe053534f" Name="Unknown_Exception">
<Actions1>FullDump;Log;EventLog</Actions1>
<Actions2>FullDump;Log;EventLog</Actions2>
</NewException>
<NewException Code="0xc00000fd" Name="Unknown_Exception2">
<Actions1>FullDump;Log;EventLog</Actions1>
<Actions2>FullDump;Log;EventLog</Actions2>
</NewException>
</Exceptions>
</ADPlus>
This automatically create full dump on the occurrence of the exception
After reviewing the issue in windbg I finally understood that the root cause is because the Stack Size limit in 32bit app pool in iis is 256kb while in regular console its much higher (here)
I am not going to update the default stack size for w3wp using editbin
I will adjust my code to be better suited for “small stack” environment.
No comments:
Post a Comment