IBM Support

IT01787: APPLICATION_HEAP MEMORY LEAK FROM LOB FIELDS OF LOCAL ROW VARIABLES WHICH ARE NOT PART OF A NESTED TYPE OBJECT.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as fixed if next.

Error description

  • Beginning in v9.7 fixpack 5, a memory leak is possible for all
    LOB fields of local row variables that are associated with the
    top-level row descriptor.  Basically, this means any LOB field
    of a local row variable which is not part of a nested type
    object.  The leak will occur on every invocation of the routine.
    The amount of the leakage will depend on the size of the data
    assigned to each LOB row field.  LOB fields of row parameters do
    not leak.
    
    Here is an example:
    
        create type row_A as row(F1 integer, F2 varchar(10), F3
    clob(32K)) %
        create type row_B as row(F1 row_A, F2 clob(32K)) %
    
        create procedure test
        begin
          declare A row_A;
          declare B row_B;
    
          -- ...
        end %
    
    `A` and `B` are both local row variables.  The PVM "owns" the
    row descriptor for each:  a `row_A` descriptor for `A`, and a
    `row_B` descriptor for `B`.  This is the "top-level" object
    which is the subject of this defect.
    
    Additionally, `B` is a nested type object that contains a field
    of type `row_A`.  It therefore contains two LOB objects:  `B.F2`
    and `B.F1.F3`.  However, only `B.F2` is directly associated with
    the top-level row descriptor; the rest is nested type data that
    is dynamically managed by the run-time.
    
    The essence of the defect is that the PVM is not freeing storage
    associated with LOB fields in any row type descriptor that it
    owns directly.  In this example, that means `A.F3` and `B.F2`.
    Neither of these LOB fields will be freed by the PVM and will
    therefore leak.
    
    The LOB field `B.F1.F3` is part of the dynamic data managed for
    the nested type object.  Storage allocated for this LOB field
    *will* be freed properly.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * upgrade to inclusive fixpack.                                *
    ****************************************************************
    

Problem conclusion

Temporary fix

Comments

APAR Information

  • APAR number

    IT01787

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED FIN

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-05-13

  • Closed date

    2014-11-17

  • Last modified date

    2014-11-17

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

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

Fix information

Applicable component levels

  • R970 PSY

       UP

  • RA10 PSY

       UP

  • RA50 PSY

       UP

  • RA60 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IT01787

Modified date: 17 November 2014