Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Windows service stable APPCRASH in clr.dll after 3.5 to 4.0 .NET platform change

Windows service stable APPCRASH in clr.dll after 3.5 to 4.0 .NET platform change

Scheduled Pinned Locked Moved C#
helpannouncementcsharpc++dotnet
9 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chesnokov Yuriy
    wrote on last edited by
    #1

    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-544249093872

    With 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?

    Чесноков

    P 1 Reply Last reply
    0
    • C Chesnokov Yuriy

      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-544249093872

      With 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?

      Чесноков

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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

      My blog | My articles | MoXAML PowerToys | Onyx

      C 1 Reply Last reply
      0
      • P Pete OHanlon

        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

        My blog | My articles | MoXAML PowerToys | Onyx

        C Offline
        C Offline
        Chesnokov Yuriy
        wrote on last edited by
        #3

        Do you mean that is 3.5 to 4.0 conversion problem or generic problem for the windows service with 4.0 version?

        Чесноков

        P 1 Reply Last reply
        0
        • C Chesnokov Yuriy

          Do you mean that is 3.5 to 4.0 conversion problem or generic problem for the windows service with 4.0 version?

          Чесноков

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          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

          My blog | My articles | MoXAML PowerToys | Onyx

          C 1 Reply Last reply
          0
          • P Pete OHanlon

            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

            My blog | My articles | MoXAML PowerToys | Onyx

            C Offline
            C Offline
            Chesnokov Yuriy
            wrote on last edited by
            #5

            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

            Чесноков

            P 1 Reply Last reply
            0
            • C Chesnokov Yuriy

              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

              Чесноков

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              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

              My blog | My articles | MoXAML PowerToys | Onyx

              C 1 Reply Last reply
              0
              • P Pete OHanlon

                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

                My blog | My articles | MoXAML PowerToys | Onyx

                C Offline
                C Offline
                Chesnokov Yuriy
                wrote on last edited by
                #7

                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.

                Чесноков

                P 1 Reply Last reply
                0
                • C Chesnokov Yuriy

                  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.

                  Чесноков

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  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

                  My blog | My articles | MoXAML PowerToys | Onyx

                  C 1 Reply Last reply
                  0
                  • P Pete OHanlon

                    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

                    My blog | My articles | MoXAML PowerToys | Onyx

                    C Offline
                    C Offline
                    Chesnokov Yuriy
                    wrote on last edited by
                    #9

                    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?

                    Чесноков

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups