我们在DLL中使用XercesDOMParser。我们的DLL在IIS 7应用程序池上运行,并且在IIS7工作进程启动时遇到崩溃。崩溃是随机发生的。
来自崩溃转储的堆栈跟踪如下(来自WinDebug):
0000000`017ad970 00000000`120810bb xerces_c_3_1!xercesc_3_1::XMLScanner::commonInit+0x1e
00000000`017ad9c0 00000000`1205b3c4 xerces_c_3_1!xercesc_3_1::XMLScanner::XMLScanner+0x413
00000000`017ada40 00000000`12086969 xerces_c_3_1!xercesc_3_1::IGXMLScanner::IGXMLScanner+0x20
00000000`017adab0 00000000`1209b0e4 xerces_c_3_1!xercesc_3_1::XMLScannerResolver::getDefaultScanner+0x4d
00000000`017adb00 00000000`1209ada8 xerces_c_3_1!xercesc_3_1::AbstractDOMParser::initialize+0x74
00000000`017adb50 00000000`120aa392 xerces_c_3_1!xercesc_3_1::AbstractDOMParser::AbstractDOMParser+0x100
00000000`017adbc0 00000000`01635cf0 xerces_c_3_1!xercesc_3_1::XercesDOMParser::XercesDOMParser+0xe
00000000`017adbf0 00000000`0163686f EmbeddedConfigurationClient!GACreateConfigurationClient+0x4bbf
//...为什么我们在进程启动时会遇到这种崩溃?有没有解决这个问题的线索?在调用XMLPlatformUtils::Initialize()之后,我们从构造函数实例化XercesDOMParser
我有以下信息。同样来自崩溃转储:
FAILURE_BUCKET_ID: NULL_POINTER_READ_c0000005_xerces-c_3_1.dll!xercesc_3_1::XMLScanner::commonInit
AULTING_IP:
xerces_c_3_1!xercesc_3_1::XMLScanner::commonInit+1e
00000000`12082d6a 488b0b mov rcx,qword ptr [rbx]
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000012082d6a (xerces_c_3_1!xercesc_3_1::XMLScanner::commonInit+0x000000000000001e)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000000
Attempt to read from address 0000000000000000
PROCESS_NAME: w3wp.exeADDITIONAL_DEBUG_TEXT:
Use '!findthebuild' command to search for the target build information.
If the build information is available, run '!findthebuild -s ; .reload' to set symbol path and load symbols.
FAULTING_MODULE: 0000000077bb0000 ntdll
DEBUG_FLR_IMAGE_TIMESTAMP: 4bd18e21
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: 0000000000000000
READ_ADDRESS: 0000000000000000 我有Xerces C++代码,但不知道是哪行代码导致了这个问题。任何帮助解决这个问题的人都会非常感谢。
你好啊,乔治
发布于 2014-12-11 17:51:44
只是为了以防万一它能帮助某人..根本原因是多个线程同时访问Xerces代码。我们已经更新了代码(一段时间后),这个问题已经解决了。
你好啊,乔治
https://stackoverflow.com/questions/26357636
复制相似问题