IBM Support

IC65849: MEMORY LEAK FROM .NET PROVIDER METHOD IBM.DATA.INFORMIX.DBCWRAPPER.ENLISTASREQUIRED

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The memory leak is caused by the IntPtr returned from
    Marshal.GetIUnknownForObject but never released with
    Marshal.Release().
    
    According to the documentation on Marshal.GetIUnknownForObject:
    In managed code, you seldom work directly with the IUnknown
    interface. However, GetIUnknownForObject is useful when calling
    a method that exposes a COM object parameter as an IntPtr type,
    or with custom marshaling. Calling an object with this method
    causes the reference count to increment on the interface pointer
    before the pointer is returned. Always use Marshal..::.Release
    to decrement the reference count once you have finished with the
    pointer. This method provides the opposite functionality of the
    Marshal..::.GetObjectForIUnknown method.
    
    Stack trace of the leak:
    
    Time Travel Position: 1DAA680000001.
    0012ebe0 61174d04 kernel32!InterlockedIncrement+0x9
    [d:\nt\base\win32\client\i386\critsect.asm @ 91]
    0012ebf8 61183459 msdtcprx!CITransaction::AddRef+0x17
    [d:\nt\com\complus\dtc\dtc\msdtcprx\src\dtcprxtx.cpp @ 360]
    0012ec04 79f902bf msdtcprx!CTxWrapper::AddRef+0x11
    [d:\nt\com\complus\dtc\dtc\msdtcprx\src\txwrapper.cpp @ 205]
    0012ec34 79fa9cce mscorwks!SafeAddRef+0x5c
    [f:\dd\ndp\clr\src\vm\interoputil.cpp @ 1530]
    0012ec44 79f6c386
    mscorwks!IUnkEntry::GetIUnknownForCurrContext+0x26
    [f:\dd\ndp\clr\src\vm\comcache.cpp @ 816]
    0012ec90 79f6cf8f mscorwks!GetComIPFromObjectRef+0x126
    [f:\dd\ndp\clr\src\vm\interopconverter.cpp @ 288]
    0012ed44 00e78a35
    mscorwks!MarshalNative::GetIUnknownForObjectNative+0xdb
    [f:\dd\ndp\clr\src\vm\marshalnative.cpp @ 1223]
    0012ed7c 00e77f07
    ibm_data_informix!IBM.Data.Informix.DBCWrapper.EnlistAsRequired(
    IBM.Data.Informix.IfxConnection)+0x85
    0012ee70 00e777e2
    ibm_data_informix!IBM.Data.Informix.IfxConnectionPool.Open(IBM.D
    ata.Informix.IfxConnection)+0x317
    0012ee98 00e7739a
    ibm_data_informix!IBM.Data.Informix.IfxConnPoolManager.Open(IBM.
    Data.Informix.IfxConnection)+0x42
    0012eeb4 00e735e1
    ibm_data_informix!IBM.Data.Informix.IfxConnection.Open()+0x112
    0012efc0 00e73384
    testmemoryleak!TestMemoryLeak.MemoryLeak.DistributedTxn()+0x1d9
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Windows Users                                                *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * Memory leak occurs in DBCWrapper.EnlistAsRequired method.    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to CSDK 3.50.xC7.                                    *
    ****************************************************************
    

Problem conclusion

  • The problem was first fixed in CSDK 3.50.xC7.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC65849

  • Reported component name

    IBM CSDK

  • Reported component ID

    5724C2381

  • Reported release

    350

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-01-26

  • Closed date

    2010-11-09

  • Last modified date

    2010-11-09

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM CSDK

  • Fixed component ID

    5724C2381

Applicable component levels

  • R350 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCVRDE","label":"Informix Client Software Development Kit"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
09 November 2010