IBM Support

IC91220: MEMORY LEAK IN UCA500R1 COLLATION DATABASE WHEN USING COLUMN NAME IN pattern-expression of LIKE clause

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • This memory leak is specific to using a UCA500R1 collation
    sequence database in conjunction with a LIKE predicate that uses
    column name in pattern expression.
    Example of the syntax:  LIKE(MyCol || '%').
    This type of LIKE pattern expression is supported since version
    9.7 Fixpack 4.
    
    You can identify the leak in PRIVATE memory using the db2pd tool
    :
    
    
    DB2SYSC=`db2pd -edu | grep "db2sysc PID:" | awk  '{ print $3}'`
    db2pd -dbptnmem > dbptnmem.1.out
    db2pd -memb pid=$DB2SYSC > memb.1.out
    
    db2 "select * from MySchema.MyTable WHERE COALESCE(MyCol_1,'')
    LIKE (MyCol_2 || '%')"
    
    db2pd -dbptnmem > dbptnmem.2.out
    db2pd -memb pid=$DB2SYSC > memb.2.out
    
    
    After the running the statement, the size of PRIVATE MEMORY will
    show an increase in PRIVATE memory that could be consequent
    depending on the result set (you can compare the 2 output files
    generated as above : dbptnmem.*.out) :
    
    
    === BEFORE EXECUTION ===
    Database Partition Memory Controller Statistics
    
    Controller Automatic: N
    Memory Limit:         4000000 KB
    Current usage:        341376 KB
    HWM usage:            341376 KB
    Cached memory:        175296 KB
    
    Individual Memory Consumers:
    
    Name             Mem Used (KB) HWM Used (KB) Cached (KB)
    ========================================================
    APPL-FOD                160000        160000      158848
    DBMS-dbguest0            48448         48448           0
    FMP_RESOURCES            22528         22528           0
    PRIVATE                   9344          9344           0
    LCL-p21517                 128           128           0
    DB-FOD                  100928        100928       16448
    
    
    
    === AFTER EXECUTION ===
    Database Partition Memory Controller Statistics
    
    Controller Automatic: N
    Memory Limit:         4000000 KB
    Current usage:        2590208 KB
    HWM usage:            2595200 KB
    Cached memory:        175296 KB
    
    Individual Memory Consumers:
    
    Name             Mem Used (KB) HWM Used (KB) Cached (KB)
    ========================================================
    APPL-FOD                160000        160000      158848
    DBMS-dbguest0            48384         48384           0
    FMP_RESOURCES            22528         22528           0
    PRIVATE                2258240       2258240           0
    LCL-p20550                 128           128           0
    DB-FOD                  100928        100928       16448
    
    
    This memory leak can lead to a SEGV in sqlvCCCBuildNextLikeRule
    or sqlnlsStringSearch_open_ICUbug_U500R1 if the leak grows over
    INSTANCE_MEMORY. In such case the trap will show a stack similar
    to this one :
    
    PC location:
    __1cYsqlvCCCBuildNextLikeRule6FpnIsqlrr_cb_pknOsqlrxCollation_pp
    nPsqlvCCCLikeRule_6pCi8iipi_i_ + 0x11a8
    Object file: /opt/IBM/db2/V9.7B/lib64/libdb2e.so.1 (offset
    0x4a11f48)
    </Registers>
    <StackTrace>
    ##### Object: /opt/IBM/db2/V9.7B/lib64/libdb2e.so.1
    __1cYsqlvCCCBuildNextLikeRule6FpnIsqlrr_cb_pknOsqlrxCollation_pp
    nPsqlvCCCLikeRule_6pCi8iipi_i_(0xffffffff8b0f0001,0xffffffff6229
    6d18,0x18b00000,0xb6c00,0xfffffffccd7f59f0,0x870f0000) + 0x11a8
    __1cbCsqlriCCCLikeComputeRulesCore6FpnIsqlrr_cb_pnKsqlz_value_3p
    nUsqlriCCCLikeWorkArea__i_(0xffffffff4beccba0,0x2,0x0,0xffffffff
    633b2728,0x0,0x1) + 0xa8c
    __1cYsqlriCCCLikeComputeRules6FpnIsqlrr_cb__i_(0xffffffff4beccba
    0,0x0,0x276823c,0x2,0xc8000,0xffffffff7c85a2c0) + 0x58
    __1cQsqldEvalDataPred6FpnNSQdDLD_DFM_WORK_pLpnKSQdDLD_DPRED__i_(
    0xffffffff63ee3710,0xfffffffccd7f6008,0xffffffff633b26b8,0x1788,
    0xffffffff633b2cd0,0xf808600220800) + 0x140
    __1cMsqldReadNorm6FpnNSQdDLD_DFM_WORK_l_i_(0xffffffff63ee3710,0x
    1e,0x6,0xffffffff63ee3888,0x1,0x0) + 0x1734
    __1cPsqldFetchDirect6FpnNSQdDLD_DFM_WORK__i_(0xffffffff63ee3710,
    0x0,0xffffffff63ee3788,0xffffffff63ee38d8,0x0,0xffffffff63ee3888
    ) + 0x4740
    __1cHsqldfrd6FpnNSQdDLD_DFM_WORK__i_(0xffffffff63ee3710,0x205800
    1f,0xf808600220800,0xfffffffec316c000,0x0,0x1f) + 0x1040
    __1cMsqldRowFetch6FpnIsqeAgent_pnISQdDLD_CCB_LLppnKSQdDLD_VALUE_
    pnISQdDLZ_RID_LpnMSQdDLD_ID_LIST_pnJSQdDLP_LSN8__i_(0x8,0xffffff
    ff7c85a2c0,0xffffffff63ee3710,0xfffe,0x0,0xffffffff633b21f0) +
    0x1f84
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Database with UCA500R1 collation sequence                    *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description.                                       *
    *                                                              *
    * You will notice as well a large number of memory blocks      *
    * allocated for "sqlnlsICUcallback.C  (LOC 112)"  after        *
    * running                                                      *
    * the statement by using the following command on the          *
    * generated                                                    *
    * file above.                                                  *
    *                                                              *
    * $ grep sqlnlsICUcallback.C memb.2.out | wc -l                *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to version 9.7 Fix Pack 9                            *
    ****************************************************************
    

Problem conclusion

  • First fix in version 9.7 Fix Pack 9
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC91220

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-04-02

  • Closed date

    2013-12-16

  • Last modified date

    2013-12-16

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

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

    IC91803 IC97525

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP



Document information

More support for: DB2 for Linux, UNIX and Windows

Software version: 9.7

Reference #: IC91220

Modified date: 16 December 2013