Groups | Blog | Home
all groups > visual studio .net enterprise tools > april 2004 >

visual studio .net enterprise tools : EIF causes IIS6 process to restart


Steve Norman
4/28/2004 8:51:04 AM
I'm having problems with EIF on windows 2003 / IIS 6

Basically when using logging in our application we see the application domain unload and reload several times during a request. This is causing all kinds of problems

To isolate the problem I have created a new empty web application and followed the steps in the EIF Walkthrough "Adding Simple Instrumentation

In my web app I have a form with a button which causes a postback. in my page load I hav

System.Diagnostics.Debug.WriteLine("PageLoad")
if (IsPostBack

TraceMessageEvent.Raise("Page Load")


I have also added System.Diagnostic.Debug.Writlelns to the application_start and application_end events in global.asax.c

following the walkthrough, I added a custom installer class

[RunInstaller(true)
public class CustomProjectInstaller : ProjectInstalle



and I ran installutil on the compiled dll

when I run the application in the debugger and click the postback button my output trace shows thread abort exceptions as the worker process shuts down and the diagnostic messages for application_end and application starts. If I keep clicking the post back button eventually (sometimes on the next request, sometime 6-10 iterations) it stops unloading the appdomain and settles down and behaves as expected

The debug output from Visual Studio is shown at the bottom of the post

Looking at the Windows logs I can see messages showing that enterpriseinstrumentation.config has been read and backed up. and in the system log there is a message sayin

"A process serving application pool 'DefaultAppPool' exceeded time limits during shut down. The process id was '3436'.

Other than that I cannot find a useful message anywhere. However the sample "Page Load" event I raised does make it to the log file

Any Ideas what might be happening

Thanks

Stev

VS.NET Debug output
Auto-attach to process '[3212] w3wp.exe' on machine 'NORMANS2' succeeded
'DefaultDomain': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.directoryservices\1.0.5000.0__b03f5f7f11d50a3a\system.directoryservices.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.messaging\1.0.5000.0__b03f5f7f11d50a3a\system.messaging.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.serviceprocess\1.0.5000.0__b03f5f7f11d50a3a\system.serviceprocess.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.web\1.0.5000.0__b03f5f7f11d50a3a\system.web.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.data\1.0.5000.0__b77a5c561934e089\system.data.dll', No symbols loaded
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.directoryservices\1.0.5000.0__b03f5f7f11d50a3a\system.directoryservices.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.web.regularexpressions\1.0.5000.0__b03f5f7f11d50a3a\system.web.regularexpressions.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\eiftest\76843c01\378585aa\fqjtfspj.dll', Symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\eiftest\76843c01\378585aa\assembly\dl2\9adaabab\cf6cf6b4_292dc401\eiftest.dll', Symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.web.services\1.0.5000.0__b03f5f7f11d50a3a\system.web.services.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.web.mobile\1.0.5000.0__b03f5f7f11d50a3a\system.web.mobile.dll', No symbols loaded.
'DefaultDomain': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.enterpriseservices\1.0.5000.0__b03f5f7f11d50a3a\system.enterpriseservices.thunk.dll', No symbols loaded.
Application Start
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net files\eiftest\76843c01\378585aa\y9s9od1q.dll', Symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\microsoft.enterpriseinstrumentation.schema\7.0.5000.0__b03f5f7f11d50a3a\microsoft.enterpriseinstrumentation.schema.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\microsoft.enterpriseinstrumentation\7.0.5000.0__b03f5f7f11d50a3a\microsoft.enterpriseinstrumentation.dll', No symbols loaded.
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'c:\windows\assembly\gac\system.management\1.0.5000.0__b03f5f7f11d50a3a\system.management.dll', No symbols loaded.
PageLoad
PageLoad
'/LM/W3SVC/1/Root/EIFTest-2-127276364884646411': Loaded 'fqicgps6', No symbols loaded.
Postback clicked
Application End
timhuang NO[at]SPAM online.microsoft.com
4/29/2004 7:56:00 AM
Hello Steve,

Thanks for your post. As I understand, the problem you are facing is that
your ASP .NET Web Application with EIF causes IIS6 process to restart.
Please correct me if there is any misunderstanding.

Generally speaking, the log "A process serving application pool
'DefaultAppPool' exceeded time limits during shut down. The process id was
'3436'. " is caused by a deadlock in IIS. Please refer to the following KB
article:

HOWTO: Generate a Dump File When ASP.NET Deadlocks in IIS 6.0
http://support.microsoft.com/?ID=828222

Does it work properly if you remove EIF code in Page_Load?

Can you reproduce the problem on another system? You can post a simple
project and tell us the detailed steps to reproduce the problem. I will be
glad to check it on my side.

I look forward to your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Brett Bailey
5/6/2004 3:06:03 AM
Hi Tian

I'm looking at this problem with steve. The IIS worker process does not unload, its the Appdomain that gets unloaded, so I dont think its a deadlock thing

Yes, It works properly if we comment out the eif code

We can reproduce the problem on lots of different machines. So far it has been easier to reproduce on windows 2003 / IIS6 but we do see it in windows 2000, but only when the debugger is attached! As I mentioned before we initially noticed the problem in one of our core products, which for obvious reasons I cannot post here. So I wrote a simple application to illustrate this, which is what steve posted. I also have reports from other development teams in our organisation that they are seeing similar problems in their products

I cannot see a mechanism to upload the code for you to run, do you want me to email it to you? It is very simple to reproduce and only takes about 6 lines of code from a new web project

timhuang NO[at]SPAM online.microsoft.com
5/10/2004 9:31:07 AM
Hi,

You can email a simple project and tell me the detailed steps to reproduce
at timhuang@microsoft.com. I will be glad to check it on my side.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Brett Bailey
5/12/2004 3:46:07 AM
Tian

I sent you the project yesturday? Did you receive it and can you reproduce our problem

We are getting more reports across our organisation of people with similar issue

timhuang NO[at]SPAM online.microsoft.com
5/13/2004 9:37:39 AM
Hi Brett,

I received your project, I am checking it on my side and will update you
with my information.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
yhhuang NO[at]SPAM online.microsoft.com
5/27/2004 9:18:44 AM
Hello Brett,

I was reviewing your question when I realized that it's already two weeks old. We apologied for not getting to you sooner. If you are still
monitoring this issue, please post another note to let me know you are still there. Please also send me the repro project. You can reach me
by removing online from my email address here. We will investigate this for you.

Thanks very much and I am quite sorry for any inconvenience that brought to you and your team.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
yhhuang NO[at]SPAM online.microsoft.com
5/28/2004 2:07:16 AM
Got reply from Steve already. The issue is settled already. It is caused by storing config file in \bin directory.

Thanks for sharing it in the community, Steve.

Best regards,
Yanhong Huang
Microsoft Community Support

Get Secure! ¨C www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button