![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
.NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506) |
|
Faulting application a2ssvc.exe, version 3.0.2259.15264, stamp 440fe9e5, faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, debug? 0, fault address 0x00007a7f. |
#2
| |||
| |||
|
|
Do these messages in the event log look familiar to anyone? Could they be caused by calling Thread.Abort() on a System.Threading.Thread without giving it time to clean up? They are generated when a service written in .Net 2005 is stopped. Nothing abnormal seems to happen as long as the service is running, but stopping it causes an error for which no exception is raised in the application itself. - The service seems to stop immediately when it's asked to. "Immediately" means the services control panel indicates the service is no longer running within 1 second after clicking "Stop", or if it's done trough "net stop {servicename}" at a command prompt, the prompt returns almost immediately. - Despite that, the .exe file remains active with 100% CPU use (seen in task manager) for about half a minute after that. - The following two messages appear in the [Application] event log: Source: .NET Runtime Category: None Event ID: 1023 Description: | .NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error | (7A05E2B3) (80131506) Source: .Net Runtime 2.0 Error Category: None Event ID: 1000 Description: | Faulting application a2ssvc.exe, version 3.0.2259.15264, stamp 440fe9e5, | faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, | debug? 0, fault address 0x00007a7f. Some directional info on what the service uses/does: It creates two worker threads, which are killed by means of Thread.Abort() when the service is asked to stop. I've heard that calling Abort() can have some nasty consequences for the rest of the application (something about messing up the application domain), but I didn't worry too much about that because it's exiting anyhow. Each thread should be seen as a separate application on its own: the only thing they access in common is a database (MSDE or SQL Express); each thread uses its own connection objects for that, nothing cross-thread. There is no communication between the threads at all, they work fully independent of one another. One of the threads creates and uses net sockets (Net.Sockets.TcpClient), the other uses some COM objects and communicates with a UI app through named pipes. |
#3
| ||||||
| ||||||
|
|
If the process is still running, it means that your service did not stop (yet), issuing the "net stop" command is asynchronous, it always returns immediately, whether your service has stopped or not. |

|
E:\WINNT>net stop a2spoll The A2SPoll service is stopping. The A2SPoll service was stopped successfully. E:\WINNT |
|
The fact that you are seeing 100% CPU consumption probably means that the finalizer thread is active running the finalizers, you may have some |
|
problems cleaning up unmanaged resources if it takes that long (guess your COM objects, are you sure they run in the correct apartment?). |
|
If the it takes longer than 30 seconds to terminate the process, the CLR will issue a rude thread abort. |
|
And yes, calling Abort on an other thread than the current thread is something you should never do, signal the other threads that they should exit, for instance by using a ManualReset Event. Is there any particular reason why you would stop a service other than shutting down the system? |
#4
| ||||
| ||||
|
|
On Fri, 17 Mar 2006 21:41:35 +0100, "Willy Denoyette [MVP]" willy.denoyette (AT) telenet (DOT) be> wrote: If the process is still running, it means that your service did not stop (yet), issuing the "net stop" command is asynchronous, it always returns immediately, whether your service has stopped or not. |
|
I thought it was synchrounous up to a certain time-out, but I don't have a non-functional service ready to test it ![]() I copied this from a console window on a test system: | E:\WINNT>net stop a2spoll | The A2SPoll service is stopping. | The A2SPoll service was stopped successfully. | | | E:\WINNT A short delay (between 1 and 2 seconds) expired between the "stopping" and "stopped" messages. The service executable remained active in task manager for a considerable time after that. If it hadn't told the SCM it stopped, the services control panel applet would list the service as "Stopping". It doesn't, and it's even possible to start the service again while the previous instance is still shown in task manager (so two instances of the process are running at the same time). I think that means the CLR is running finalizers and garbage collection _after_ the service control function has returned (to the SCM) from processing the SERVICE_CONTROL_STOP message. The fact that you are seeing 100% CPU consumption probably means that the finalizer thread is active running the finalizers, you may have some Not always 100% actually, and the 'fatal execution engine error' doesn't occur every time either (but >5 times out of 10, and more likely if the service has been running for a longer time). problems cleaning up unmanaged resources if it takes that long (guess your COM objects, are you sure they run in the correct apartment?). As far as I can tell - there's a single STA thread that creates them and does all processing related to them. |
|
There are a few cases (certain actions started by UI commands) where that thread will spawn a new working thread that accesses them through Invoke, but whether that has been done or not seems to make no difference. If the it takes longer than 30 seconds to terminate the process, the CLR will issue a rude thread abort. Could that be reflected by a 'fatal execution engine error' in the event log? |
|
And yes, calling Abort on an other thread than the current thread is something you should never do, signal the other threads that they should exit, for instance by using a ManualReset Event. Is there any particular reason why you would stop a service other than shutting down the system? For installing an update for example, if you want to avoid a reboot. |
#5
| |||
| |||
|
|
Do these messages in the event log look familiar to anyone? Could they be caused by calling Thread.Abort() on a System.Threading.Thread without giving it time to clean up? They are generated when a service written in .Net 2005 is stopped. Nothing abnormal seems to happen as long as the service is running, but stopping it causes an error for which no exception is raised in the application itself. - The service seems to stop immediately when it's asked to. "Immediately" means the services control panel indicates the service is no longer running within 1 second after clicking "Stop", or if it's done trough "net stop {servicename}" at a command prompt, the prompt returns almost immediately. - Despite that, the .exe file remains active with 100% CPU use (seen in task manager) for about half a minute after that. - The following two messages appear in the [Application] event log: Source: .NET Runtime Category: None Event ID: 1023 Description: | .NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error | (7A05E2B3) (80131506) Source: .Net Runtime 2.0 Error Category: None Event ID: 1000 Description: | Faulting application a2ssvc.exe, version 3.0.2259.15264, stamp 440fe9e5, | faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, | debug? 0, fault address 0x00007a7f. Some directional info on what the service uses/does: It creates two worker threads, which are killed by means of Thread.Abort() when the service is asked to stop. I've heard that calling Abort() can have some nasty consequences for the rest of the application (something about messing up the application domain), but I didn't worry too much about that because it's exiting anyhow. Each thread should be seen as a separate application on its own: the only thing they access in common is a database (MSDE or SQL Express); each thread uses its own connection objects for that, nothing cross-thread. There is no communication between the threads at all, they work fully independent of one another. One of the threads creates and uses net sockets (Net.Sockets.TcpClient), the other uses some COM objects and communicates with a UI app through named pipes. |
#6
| |||
| |||
|
|
I have a similair problem. The event-log of the web-server is full of these errors: Faulting application w3wp.exe, version 6.0.3790.1830, stamp 42435be1, faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, debug? 0, fault address 0x000e9f96. .NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error (7A05E2B3) (80131506) We installed .NET2.0 on the server (running 1.1 apps) and installed a 2.0 app-project (converted from 1.1) Any suggestions? /Marcus "Lucvdv" wrote: Do these messages in the event log look familiar to anyone? Could they be caused by calling Thread.Abort() on a System.Threading.Thread without giving it time to clean up? They are generated when a service written in .Net 2005 is stopped. Nothing abnormal seems to happen as long as the service is running, but stopping it causes an error for which no exception is raised in the application itself. - The service seems to stop immediately when it's asked to. "Immediately" means the services control panel indicates the service is no longer running within 1 second after clicking "Stop", or if it's done trough "net stop {servicename}" at a command prompt, the prompt returns almost immediately. - Despite that, the .exe file remains active with 100% CPU use (seen in task manager) for about half a minute after that. - The following two messages appear in the [Application] event log: Source: .NET Runtime Category: None Event ID: 1023 Description: | .NET Runtime version 2.0.50727.42 - Fatal Execution Engine Error | (7A05E2B3) (80131506) Source: .Net Runtime 2.0 Error Category: None Event ID: 1000 Description: | Faulting application a2ssvc.exe, version 3.0.2259.15264, stamp 440fe9e5, | faulting module mscorwks.dll, version 2.0.50727.42, stamp 4333e7ec, | debug? 0, fault address 0x00007a7f. Some directional info on what the service uses/does: It creates two worker threads, which are killed by means of Thread.Abort() when the service is asked to stop. I've heard that calling Abort() can have some nasty consequences for the rest of the application (something about messing up the application domain), but I didn't worry too much about that because it's exiting anyhow. Each thread should be seen as a separate application on its own: the only thing they access in common is a database (MSDE or SQL Express); each thread uses its own connection objects for that, nothing cross-thread. There is no communication between the threads at all, they work fully independent of one another. One of the threads creates and uses net sockets (Net.Sockets.TcpClient), the other uses some COM objects and communicates with a UI app through named pipes. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |