Discussion:
No more JIT debugging, PLEASE!
(too old to reply)
Ross Presser
2009-08-17 18:21:18 UTC
Permalink
I have a Windows 2003 Server (x64). It runs various web apps under
IIS, including some .NET 2.0 apps and some PHP apps. Once in a while
PHP crashes the entire web service. This is a calamity to be sure, but
we will be working on fixing that soon.

However, when it crashes the web service, the JIT debugger tries to
attach to services.exe. But since there's no managed code, it can't,
and complains that it has no debugger available for unmanaged code.

If nobody is logged in at the server, this is okay; a note is written
to the Application event log, the service terminates, and is
immediately restarted automatically. But if I've got a session logged
in at the server, this complaint is a popup window, and the service
will not be automatically restarted until I hit OK.

The result of this is that all PHP apps die until I hit OK.

Visual Studio has never been installed on this server. However, the
CLR debugger from the .NET 2.0 SDK has.

JIT debugging has been disabled for managed code using the CLR
debugger's menu. The CLR debugger does not have any menu option for
disabling JIT debugging for unmanaged code. How can I disable it?

I don't want to have to uninstall the SDK. On occasion I do want to
debug ASP.NET code, though not just-in-time. (This is a development
web server, not our main production server, but one of the PHP apps
running does not have any equivalent on the main production server.)

Any suggestions?
Geoff
2009-08-17 19:12:53 UTC
Permalink
On Mon, 17 Aug 2009 11:21:18 -0700 (PDT), Ross Presser
Post by Ross Presser
I have a Windows 2003 Server (x64). It runs various web apps under
IIS, including some .NET 2.0 apps and some PHP apps. Once in a while
PHP crashes the entire web service. This is a calamity to be sure, but
we will be working on fixing that soon.
However, when it crashes the web service, the JIT debugger tries to
attach to services.exe. But since there's no managed code, it can't,
and complains that it has no debugger available for unmanaged code.
If nobody is logged in at the server, this is okay; a note is written
to the Application event log, the service terminates, and is
immediately restarted automatically. But if I've got a session logged
in at the server, this complaint is a popup window, and the service
will not be automatically restarted until I hit OK.
The result of this is that all PHP apps die until I hit OK.
Visual Studio has never been installed on this server. However, the
CLR debugger from the .NET 2.0 SDK has.
JIT debugging has been disabled for managed code using the CLR
debugger's menu. The CLR debugger does not have any menu option for
disabling JIT debugging for unmanaged code. How can I disable it?
I don't want to have to uninstall the SDK. On occasion I do want to
debug ASP.NET code, though not just-in-time. (This is a development
web server, not our main production server, but one of the PHP apps
running does not have any equivalent on the main production server.)
Any suggestions?
This appears to apply:
http://support.microsoft.com/kb/923827
Ross Presser
2009-08-19 15:55:34 UTC
Permalink
Post by Geoff
On Mon, 17 Aug 2009 11:21:18 -0700 (PDT), Ross Presser
Post by Ross Presser
I have a Windows 2003 Server (x64). It runs various web apps under
IIS, including some .NET 2.0 apps and some PHP apps. Once in a while
PHP crashes the entire web service. This is a calamity to be sure, but
we will be working on fixing that soon.
However, when it crashes the web service, the JIT debugger tries to
attach to services.exe. But since there's no managed code, it can't,
and complains that it has no debugger available for unmanaged code.
If nobody is logged in at the server, this is okay; a note is written
to the Application event log, the service terminates, and is
immediately restarted automatically.  But if I've got a session logged
in at the server, this complaint is a popup window, and the service
will not be automatically restarted until I hit OK.
The result of this is that all PHP apps die until I hit OK.
Visual Studio has never been installed on this server. However, the
CLR debugger from the .NET 2.0 SDK has.
JIT debugging has been disabled for managed code using the CLR
debugger's menu.  The CLR debugger does not have any menu option for
disabling JIT debugging for unmanaged code.  How can I disable it?
I don't want to have to uninstall the SDK. On occasion I do want to
debug ASP.NET code, though not just-in-time. (This is a development
web server, not our main production server, but one of the PHP apps
running does not have any equivalent on the main production server.)
Any suggestions?
This appears to apply:http://support.microsoft.com/kb/923827
THANKS!

Geoff
2009-08-17 19:28:56 UTC
Permalink
I should also add that you can disable JIT by letting it enter the
debugger, stop the debugee and then disable JIT debug in the Tools
menue of whatever debugger it is using. It will do the registry
manipulation for you.

Setting the registry to

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\AeDebug]
"Auto"="1"
"Debugger"="drwtsn32 -p %ld -e %ld -g"

... will force DrWatson to do the usual core dump and let the service
restart.
Loading...