Microsoft KB Archive/821988

= Repeated errors from the Ole DB Provider for DB2 eventually cause a .NET System exception or a Win32 access violation (C0000005) =

Article ID: 821988

Article Last Modified on 9/18/2006

-

APPLIES TO


 * Microsoft Host Integration Server 2000 Standard Edition
 * Microsoft Host Integration Server 2000 Service Pack 1

-





SYMPTOMS
When you use the Ole DB Provider for DB2 (DB2OLEDB) from a .NET Framework application that is using the Managed Provider for Ole DB, a System exception is thrown after repeated errors are returned from the DB2OLEDB Provider.

Depending on the type of .NET application, this exception may be one of the following and typically occurs after 40 to 50 errors have been generated:
 * System.ExcecutionEngineException
 * System.StackOverflowException
 * another type of System exception



CAUSE
The DB2OLEDB provider is incorrectly returning a pointer to an existing error string, instead of allocating a new error string in its implementation of the Ole DB GetErrorDescription function.

After a certain number of errors, the original string is freed from memory. As a result, when the Managed Provider for Ole DB tries to free the error string that is returned by DB2OLEDB, an access violation occurs because the string has already been freed.



Service pack information
To resolve this problem, obtain the latest service pack for Microsoft Host Integration Server 2000. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

328152 How to obtain the latest service pack for Host Integration Server 2000

Hotfix information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version      Size    File name 28-May-2003 23:10  5.0.0.914   311,568  Crtpkg.dll 28-May-2003 23:10  5.0.0.914    65,808  Crtpkg.exe 28-May-2003 23:10  5.0.0.914   688,400  Db2oledb.dll 28-May-2003 23:10  5.0.0.914    82,192  Ddmserv.exe 28-May-2003 23:10  5.0.0.914    78,096  Mseidb2c.dll 28-May-2003 23:10  5.0.0.914   885,008  Mseidb2d.dll 28-May-2003 23:10  5.0.0.914    24,848  Mseidpm.dll 28-May-2003 23:10  5.0.0.914   266,512  Mseidrda.dll 28-May-2003 23:10  5.0.0.914   147,728  Mseidt.dll

NOTE: Because of file dependencies, the most recent fix that contains the preceding files may also contain additional files.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

This problem was corrected in Microsoft Host Integration Server 2000 Service Pack 2.



MORE INFORMATION
When attached to the failing application using a debugger such as WinDBG, the access violation that occurs will have a stack similar to the following: 00 0012e400 1f8a1a42 05aa1e84 00000000 06808fc8 oleaut32!SysFreeString+0x46 (FPO: [1,0,1]) 01 0012e414 1f8b882a 06808fc8 06808fc8 0012e4a0 oledb32!CImpIErrorInfo::ClearCachedMessages+0x1a (FPO: [0,0,3]) (CONV: thiscall) [d:\mdac27sp1qfe\oledb\core\src\msdaer\errinfo.cpp @ 655] 02 0012e424 1f8b8882 06800fd0 1f8b896f 00000001 oledb32!CImpIErrorInfo::~CImpIErrorInfo+0x12 (FPO: [Non-Fpo]) (CONV: thiscall) [d:\mdac27sp1qfe\oledb\core\src\msdaer\errinfo.cpp @ 75] 03 0012e42c 1f8b896f 00000001 06800fd0 06427fb0 oledb32!CImpIErrorInfo::`scalar deleting destructor'+0x8 (FPO: [1,0,1]) (CONV: thiscall) 04 0012e4a0 1f8b8993 06800fd0 1f8b8711 00000001 oledb32!CError::~CError+0xd5 (FPO: [Non-Fpo]) (CONV: thiscall) [d:\mdac27sp1qfe\oledb\core\src\msdaer\ererror.cpp @ 144] 05 0012e4a8 1f8b8711 00000001 06806ff0 06806ff0 oledb32!CError::`scalar deleting destructor'+0x8 (FPO: [1,0,1]) (CONV: thiscall) 06 0012e4b8 1f8b8447 06800fd0 017afe58 792107dc oledb32!CError::Release+0x23 (FPO: [1,0,2]) (CONV: stdcall) [d:\mdac27sp1qfe\oledb\core\src\msdaer\ererror.cpp @ 277] 07 0012e4c4 792107dc 06806ff0 00000001 05c4cfa4 oledb32!CImpIErrorRecords::Release+0x18 (FPO: [1,0,1]) (CONV: stdcall) [d:\mdac27sp1qfe\oledb\core\src\msdaer\error.h @ 226] 08 0012e4f4 7921077b 00000000 05c4cf80 05c4cf80 mscorwks!SafeRelease+0x56 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\interoputil.cpp @ 550] 09 0012e504 79210701 06f02c34 0012e538 79210942 mscorwks!ComPlusWrapper::ReleaseAllInterfaces+0x22 (FPO: [0,0,2]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.cpp @ 2518] 0a 0012e510 79210942 05c4cf80 06f02ff4 79210f7e mscorwks!ComPlusWrapper::ReleaseAllInterfacesCallBack+0x56 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\compluswrapper.cpp @ 2501] 0b 0012e51c 79210f7e 00000000 06f02bf0 03e4b680 mscorwks!ComPlusWrapper::Cleanup+0x16 (FPO: [0,0,1]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.cpp @ 2053] 0c 0012e52c 792116c7 06f02bf0 0012e548 792116b7 mscorwks!ComPlusContextCleanupGroup::CleanUpWrappers+0x19 (FPO: [0,0,3]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.h @ 672] 0d 0012e538 792116b7 06f02bf0 06edafe0 0012e56c mscorwks!ComPlusApartmentCleanupGroup::ReleaseCleanupGroup+0xe (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\compluswrapper.cpp @ 1877] 0e 0012e548 7921163e 06f02bf0 03e4b680 0012e9d8 mscorwks!ComPlusApartmentCleanupGroup::ReleaseCleanupGroupCallback+0x51 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\compluswrapper.cpp @ 1840] 0f 0012e56c 7921b691 00000000 0012e588 7921b67a mscorwks!ComPlusApartmentCleanupGroup::CleanUpWrappers+0xa8 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.cpp @ 1784] 10 0012e578 7921b67a 06edafe0 0736cfb8 0012e5a0 mscorwks!ComPlusApartmentCleanupGroup::CleanUpWrappersCallback+0xd (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\compluswrapper.cpp @ 1804] 11 0012e588 771d514e 01cefec0 0012e5a4 0012e5cc mscorwks!CtxEntry::EnterContextCallback+0x40 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\comcache.cpp @ 732] 12 0012e5a0 78054190 05286ff8 0736cfb8 02020202 ole32!CRemoteUnknown::DoCallback+0x5d (FPO: [Non-Fpo]) 13 0012e5bc 780773cb 771d5130 0012e5d0 00000002 rpcrt4!Invoke+0x30 [D:\nt\com\rpc\ndr20\i386\stubless.asm @ 88] 14 0012e9a0 780728bf 052a2fe0 0528cda8 0738ef7c rpcrt4!NdrStubCall2+0x1fb (FPO: [Non-Fpo]) (CONV: stdcall) [d:\nt\com\rpc\ndr20\srvcall.cxx @ 1380] 15 0012e9f8 772b5c12 052a2fe0 0738ef7c 0528cda8 rpcrt4!CStdStubBuffer_Invoke+0x98 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\nt\com\rpc\ndr20\stub.cxx @ 1572] 16 0012ea38 772b5bc1 0738ef7c 07348fbc 00000000 ole32!SyncStubInvoke+0x33 (FPO: [Non-Fpo]) 17 0012ea80 771df4e8 0738ef7c 05288f30 052a2fe0 ole32!StubInvoke+0xa5 (FPO: [Non-Fpo]) 18 0012eb58 771df412 0528cda8 00000000 052a2fe0 ole32!CCtxComChnl::ContextInvoke+0xe3 (FPO: [5,43,3]) 19 0012eb74 771e5b2f 0738ef7c 00000001 052a2fe0 ole32!MTAInvoke+0x18 (FPO: [Non-Fpo]) 1a 0012eba0 772b6084 0738ef7c 00000001 052a2fe0 ole32!STAInvoke+0x48 (FPO: [Non-Fpo]) 1b 0012ebd4 772b59bb 0738ef30 0528cda8 052a2fe0 ole32!AppInvoke+0x7c (FPO: [Non-Fpo]) 1c 0012ec98 772b603b 07392fc8 00000000 00000000 ole32!ComInvokeWithLockAndIPID+0x29a (FPO: [2,37,3]) 1d 0012ecc4 771e5aae 0738ef30 0012ed58 0000babe ole32!ComInvoke+0x5e (FPO: [Non-Fpo]) 1e 0012ecd4 771e59da 0738ef30 771e59a8 0012ed10 ole32!ThreadDispatch+0x1f (FPO: [1,0,2]) 1f 0012ece4 77d67ad7 00090894 00000400 0000babe ole32!ThreadWndProc+0xc1 (FPO: [Non-Fpo]) 20 0012ed10 77d6ccd4 771e59a8 00090894 00000400 user32!InternalCallWinProc+0x1b [D:\nt\windows\Core\ntuser\client\i386\callproc.asm @ 102] 21 0012ed78 77d44455 00000000 771e59a8 00090894 user32!UserCallWinProcCheckWow+0x150 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\nt\windows\core\ntuser\client\clmsg.c @ 165] 22 0012edd8 77d495d5 0012edf8 00000000 771c1ed8 user32!DispatchMessageWorker+0x306 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\nt\windows\core\ntuser\client\clmsg.c @ 2490] 23 0012ede4 771c1ed8 0012edf8 00000102 0012ee48 user32!DispatchMessageW+0xb (FPO: [1,0,0]) (CONV: stdcall) [d:\nt\windows\core\ntuser\client\cltxt.h @ 1028] 24 0012ee14 771e75fb 80010115 80010115 00000000 ole32!CCliModalLoop::PeekRPCAndDDEMessage+0x4a (FPO: [Non-Fpo]) 25 0012ee28 772280d4 0012ef1c 00000001 0012ee88 ole32!CCliModalLoop::BlockFn+0x5c (FPO: [Non-Fpo]) 26 0012ee8c 79207c83 017d3ee0 00000001 00000001 ole32!CoWaitForMultipleHandles+0xbd (FPO: [Non-Fpo]) 27 0012eeac 79207c3f 00000000 00000001 00000001 mscorwks!NT5WaitRoutine+0x51 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\threads.cpp @ 3717] 28 0012eed4 7921480f 00000001 0012ef1c 00000000 mscorwks!MsgWaitHelper+0x62 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\threads.cpp @ 4038] 29 0012ef14 79214768 00000750 00000000 07366f80 mscorwks!ComPlusWrapperCleanupList::CleanUpCurrentWrappers+0xd2 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.cpp @ 1653] 2a 0012ef2c 792143de 01d82184 00000000 0012f3a4 mscorwks!ComPlusWrapper::Init+0x58 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\compluswrapper.cpp @ 2239] 2b 0012ef68 79214379 00000000 00000000 00000000 mscorwks!COMInterfaceMarshaler::CreateObjectRef+0x62 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\cominterfacemarshaler.cpp @ 349] 2c 0012ef78 792136b4 0012f74c 0012f74c 00000000 mscorwks!COMInterfaceMarshaler::FindOrCreateObjectRef+0x43 (FPO: [0,0,1]) (CONV: thiscall) [e:\com99\src\vm\cominterfacemarshaler.cpp @ 518] 2d 0012f408 792140e6 07202fd0 00000000 00000000 mscorwks!GetObjectRefFromComIP+0xdf (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\interopconverter.cpp @ 469] 2e 0012f63c 79218f7c 0012f74c 792031a7 0012f77c mscorwks!InterfaceMarshaler::ConvertSpaceNativeToCom+0x33 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\marshaler.h @ 4290] 2f 0012f644 792031a7 0012f77c 0012f77c 017afe58 mscorwks!InterfaceMarshaler::UnmarshalComToNativeByrefOut+0x8 (FPO: [0,0,1]) (CONV: thiscall) [e:\com99\src\vm\marshaler.h @ 4230] 30 0012f700 79203c3b 0171b4da 0012f79c 0012f724 mscorwks!RunML+0x87c (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\ml.cpp @ 837] 31 0012f728 0171a942 0012f77c 00000000 79214000 mscorwks!NDirectSlimStubWorker2+0x58 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\i386\cgenx86.cpp @ 4749] WARNING: Frame IP not in any known module. Following frames may be wrong. 32 0012f874 044e2b3f 01d802ec 01db0a84 00000000 0x171a942 33 0012f888 044e00fd 00000000 0012f8e8 0012f90c 0x44e2b3f 34 0012f8c8 791ec57b 0012f9e4 791eb5d6 0012f91c 0x44e00fd 35 0012f8d0 791eb5d6 0012f91c 00000000 0012f8f4 mscorwks!CallDescrWorker+0x30 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\class.cpp @ 11052] 36 0012f9e4 791f3e2e 0172506b 0401ee08 0012fa04 mscorwks!MethodDesc::CallDescr+0x19d (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\i386\cgenx86.cpp @ 2312] 37 0012fa90 791f3dec 0172506b 0401ee08 00402903 mscorwks!MethodDesc::CallDescr+0x3b (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\i386\cgenx86.cpp @ 2193] 38 0012fab8 79233aa2 0012fb24 00000000 017afe58 mscorwks!MethodDesc::Call+0x95 (FPO: [Non-Fpo]) (CONV: thiscall) [e:\com99\src\vm\method.cpp @ 820] 39 0012fb70 79233888 01725070 00000001 00000000 mscorwks!RunMain+0x197 (FPO: [Non-Fpo]) (CONV: stdcall) [e:\com99\src\vm\clsload.cpp @ 3278] 3a 0012fc88 792336db 0401ee08 00000000 7904153c mscorwks!ClassLoader::ExecuteMainMethod+
 * 1) ChildEBP RetAddr Args to Child



For more information about WinDBG, visit the following Web site:

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Keywords: kbhotfixserver kbqfe kbhotfixserver kbqfe kbqfe kbfix kbbug KB821988

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.