Windows service stable APPCRASH in clr.dll after 3.5 to 4.0 .NET platform change
-
I have windows service project created with .NET 3.5 some time ago. It uses managed class library with native code via PInvoke. Recently 4.0 .NET version of that class library was created. I had to change windows service configurstion to 4.0 .NET client also. Wierd problem started to appear after 4.0 version compilation. After about 1 minute of run service is terminated. In the Windows Events Application Error entry is created (event code 1000, task category (100)):
Application name: MyService.exe, version: 1.0.0.0, timestamp: 0x4d87107f
Module name: clr.dll, version: 4.0.30319.1, timestamp 0x4ba1d9ef
Exception code: 0xc00000fd
Error offset: 0x000ccd3c
Process id: 0x1680
Time: 0x01cbe7b1aaafc5a0
Application path: C:\projects\MyService\release\MyService.exe
Module path C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report code: 024b8ca0-53a5-11e0-9963-544249093872With 2 more entries in the events with information from Windows Error Reporting:
Contaier error , type 0
Event name: APPCRASH
Reply: No data
CAB Identifier: 0
Problem signature:
P1: MyService.exe
P2: 1.0.0.0
P3: 4d87107f
P4: clr.dll
P5: 4.0.30319.1
P6: 4ba1d9ef
P7: c00000fd
P8: 000ccd3c
P9:
P10:With crash dump files reported to be found in C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_MyServ_c7f32a85ba9f45a9b76ff6beb5fac592fa5396f3_cab_047b1b2c There is no specific point in the service it stops to work as I looked in the service logs dumped to text file. Any function call that follows after about 1 minute of work results in the termination. Service has a timer that fires with specific delays which invokes its functionality. If I comment out managed class library call that uses native code the service termination stops. If I run the same class library with the same service functionality in original 4.0 console project there are no problems either. Is there any 3.5 to 4.0 migration issues or bugs in 4.0 clr related to native code call in windows service applications?
Чесноков
-
I have windows service project created with .NET 3.5 some time ago. It uses managed class library with native code via PInvoke. Recently 4.0 .NET version of that class library was created. I had to change windows service configurstion to 4.0 .NET client also. Wierd problem started to appear after 4.0 version compilation. After about 1 minute of run service is terminated. In the Windows Events Application Error entry is created (event code 1000, task category (100)):
Application name: MyService.exe, version: 1.0.0.0, timestamp: 0x4d87107f
Module name: clr.dll, version: 4.0.30319.1, timestamp 0x4ba1d9ef
Exception code: 0xc00000fd
Error offset: 0x000ccd3c
Process id: 0x1680
Time: 0x01cbe7b1aaafc5a0
Application path: C:\projects\MyService\release\MyService.exe
Module path C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Report code: 024b8ca0-53a5-11e0-9963-544249093872With 2 more entries in the events with information from Windows Error Reporting:
Contaier error , type 0
Event name: APPCRASH
Reply: No data
CAB Identifier: 0
Problem signature:
P1: MyService.exe
P2: 1.0.0.0
P3: 4d87107f
P4: clr.dll
P5: 4.0.30319.1
P6: 4ba1d9ef
P7: c00000fd
P8: 000ccd3c
P9:
P10:With crash dump files reported to be found in C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_MyServ_c7f32a85ba9f45a9b76ff6beb5fac592fa5396f3_cab_047b1b2c There is no specific point in the service it stops to work as I looked in the service logs dumped to text file. Any function call that follows after about 1 minute of work results in the termination. Service has a timer that fires with specific delays which invokes its functionality. If I comment out managed class library call that uses native code the service termination stops. If I run the same class library with the same service functionality in original 4.0 console project there are no problems either. Is there any 3.5 to 4.0 migration issues or bugs in 4.0 clr related to native code call in windows service applications?
Чесноков
I believe there are support cases opened against MS on this, and similar, issues. It may possibly have been fixed in the SP that was rolled out recently, but I cannot say for certain that it has.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
I believe there are support cases opened against MS on this, and similar, issues. It may possibly have been fixed in the SP that was rolled out recently, but I cannot say for certain that it has.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
Do you mean that is 3.5 to 4.0 conversion problem or generic problem for the windows service with 4.0 version?
Чесноков
-
Do you mean that is 3.5 to 4.0 conversion problem or generic problem for the windows service with 4.0 version?
Чесноков
It's a problem with the 4.0 version as far as I can tell (nothing to do with the conversion). A search of the web found a large number of variations on your problem here - not always a windows service, a long running windows forms app has the same problem.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
It's a problem with the 4.0 version as far as I can tell (nothing to do with the conversion). A search of the web found a large number of variations on your problem here - not always a windows service, a long running windows forms app has the same problem.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
Are they going to resolve the problem or are there any updates to 4.0 version or hot fixes? I found just a couple of such reports having program crash once in a week e.g. But here exactly after 1 minute it crashes. That is something to be a pattern
Чесноков
-
Are they going to resolve the problem or are there any updates to 4.0 version or hot fixes? I found just a couple of such reports having program crash once in a week e.g. But here exactly after 1 minute it crashes. That is something to be a pattern
Чесноков
There are hot-fixes rolled up here[^], but there may be problems if you are using C++, so it's worth evaluating in a VM before you install it properly. Details of what's in the compound fix can be found here[^].
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
There are hot-fixes rolled up here[^], but there may be problems if you are using C++, so it's worth evaluating in a VM before you install it properly. Details of what's in the compound fix can be found here[^].
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
In any case they are related to 4.0 only? I've created 4.0 projects from scratch and migrated source code to them. First service run was very promissing about 5 minutes without problems. I stopped it and decided the reason was due to migation. But the next service runs started to behave pretty wierd giving APPCRASH for mscoreei.dll 0xc0000005, and finally the same clr.dll 0xc00000fd without that 1 minute pattern as in 3.5->4.0 version.
Чесноков
-
In any case they are related to 4.0 only? I've created 4.0 projects from scratch and migrated source code to them. First service run was very promissing about 5 minutes without problems. I stopped it and decided the reason was due to migation. But the next service runs started to behave pretty wierd giving APPCRASH for mscoreei.dll 0xc0000005, and finally the same clr.dll 0xc00000fd without that 1 minute pattern as in 3.5->4.0 version.
Чесноков
That's correct. The issue seems to have been introduced with the V4 clr.dll.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
-
That's correct. The issue seems to have been introduced with the V4 clr.dll.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.
Forgive your enemies - it messes with their heads
I started to experiment with timer interval of the service processing functionality setting it to different values 30,10,15,1,0.5,0.1 seconds. At every timer event service performs some work in worker threads. First there are the same clr.dll crashes with large timer intervals after exactly 10 calls to unmanaged class library. Then after I tried smaller ones the crashes disappeared. Occasionally there were few new ones:
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 6B50927D (6B290000) with exit code 80131506.From the .NET runtime source. But now everything seems to work without problems. I wonder the reason of that erratic behaviour, every day new type of crash. Have you tried http://support.microsoft.com/kb/2520479[^] yourself? Were there any problems with SP1 for VS Ultimate version with standalone SDK 7.1 installed?
Чесноков