我使用visual studio 2010在Windows 2008服务器计算机上构建我的32位应用程序文件。这个32位应用程序将使用 IBM wepshere MQ Client(7.5.0.3)。
在调试模式下运行时我遇到异常所以我使用WinDbg软件调试
转储信息
*******************************************************************************
* *
* Exception Analysis *
* *
*******************************************************************************
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files (x86)\IBM\WebSphere MQ\bin\mqe.dll -
FAULTING_IP:
ntdll32!RtlpCreateSplitBlock+47b
77d23fcb 8b11 mov edx,dword ptr [ecx]
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000077d23fcb (ntdll32!RtlpCreateSplitBlock+0x000000000000047b)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 000000003b9ac9ff
Attempt to read from address 000000003b9ac9ff
CONTEXT: 0000000000000000 -- (.cxr 0x0;r)
eax=0adaff08 ebx=02960000 ecx=3b9ac9ff edx=00100000 esi=0ae2bf90 edi=02960174
eip=77d23fcb esp=079bd490 ebp=079bd4b4 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010246
ntdll32!RtlpCreateSplitBlock+0x47b:
77d23fcb 8b11 mov edx,dword ptr [ecx] ds:002b:3b9ac9ff=????????
FAULTING_THREAD: 000000000000046c
PROCESS_NAME: MessageBroker.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
EXCEPTION_PARAMETER1: 0000000000000000
EXCEPTION_PARAMETER2: 000000003b9ac9ff
READ_ADDRESS: 000000003b9ac9ff
FOLLOWUP_IP:
ntdll32!RtlpCreateSplitBlock+47b
77d23fcb 8b11 mov edx,dword ptr [ecx]
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
APP: messagebroker.exe
ANALYSIS_VERSION: 6.3.9600.17298 (debuggers(dbg).141024-1500) amd64fre
**BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_READ_ZEROED_STACK**
PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ
DEFAULT_BUCKET_ID: INVALID_POINTER_READ
LAST_CONTROL_TRANSFER: from 0000000077d23c5a to 0000000077d23fcb
**STACK_TEXT:**
079bd4b4 77d23c5a 0ae2bf90 0adaff08 02960150 ntdll32!RtlpCreateSplitBlock+0x47b
079bd5a0 77d23cfe 00000840 00000848 0ae2b74a ntdll32!RtlpAllocateHeap+0xb5d
079bd624 74e04d83 02960000 00000000 00000840 ntdll32!RtlAllocateHeap+0x23a
079bd644 008a8894 00000840 00000002 079bd800 MSVCR80!malloc+0x7a
**WARNING: Stack unwind information not available. Following frames may be wrong.
00000000 00000000 00000000 00000000 00000000 mqe+0x68894**
STACK_COMMAND: .cxr 0x0 ; kb
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: ntdll32!RtlpCreateSplitBlock+47b
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: ntdll32
IMAGE_NAME: ntdll32.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 51fb1072
FAILURE_BUCKET_ID: INVALID_POINTER_READ_c0000005_ntdll32.dll!RtlpCreateSplitBlock
**BUCKET_ID: X64_APPLICATION_FAULT_INVALID_POINTER_READ_ZEROED_STACK_ntdll32!RtlpCreateSplitBlock+47b**
ANALYSIS_SOURCE: UM
FAILURE_ID_HASH_STRING: um:invalid_pointer_read_c0000005_ntdll32.dll!rtlpcreatesplitblock
FAILURE_ID_HASH: {c09c2d45-666c-6fbd-b6fd-d9b79ba8c4fa}
上面转储显示Mqe.dll(IBM WebSphere MQ dll)正在传递无效指针
基于上述转储我无法找到问题。堆栈调用非常小,所以我无法找到我的应用程序调用MQ应用程序(Mqe.ddl)的位置。
请建议我如何找到问题以及如何调试Mqe.dll。
答案 0 :(得分:4)
MQE.dll很可能是一个无辜的旁观者。它肯定是通过malloc
分配内存,然后崩溃发生在内存管理器内部。这通常是过去某个时刻发生的内存损坏的结果。缓冲区溢出,下溢或释放后使用是堆损坏的典型原因。
帮助追踪问题的选项:
!heap -v
对minidump执行堆分析。PageHeap
重新运行应用程序,以便在发生时立即捕获溢出。