none
EventType clr20r3 system.nullreferenceexception when windows services moved from W2K SP4 to Windows Server 2003R2 SP2 RRS feed

  • Question

  • We had a number of VS2005 C# (2.0 framework) and unmanaged C++ Windows services running on a W2K SP4 server, which cratered.

     

    We had none of these issues with the services running on that server.  We also have 34 instances of our services running on a Windows Server 2003 SP2 (not R2) server and do not have any of the issues described in this post.

     

    The services were moved to a Windows Server 2003R2 SP2 box and is having a number of strange issues that I am unable to piece together.

     

    The primary item we are seeing is that we cannot seem to start more than 20 - 21 of our services.  If a 20th or 21st service is started, the 20th or 21st service will fail to start - error1053.

    What I want to make clear is that it is not one service that is having the issue.  It does not make a difference whether or not the 20th service is C# or unmanaged C++.

     

    However, there isn't an issue started the "windows" services.

     

    For the sake of argument, let's say there are 21 of our services running, with a mix of C# and unmanaged code.  If the 22nd service that is started is a C#

    service a Dr. Watson error will be generated, but if the 22nd service is a unmanaged service, it will not trigegr Dr. Watson, but only reports a 1053 error.

     

    here's one C# service:

    eax=0012ec78 ebx=00000000 ecx=00000000 edx=00000007 esi=0012ed40 edi=00000000

    eip=77e4bef7 esp=0012ec74 ebp=0012ecc8 iopl=0         nv up ei pl nz na pe nc

    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202

     

    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\KERNEL32.dll -

    function: KERNEL32!RaiseException

            77e4bed1 8b7514           mov     esi,[ebp+0x14]

            77e4bed4 83e001           and     eax,0x1

            77e4bed7 85f6             test    esi,esi

            77e4bed9 8945b4           mov     [ebp-0x4c],eax

            77e4bedc c745bcbbbee477   mov     dword ptr [ebp-0x44],0x77e4bebb

            77e4bee3 0f857c010000     jne KERNEL32!GetSystemDefaultLangID+0xd0 (77e4c065)

            77e4bee9 8365c000         and     dword ptr [ebp-0x40],0x0

            77e4beed 8d45b0           lea     eax,[ebp-0x50]

            77e4bef0 50               push    eax

            77e4bef1 ff156015e477     call    dword ptr [KERNEL32+0x1560 (77e41560)]

    FAULT ->77e4bef7 5e               pop     esi

            77e4bef8 c9               leave

            77e4bef9 c21000           ret     0x10

            77e4befc 3d090100c0       cmp     eax,0xc0000109

            77e4bf01 0f8495000000     je   KERNEL32!GetSystemDefaultLangID+0x7 (77e4bf9c)

            77e4bf07 50               push    eax

            77e4bf08 e99df2ffff       jmp     KERNEL32!QueryDosDeviceW+0x79a (77e4b1aa)

            77e4bf0d 90               nop

            77e4bf0e 90               nop

            77e4bf0f 90               nop

            77e4bf10 90               nop

     

    *----> Stack Back Trace <----*

    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\mscoree.dll -

    ChildEBP RetAddr  Args to Child             

    WARNING: Stack unwind information not available. Following frames may be wrong.

    0012ecc8 79010ca9 c06d007e 00000000 00000001 KERNEL32!RaiseException+0x3c

    0012ed30 7900b4fe 00000000 0012ecec 7c8285fc mscoree!GetMetaDataInternalInterface+0x81ce

    0012ed78 79009794 00144b98 0012ed8c 0012fb18 mscoree!GetMetaDataInternalInterface+0x2a23

    0012ed90 79009804 00144b98 0012edd8 0012edd4 mscoree!GetMetaDataInternalInterface+0xcb9

    0012ede0 7900a7bf 2ef98b29 0012fb18 000001fe mscoree!GetMetaDataInternalInterface+0xd29

    0012f434 00000000 00144b48 00000021 0063002e mscoree!GetMetaDataInternalInterface+0x1ce4

     

    here's a different C# service:

    eax=0012ec78 ebx=00000000 ecx=00000000 edx=00000007 esi=0012ed40 edi=00000000

    eip=77e4bef7 esp=0012ec74 ebp=0012ecc8 iopl=0         nv up ei pl nz na pe nc

    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202

     

    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\KERNEL32.dll -

    function: KERNEL32!RaiseException

            77e4bed1 8b7514           mov     esi,[ebp+0x14]

            77e4bed4 83e001           and     eax,0x1

            77e4bed7 85f6             test    esi,esi

            77e4bed9 8945b4           mov     [ebp-0x4c],eax

            77e4bedc c745bcbbbee477   mov     dword ptr [ebp-0x44],0x77e4bebb

            77e4bee3 0f857c010000     jne KERNEL32!GetSystemDefaultLangID+0xd0 (77e4c065)

            77e4bee9 8365c000         and     dword ptr [ebp-0x40],0x0

            77e4beed 8d45b0           lea     eax,[ebp-0x50]

            77e4bef0 50               push    eax

            77e4bef1 ff156015e477     call    dword ptr [KERNEL32+0x1560 (77e41560)]

    FAULT ->77e4bef7 5e               pop     esi

            77e4bef8 c9               leave

            77e4bef9 c21000           ret     0x10

            77e4befc 3d090100c0       cmp     eax,0xc0000109

            77e4bf01 0f8495000000     je   KERNEL32!GetSystemDefaultLangID+0x7 (77e4bf9c)

            77e4bf07 50               push    eax

            77e4bf08 e99df2ffff       jmp     KERNEL32!QueryDosDeviceW+0x79a (77e4b1aa)

            77e4bf0d 90               nop

            77e4bf0e 90               nop

            77e4bf0f 90               nop

            77e4bf10 90               nop

     

    *----> Stack Back Trace <----*

    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\mscoree.dll -

    ChildEBP RetAddr  Args to Child             

    WARNING: Stack unwind information not available. Following frames may be wrong.

    0012ecc8 79010ca9 c06d007e 00000000 00000001 KERNEL32!RaiseException+0x3c

    0012ed30 7900b4fe 00000000 0012ecec 7c8285fc mscoree!GetMetaDataInternalInterface+0x81ce

    0012ed78 79009794 00143f78 0012ed8c 0012fb18 mscoree!GetMetaDataInternalInterface+0x2a23

    0012ed90 79009804 00143f78 0012edd8 0012edd4 mscoree!GetMetaDataInternalInterface+0xcb9

    0012ede0 7900a7bf 58792a5b 0012fb18 000001fe mscoree!GetMetaDataInternalInterface+0xd29

    0012f434 00000000 00143f30 0000001f 0063002e mscoree!GetMetaDataInternalInterface+0x1ce4

     

    Also:

     

    Some of the errors I am seeing in the event viewer application log are:

     

    A service (ours) specific event log.  This does not happen on other servers - same code:

    Exception in ServiceMain method

    Source = MyWindowsCSharpService

    Message = Object reference not set to an instance of an object.

    StackTrace =    at MyWindowsCSharpService.ThreadProcess(Object thisFI)

       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)

       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

     

     

    Application event log:

    NET Runtime Optimization Service (clr_optimization_v2.0.50727_32) - Failed to compile:

    PresentationUI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 . Error code = 0x80070002

     

    Friday, March 11, 2011 8:51 PM

All replies