0

My application is c# windows service running on Windows Server 2008 R2. It crashes every now and then with the following error

Faulting application name: Fusion_Ingestion_Service.exe, version: 1.1.0.3, time stamp: 0x59428da5 Faulting module name: clr.dll, version: 4.0.30319.34209, time stamp: 0x5348961e Exception code: 0xc0000409 Fault offset: 0x0000e233 Faulting process id: 0x49ac Faulting application start time: 0x01d30c3353dbd043 Faulting application path: Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll Report Id: 8bbc1f2b-7844-11e7-b6c9-00155d018b91

I have tried the following

  1. Installed .NET framework 4.6 and changed my application to 4.6 but still crashes. I thought it would use the 4.6 version of clr.dll but it still uses 4.0.3019.
  2. Changed my application to x86 but still crashes

Any ideas as to how to find what the problem is

user2837961
  • 1,505
  • 3
  • 27
  • 67
  • Show us your project references – Dennis Larisch Aug 10 '17 at 09:57
  • @DennisLarisch just added references picture – user2837961 Aug 10 '17 at 10:05
  • I think the refrences are not really your problem, there was definietly a bug in the Framework 4.0 which got a hotfix, but I cant find the download link for it – Dennis Larisch Aug 10 '17 at 10:07
  • @DennisLarisch when I upgrade to version 4.6, why is the clr.dll used still 4.0.3019? – user2837961 Aug 10 '17 at 10:09
  • Where do you see the .net version of the clr.dll? So I can check which version is mine – Dennis Larisch Aug 10 '17 at 10:10
  • Just added a download link for this hotfix in my answer – Dennis Larisch Aug 10 '17 at 10:12
  • @DennisLarisch Thanks for the fix. Is this fix for .net version 4.5 or 4.6 or it does not matter? – user2837961 Aug 10 '17 at 10:13
  • It is for Framework 4 in general I think https://support.microsoft.com/de-de/help/2640103 – Dennis Larisch Aug 10 '17 at 10:14
  • @DennisLarisch. This fix cannot be applied to my windows server 2008. I get an error 'KB2640103 does not apply, or is blocked by another condition on your compute' – user2837961 Aug 10 '17 at 10:17
  • Do you use 64 or 32 bit? – Dennis Larisch Aug 10 '17 at 10:17
  • @DennisLarisch 64 Bit – user2837961 Aug 10 '17 at 10:19
  • hmm this hotfix seems to be for 32bit only... – Dennis Larisch Aug 10 '17 at 10:20
  • after installing .net 4.5 and 4.6 did your rebuild your application and restarted the server? – Dennis Larisch Aug 10 '17 at 10:20
  • Yes I did but still crashes – user2837961 Aug 10 '17 at 10:47
  • 1
    It is a very, very nasty mishap, about the worst thing that can happen to a program. Corruption of a stack frame is the underlying cause, excessively difficult to diagnose. The CLR takes the blame, but it merely detected the damage, it didn't cause it. The check was added as a counter-measure against malware, stack corruption is the traditional way to get data turned into malicious code. For all we know it is doing what it is supposed to do, protecting your server against an attack. Only a full minidump of the crashed process gives you a shot at finding the cause. – Hans Passant Aug 10 '17 at 10:58
  • @HansPassant When you say "Corruption of a stack frame is the underlying cause", could it be that the code causes it? Also every time the service is started, the stack frame is all fine and my code corrupts? – user2837961 Aug 10 '17 at 11:08
  • I am not going to send you off on a wild goose-chase that is unlikely to produce results. I strongly recommend you buy the help that you need, this requires black-belt skills. Consider calling Microsoft Support for example. – Hans Passant Aug 10 '17 at 11:15

1 Answers1

0

The given exception code indicates a stack buffer overflow during runtime. Unfortunately without any source code or more details on the crash I cannot help you debug the issue here.

For general debugging tips for issues of this kind, see this answer (ignore the stack if you can't capture one yourself): https://stackoverflow.com/a/14206133/3966590

See the following MSDN answer and related resources on how to debug the issue: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/aa84a49e-6bfe-4b89-928a-ea477e73c07e/clr-exception-0xc0000409?forum=clr