查错高手帮忙:.net 2.0 在垃圾回收时会报Access violation 的错.
环境:win2003+sp2 .net 2.0(已经打了2个kb)
在写的个服务程序中,动态加载了一些com,
动态调用com执行正常.
但是过了一会在垃圾回收的时候会报Access violation错误.
猜测是调用的COM的问题,但是是那一类的问题就不知道了,偶对C++不熟悉 :(
以下是windbg分析的些信息:
(c40.da8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000102 ebx=00000000 ecx=7c821d43 edx=7c9585ec esi=000007b4 edi=7c821c7b
eip=0a9b2d3c esp=0d6bffb0 ebp=0d6bffec iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246
0a9b2d3c ?? ???
0:018> !gle
LastErrorValue: (Win32) 0x3e5 (997) - I/O
LastStatusValue: (NTSTATUS) 0x103 - <Unable to get error code text>
0:014> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
***** OS symbols are WRONG. Please fix symbols to do analysis.
***** OS symbols are WRONG. Please fix symbols to do analysis.
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: ntdll!_PEB ***
*** ***
*************************************************************************
*** ERROR: Symbol file could not be found. Defaulted to export symbols for advapi32.dll -
*** WARNING: Unable to verify checksum for System.ServiceProcess.ni.dll
*** ERROR: Module load completed but symbols could not be loaded for System.ServiceProcess.ni.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ole32.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for rpcrt4.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for comsvcs.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for msjet40.dll -
FAULTING_IP:
+aa02d3c
0aa02d3c ?? ???
EXCEPTION_RECORD: ffffffff -- (.exr ffffffffffffffff)
ExceptionAddress: 0aa02d3c
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 0aa02d3c
Attempt to read from address 0aa02d3c
PROCESS_NAME: FLSService.exe
FAULTING_MODULE: 7c930000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP: 4333e7ec
ERROR_CODE: (NTSTATUS) 0xc0000005 - "0x%08lx"
READ_ADDRESS: 0aa02d3c
BUGCHECK_STR: ACCESS_VIOLATION
MANAGED_STACK: !dumpstack -EE
OS Thread Id: 0x748 (14)
Current frame:
ChildEBP RetAddr Caller,Callee
LAST_CONTROL_TRANSFER: from 00000000 to 0aa02d3c
FAILED_INSTRUCTION_ADDRESS:
+aa02d3c
0aa02d3c ?? ???
SYMBOL_ON_RAW_STACK: 1
STACK_ADDR_RAW_STACK_SYMBOL: 17002000010004
STACK_COMMAND: dds 0D61EC80-0x20 ; kb
STACK_TEXT:
0d61ec60 00000000
0d61ec64 0d61ec78
0d61ec68 7c821c8d kernel32!WaitForSingleObject+0x12
0d61ec6c 0000040c
0d61ec70 00004e20
0d61ec74 00000000
0d61ec78 0d61eca8
0d61ec7c 7a0066fe mscorwks!GetCompileInfo+0x4078f
0d61ec80 0000040c
0d61ec84 00004e20
0d61ec88 702018a8
0d61ec8c 00000000
0d61ec90 00000001
0d61ec94 7c822311 kernel32!SetEvent
0d61ec98 00000000
0d61ec9c 0d61ed40
0d61eca0 7a2fd1a0 mscorwks!NGenCreateNGenWorker+0xa2aa5
0d61eca4 00000000
0d61eca8 0d61ed4c
0d61ecac 7a006db1 mscorwks!GetCompileInfo+0x40e42
0d61ecb0 0000040c
0d61ecb4 00004e20
0d61ecb8 7020194c
0d61ecbc 00d79a84
0d61ecc0 00000000
0d61ecc4 00d70000
0d61ecc8 00000044
0d61eccc 00000000
0d61ecd0 00000000
0d61ecd4 00000000
0d61ecd8 00000000
0d61ecdc 00000000
FAULTING_THREAD: 00000748
FOLLOWUP_IP:
mscorwks!GetCompileInfo+4078f
7a0066fe 8bf0 mov esi,eax
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: mscorwks
IMAGE_NAME: mscorwks.dll
SYMBOL_NAME: mscorwks!GetCompileInfo+4078f
DEFAULT_BUCKET_ID: WRONG_SYMBOLS
BUCKET_ID: WRONG_SYMBOLS
Followup: MachineOwner
=================================================
如果解决了另开贴给分.
切望高手帮忙!!