DataPortal.Update Issue since upgrading CSLA from v3.0.5 to v3.8.2

DataPortal.Update Issue since upgrading CSLA from v3.0.5 to v3.8.2

Old forum URL: forums.lhotka.net/forums/t/9125.aspx


CommunicatorBaz posted on Thursday, June 24, 2010

Hi there,

We've recently upgraded the CSLA from v3.0.5 to v3.8.2, and we are experiencing a couple of intermittent exceptions on our live servers.  The stack trace seems to point towards something within the CSLA, but we can't seem to figure it out.

We don't get this issue in our Dev or QA systems, and cannot debug the live system.  Anyway, here is the stack trace.  More than welcome for any comments as to the cause of it...

24/06/2010 07:05:01 - Service ID: 100 - <Exception handlingInstanceId="b6062957-598c-4f76-9a87-ea830e77261f">
  <Description>An exception of type 'System.OutOfMemoryException' occurred and was caught.</Description>
  <DateTime>2010-06-24 07:04:53Z</DateTime>
  <ExceptionType>System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
  <Message>Exception of type 'System.OutOfMemoryException' was thrown.</Message>
  <Source>mscorlib</Source>
  <HelpLink />
  <Property name="Data">System.Collections.ListDictionaryInternal</Property>
  <Property name="TargetSite">System.String GetStringForStringBuilder(System.String, Int32, Int32, Int32)</Property>
  <StackTrace>   at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
   at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
   at System.Text.StringBuilder.Append(String value)
   at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Exception.get_StackTrace()
   at Csla.DataPortalException.get_StackTrace()
   at System.Exception.ToString()
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at System.String.Format(String format, Object arg0, Object arg1)
   at Csla.DataPortal.Update(Object obj)
   at Csla.DataPortal.Update[T](T obj)
   at Csla.BusinessBase`1.Save()
   at Communicator.Framework.CCBase`1.Save()
   at Communicator.Dispatching.Service.EmailDispatchPreparer.Prepare()</StackTrace>
</Exception>

Many thanks

Baz

CommunicatorBaz replied on Thursday, June 24, 2010

Here is another exception, that starts within DataPortal.Update...

24/06/2010 07:04:10 - Service ID: 100 - <Exception handlingInstanceId="72d4317f-1ccd-4a71-bb5b-b3b47b3d5a31">
  <Description>An exception of type 'Csla.DataPortalException' occurred and was caught.</Description>
  <DateTime>2010-06-24 07:04:10Z</DateTime>
  <ExceptionType>Csla.DataPortalException, Csla, Version=3.8.2.0, Culture=neutral, PublicKeyToken=93be5fdc093e4c30</ExceptionType>
  <Message>DataPortal.Update failed ()</Message>
  <Source>Csla</Source>
  <HelpLink />
  <Property name="BusinessObject">&lt;undefined value&gt;</Property>
  <Property name="BusinessException">&lt;undefined value&gt;</Property>
  <Property name="Data">System.Collections.ListDictionaryInternal</Property>
  <Property name="TargetSite">System.Object Update(System.Object)</Property>
  <StackTrace>   at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* pLengths, Int32* pLowerBounds)
   at System.Array.CreateInstance(Type elementType, Int32 length)
   at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at Csla.Server.ObjectFactoryAttribute.GetObjectFactoryAttribute(Type objectType)
   at Csla.Server.DataPortal.Update(Object obj, DataPortalContext context)
   at Csla.DataPortal.Update(Object obj)
   at Csla.DataPortal.Update[T](T obj)
   at Csla.BusinessBase`1.Save()
   at Communicator.Framework.CCBase`1.Save()
   at Communicator.Dispatching.Service.EmailDispatchPreparer.Prepare()</StackTrace>
  <additionalInfo>
....
  </additionalInfo>
  <InnerException>
    <ExceptionType>System.OutOfMemoryException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>Exception of type 'System.OutOfMemoryException' was thrown.</Message>
    <Source>mscorlib</Source>
    <HelpLink />
    <Property name="Data">System.Collections.ListDictionaryInternal</Property>
    <Property name="TargetSite">System.Array InternalCreate(Void*, Int32, Int32*, Int32*)</Property>
    <StackTrace>   at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32* pLengths, Int32* pLowerBounds)
   at System.Array.CreateInstance(Type elementType, Int32 length)
   at System.Reflection.CustomAttribute.GetCustomAttributes(Module decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   at Csla.Server.ObjectFactoryAttribute.GetObjectFactoryAttribute(Type objectType)
   at Csla.Server.DataPortal.Update(Object obj, DataPortalContext context)</StackTrace>
  </InnerException>
</Exception>

RockfordLhotka replied on Thursday, June 24, 2010

It is difficult to say what is going on here. It looks like .NET is failing to initialize an array within its own code in the second case, and failing to allocate a string in the Exception.GetStackTrace() method in your first example.

Both seem to be failures to allocate memory.

Looking carefully at the info you provided, both appear to occur in .NET itself - in the reflection subsystem and the exception subsystem. And both are failing to initialize common .NET types (array and string).

So I suspect one of the following:

  1. bad memory on the machine
  2. bad or corrupt .NET install

 

Copyright (c) Marimer LLC