none
Application crashes after .Net runtime upgrade to .Net4.6 RRS feed

  • Question

  • Recently, our application(32 bit process) will crash after running several hours due to CLR internal error, like below:

    Faulting application name: XXX.exe, version: 7.20.0.1230, time stamp: 0x5682c035

    Faulting module name: clr.dll, version: 4.6.1055.0, time stamp: 0x563c0f73
    Exception code: 0xc0000005
    Fault offset: 0x000ee24f
    Faulting process id: 0x1578
    Faulting application start time: 0x01d1865ba2d6229e
    Faulting application path: XXX.exe
    Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
    Report Id: 8e80ab62-f2a5-11e5-8e49-78e7d1c22b8d

    We think it shall related to .Net4.6 as it works fine in .Net4.5 and before version.
    And we find below GC configuration:

    <runtime>

           <gcServer enabled="true"/>
           <gcConcurrent enabled="false"/>

     </runtime>

    can improve our application stability obviously -- Application can run more than one day, though it still will crash eventually!!! 

    The dump file call stack is like below:     

    > clr.dll!SVR::memcopy(unsigned char *,unsigned char *,unsigned int) Unknown
    clr.dll!SVR::gc_heap::compact_plug(unsigned char *,unsigned int,int,struct SVR::gc_heap::compact_args *) Unknown
    clr.dll!SVR::gc_heap::compact_in_brick(unsigned char *,struct SVR::gc_heap::compact_args *) Unknown
    clr.dll!SVR::gc_heap::compact_in_brick(unsigned char *,struct SVR::gc_heap::compact_args *) Unknown
    clr.dll!SVR::gc_heap::compact_phase(int,unsigned char *,int) Unknown
    clr.dll!SVR::gc_heap::plan_phase(int) Unknown
    clr.dll!SVR::gc_heap::gc1(void) Unknown
    clr.dll!SVR::gc_heap::garbage_collect(int) Unknown
    clr.dll!SVR::gc_heap::gc_thread_function(void) Unknown
    clr.dll!SVR::gc_heap::gc_thread_stub(void *) Unknown
    kernel32.dll!@BaseThreadInitThunk@12() Unknown
    ntdll.dll!___RtlUserThreadStart@8() Unknown
    ntdll.dll!__RtlUserThreadStart@8() Unknown

    Any clue?


    • Edited by Huiping.Wei Wednesday, March 30, 2016 6:45 AM
    Wednesday, March 30, 2016 6:43 AM

Answers

  • The fix for this issue is included in February hotfix rollup (it is the issue 7 - edge case that has your allocation and survival pattern):

    KB3139551 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win7SP1/Win2K8R2RTM/Win2K8R2SP1/VistaSP2 - KB3139551

    KB3139550 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win8.1RTM/Win2K12R2RTM- KB3139550

    KB3139549 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win2K12RTM - KB3139549

    Jan Kotas

    .NET Runtime team
    • Edited by jkotas Thursday, March 31, 2016 4:32 PM
    • Marked as answer by Huiping.Wei Friday, April 8, 2016 5:59 AM
    Thursday, March 31, 2016 4:31 PM

All replies

  • We had a very similar issue over the weekend. Ours is a 64 bit application. We got an Access violation exception.

    From a triage dump i managed to find out the following:

    Exception detail:

    clr!SVR::memcopy+0x15:
    00007ffb`f21a996b 498901          mov     qword ptr [r9],rax ds:aaaaaaaa`aaaaaaaa=????????????????

    Call stack:

    clr!SVR::memcopy+0x15
    clr!WKS::gc_heap::compact_plug+0x144
    clr!WKS::gc_heap::compact_in_brick+0x97
    clr!WKS::gc_heap::compact_phase+0x20b
    clr!WKS::gc_heap::plan_phase+0x126a
    clr!WKS::gc_heap::gc1+0xdc
    clr!WKS::gc_heap::garbage_collect+0x5c1
    clr!WKS::GCHeap::GarbageCollectGeneration+0x2a0
    clr!WKS::gc_heap::allocate_more_space+0x23c5a
    clr!JIT_New+0x5c2
    mscorlib_ni+0x50a0a1
    ....

    Not sure if it helps, but the thread that threw the exception was calling System.SZArrayHelper.GetEnumerator[[System.__Canon, mscorlib]]() at the time of GC.

    Wednesday, March 30, 2016 10:42 AM
  • Seeing this as well for the past few weeks.
    Wednesday, March 30, 2016 11:56 PM
  • Hi Huiping.Wei,

    Firstly, you can try to change the project’s .Net Framework to 4.6 and then rebuild your project. Please double check whether it can work well or not.

    Secondly, I hope that you can provide information about this case as more as possible such as where line code(function) arises this crash. And you could also use tool windbg to debug your application.

    Best Regards,

    Alex


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.

    Thursday, March 31, 2016 8:32 AM
  • The fix for this issue is included in February hotfix rollup (it is the issue 7 - edge case that has your allocation and survival pattern):

    KB3139551 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win7SP1/Win2K8R2RTM/Win2K8R2SP1/VistaSP2 - KB3139551

    KB3139550 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win8.1RTM/Win2K12R2RTM- KB3139550

    KB3139549 Hotfix Rollup HR-1602 - NPD 4.6/4.6.1 RTM - Win2K12RTM - KB3139549

    Jan Kotas

    .NET Runtime team
    • Edited by jkotas Thursday, March 31, 2016 4:32 PM
    • Marked as answer by Huiping.Wei Friday, April 8, 2016 5:59 AM
    Thursday, March 31, 2016 4:31 PM
  • Hi Jan,

    Thanks a lot for your reply.
    However, is there any hot fix for Windows 10 and Windows 7?

    PS: Hot fix in KB3139551 cannot be download, it seems that MS has removed it! 

    BRs,

    Huiping




    • Edited by Huiping.Wei Wednesday, April 6, 2016 2:19 AM
    Tuesday, April 5, 2016 8:40 AM
  • Hi Jan,

    Thanks a lot for your reply.
    However, is there any hot fix for Windows 10 and Windows 7?

    PS: Hot fix in KB3139551 cannot be download, it seems that MS has removed it! 

    BRs,

    Huiping




    @HuiPing,

    I can download that KB. Here is my screen capture.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, April 6, 2016 8:21 AM
  • Hi Kristin,

    Thanks a lot.

    I  still cannot download it in Chengdu, China. But, I have downloaded it eventually via  one remote PC in US.

    And I am testing it on Win7 and will let you know the result.

    Is there any hot fix for Win 10 ?

    BRs,

    Huiping



    Thursday, April 7, 2016 12:45 PM
  • @Huiping

    >>Is there any hot fix for Win 10 ?

    I've searched more but I cannot find any hotfix for win10.

    Since we cannot reproduce your issue on my side, and we don't know your real scenario is. If you make sure this is a bug, I would suggest you try to narrow down your issue, then make a small demo and report this issue to MS Connect, someone from MS will help you support this. Thanks for your understanding.

    >>And I am testing it on Win7 and will let you know the result.

    Waiting for your result, hope it works.

    Best regards,

    Kristin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Friday, April 8, 2016 2:45 AM
  • Hi Kristin,

    Thanks a lot for your reply.

    We have tested it on Win7. It works fine until now. :)

    Regarding the hot fix for Win10, actually I have reported the issue to MS Connect beforehowever, almost get the same reply in this thread. You can refer:

    https://connect.microsoft.com/VisualStudio/feedback/details/2530394/net-4-6-clr-crashes-with-my-32-bit-application-however-the-application-works-fine-in-net4-5-and-net4-0

    One more question about the hot fix, does MS plan will integrate it into the updates of .Net4.6&4.6.1?

    BRs,

    Huiping





    Friday, April 8, 2016 6:08 AM
  • @Jan,

    I have tested it on Win7, the hot fix works fine. How about Win10? Is there any hot fix for it?

    And, does .net team have some plan to integrate these hot fixes?

    It is quite urgency, because our project needs to support Win10 in this year.

    Thanks a lot.

    BRs,

    Huiping

    Thursday, April 21, 2016 1:24 AM
  • Hello.

    Is Issue 7 (allocation and survival pattern) from KB3139551 include to .NET Framework 4.6.2 release ?

    We caught same problem in  clr.dll  4.6.1590.0.

    Faulting application name: XXX.exe, version: 5.8.2243.2, time stamp: 0x5889d744
    Faulting module name: clr.dll, version: 4.6.1590.0, time stamp: 0x5787ef69
    Exception code: 0xc0000005
    Fault offset: 0x000000000000c2d4
    Faulting process id: 0x30a4
    Faulting application start time: 0x01d27a735a7a282b
    Faulting application path: C:\Program Files\XXX\XXX.exe
    Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
    Report Id: 7bbf1463-e6db-11e6-afe1-005056976b10

    Tuesday, January 31, 2017 8:57 AM
  • Hi,

    With .Net 4.5 we experience the same thing. I am not sure what is different on one server which could cause this to happen almost immediately.

    Is a hotfix the only solution? Is there not a minor update or something for this version of .net which resolves what appears to be a common issue? We're using 4.5.2

    Thanks for your help in advance...

    Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
    Faulting module name: clr.dll, version: 4.6.96.0, time stamp: 0x55b96716
    Exception code: 0xc0000005
    Fault offset: 0x00000000000fec69
    Faulting process id: 0xc70
    Faulting application start time: 0x01d28e6a61600a2d
    Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll


    Bob Man

    Friday, February 24, 2017 8:54 AM