【问题标题】:OutOfMemoryException - is this a false alarmOutOfMemoryException - 这是一个误报吗
【发布时间】:2014-08-12 18:18:59
【问题描述】:

我的转储文件包含 OutOfMemoryException,但所有对象字段似乎都为空。只是虚惊一场还是有什么办法知道这个异常?

0:052> !do 000000027fff10e8 
The version of SOS does not match the version of CLR you are debugging.  Please
load the matching version of SOS for the version of CLR you are debugging.
CLR Version: 4.0.30319.18449
SOS Version: 4.0.30319.34011
Name:        System.OutOfMemoryException
MethodTable: 000007fcb5476920
EEClass:     000007fcb4f3cd88
Size:        160(0xa0) bytes
File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
000007fcb5476508  4000002        8        System.String  0 instance 0000000000000000 _className
000007fcb547e880  4000003       10 ...ection.MethodBase  0 instance 0000000000000000 _exceptionMethod
000007fcb5476508  4000004       18        System.String  0 instance 0000000000000000 _exceptionMethodString
000007fcb5476508  4000005       20        System.String  0 instance 0000000000000000 _message
000007fcb547e238  4000006       28 ...tions.IDictionary  0 instance 0000000000000000 _data
000007fcb5476738  4000007       30     System.Exception  0 instance 0000000000000000 _innerException
000007fcb5476508  4000008       38        System.String  0 instance 0000000000000000 _helpURL
000007fcb5476ae8  4000009       40        System.Object  0 instance 0000000000000000 _stackTrace
000007fcb5476ae8  400000a       48        System.Object  0 instance 0000000000000000 _watsonBuckets
000007fcb5476508  400000b       50        System.String  0 instance 0000000000000000 _stackTraceString
000007fcb5476508  400000c       58        System.String  0 instance 0000000000000000 _remoteStackTraceString
000007fcb54792b8  400000d       88         System.Int32  1 instance                0 _remoteStackIndex
000007fcb5476ae8  400000e       60        System.Object  0 instance 0000000000000000 _dynamicMethods
000007fcb54792b8  400000f       8c         System.Int32  1 instance      -2147024882 _HResult
000007fcb5476508  4000010       68        System.String  0 instance 0000000000000000 _source
000007fcb547a338  4000011       78        System.IntPtr  1 instance                0 _xptrs
000007fcb54792b8  4000012       90         System.Int32  1 instance       -532462766 _xcode
000007fcb542cdd8  4000013       80       System.UIntPtr  1 instance                0 _ipForWatsonBuckets
000007fcb5499eb8  4000014       70 ...ializationManager  0 instance 0000000000000000 _safeSerializationManager
000007fcb5476ae8  4000001        0        System.Object  0   shared           static s_EDILock
                                 >> Domain:Value  0000000002b83fd0:NotInit  <<

【问题讨论】:

  • 通常 OutOfMemoryException 是由无限循环、内存泄漏或类似情况引起的附带影响,但我不确定是否是这种情况。你能提供更具体的细节吗?代码在哪里?
  • 代码库非常庞大,数百万行。另外,我没有看到任何内存使用率升高的迹象。这就是让我认为这是一场虚惊的原因

标签: exception out-of-memory windbg sos


【解决方案1】:

框架启动时会预先分配一个 OutOfMemoryException 对象。此对象的存在并不表示存在问题。我认为这就是您所看到的。

【讨论】:

猜你喜欢
  • 2012-09-18
  • 2012-03-25
  • 2010-12-22
  • 1970-01-01
  • 2023-03-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多