IBM Support

IC75889: CLI TRAP IN THE IMPLEMENTATION OF DB2'S DBMS_SQL MODULE

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • CLI Trap in the connection handlers of the implementation of
    DB2's DBMS_SQL module, during the error handling of connection
    handlers to free the pDbcInfo, the cache is not being cleaned up
    properly, it cuase CLI trap.
    
    The db2diag.log looks like this:
    2011-04-08-15.37.53.987881+540 I1344556A1674      LEVEL: Severe
    PID     : 9437526              TID  : 78952       PROC : db2sysc
    INSTANCE: db2inst1             NODE : 000         DB   : PDDB
    EDUID   : 78952                EDUNAME: db2agent (PDDB) 0
    FUNCTION: DB2 UDB, SQO Memory Management,
    sqloDiagnoseFreeBlockFailure, probe:10
    MESSAGE : Possible memory corruption detected.
    DATA #1 : ZRC, PD_TYPE_ZRC, 4 bytes
    0x820F0002
    DATA #2 : Corrupt block address, PD_TYPE_CORRUPT_BLK_PTR, 8
    bytes
    0x0000000a73f20080
    DATA #3 : Block header, PD_TYPE_BLK_HEADER, 24 bytes
    0x0000000A73F20068 : FAB0 0000 00A7 3F20 0000 0000 0000 0000
    ......? ........
    0x0000000A73F20078 : 0000 000A 73F2 F308
    ....s...
    DATA #4 : Data header, PD_TYPE_BLK_DATA_HEAD, 48 bytes
    0x0000000A73F20080 : 0000 0000 0000 2940 0000 0001 2FA2 EF80
    ......)@..../...
    0x0000000A73F20090 : 0000 0008 C9E4 FCC0 0000 000D 2F63 9760
    ............/c.`
    0x0000000A73F200A0 : 0000 0000 0000 0000 0000 0014 0000 0001
    ................
    CALLSTCK:
      [0] 0x0900000000D28C2C pdLog + 0xA8
      [1] 0x0900000001413930
    @28@sqloDiagnoseFreeBlockFailure__FP8SMemFBlk + 0x14C
      [2] 0x0900000000D3300C sqlofmblkEx + 0x55C
      [3] 0x09000000015AE524 CLI_memFreeToPool__FPPv + 0x44
      [4] 0x0900000001338FF8 CLI_memFreeToPool__FPPv@glue50 + 0x78
      [5] 0x090000000166E468
    SQLAllocConnect2__FP19CLI_ENVIRONMENTINFOPP15CLI_CONNECTINFOP19C
    LI_ERRORHEADERINFO
    + 0x164
      [6] 0x09000000015B1C7C SQLAllocHandle + 0x3B4
      [7] 0x090000000BABF6D0
    initializeCLI__FP11sessionDataP5_poolPcT3P5sqlca + 0x50
      [8] 0x090000000BAAF0C0 getSessionState__FPcT1P5sqlca + 0x220
      [9] 0x090000000BAAEC04 sqleml_dbms_sql_open_cursor + 0x84
    
    2011-04-08-15.37.53.991371+540 I1346231A370       LEVEL: Severe
    PID     : 9437526              TID  : 78952       PROC : db2sysc
    INSTANCE: db2inst1             NODE : 000         DB   : PDDB
    EDUID   : 78952                EDUNAME: db2agent (PDDB) 0
    FUNCTION: DB2 UDB, SQO Memory Management,
    sqloDiagnoseFreeBlockFailure, probe:30
    DATA #1 : String, 12 bytes
    Double free.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Users using DB2'S DBMS_SQL MODULE                            *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * CLI Trap in the connection handlers of the implementation of *
    *                                                              *
    * DB2's DBMS_SQL module, during the error handling of          *
    * connection                                                   *
    * handlers to free the pDbcInfo, the cache is not being        *
    * cleaned up                                                   *
    * properly, it cuase CLI trap.                                 *
    *                                                              *
    *                                                              *
    *                                                              *
    * The db2diag.log looks like this:                             *
    *                                                              *
    * 2011-04-08-15.37.53.987881+540 I1344556A1674      LEVEL:     *
    * Severe                                                       *
    * PID    : 9437526              TID  : 78952      PROC :       *
    * db2sysc                                                      *
    * INSTANCE: db2inst1            NODE : 000        DB  : PDDB   *
    * EDUID  : 78952                EDUNAME: db2agent (GACP) 0     *
    *                                                              *
    * FUNCTION: DB2 UDB, SQO Memory Management,                    *
    *                                                              *
    * sqloDiagnoseFreeBlockFailure, probe:10                       *
    *                                                              *
    * MESSAGE : Possible memory corruption detected.               *
    *                                                              *
    * DATA #1 : ZRC, PD_TYPE_ZRC, 4 bytes                          *
    *                                                              *
    * 0x820F0002                                                   *
    *                                                              *
    * DATA #2 : Corrupt block address, PD_TYPE_CORRUPT_BLK_PTR, 8  *
    *                                                              *
    * bytes                                                        *
    *                                                              *
    * 0x0000000a73f20080                                           *
    *                                                              *
    * DATA #3 : Block header, PD_TYPE_BLK_HEADER, 24 bytes         *
    *                                                              *
    * 0x0000000A73F20068 : FAB0 0000 00A7 3F20 0000 0000 0000 0000 *
    *                                                              *
    * ......? ........                                             *
    *                                                              *
    * 0x0000000A73F20078 : 0000 000A 73F2 F308                     *
    *                                                              *
    * ....s...                                                     *
    *                                                              *
    * DATA #4 : Data header, PD_TYPE_BLK_DATA_HEAD, 48 bytes       *
    *                                                              *
    * 0x0000000A73F20080 : 0000 0000 0000 2940 0000 0001 2FA2 EF80 *
    *                                                              *
    * ......)@..../...                                             *
    *                                                              *
    * 0x0000000A73F20090 : 0000 0008 C9E4 FCC0 0000 000D 2F63 9760 *
    *                                                              *
    * ............/c.`                                             *
    *                                                              *
    * 0x0000000A73F200A0 : 0000 0000 0000 0000 0000 0014 0000 0001 *
    *                                                              *
    * ................                                             *
    *                                                              *
    * CALLSTCK:                                                    *
    *                                                              *
    *   [0] 0x0900000000D28C2C pdLog + 0xA8                        *
    *                                                              *
    *   [1] 0x0900000001413930                                     *
    *                                                              *
    * @28@sqloDiagnoseFreeBlockFailure__FP8SMemFBlk + 0x14C        *
    *                                                              *
    *   [2] 0x0900000000D3300C sqlofmblkEx + 0x55C                 *
    *                                                              *
    *   [3] 0x09000000015AE524 CLI_memFreeToPool__FPPv + 0x44      *
    *                                                              *
    *   [4] 0x0900000001338FF8 CLI_memFreeToPool__FPPv@glue50 +    *
    * 0x78                                                         *
    *   [5] 0x090000000166E468                                     *
    *                                                              *
    * SQLAllocConnect2__FP19CLI_ENVIRONMENTINFOPP15CLI_CONNECTINFO *
    * P19C                                                         *
    * LI_ERRORHEADERINFO                                           *
    *                                                              *
    * + 0x164                                                      *
    *                                                              *
    *   [6] 0x09000000015B1C7C SQLAllocHandle + 0x3B4              *
    *                                                              *
    *   [7] 0x090000000BABF6D0                                     *
    *                                                              *
    * initializeCLI__FP11sessionDataP5_poolPcT3P5sqlca + 0x50      *
    *                                                              *
    *   [8] 0x090000000BAAF0C0 getSessionState__FPcT1P5sqlca +     *
    * 0x220                                                        *
    *   [9] 0x090000000BAAEC04 sqleml_dbms_sql_open_cursor + 0x84  *
    *                                                              *
    *                                                              *
    *                                                              *
    * 2011-04-08-15.37.53.991371+540 I1346231A370      LEVEL:      *
    * Severe                                                       *
    * PID    : 9437526              TID  : 78952      PROC :       *
    * db2sysc                                                      *
    * INSTANCE: db2inst1            NODE : 000        DB  : PDDB   *
    * EDUID  : 78952                EDUNAME: db2agent (GACP) 0     *
    *                                                              *
    * FUNCTION: DB2 UDB, SQO Memory Management,                    *
    *                                                              *
    * sqloDiagnoseFreeBlockFailure, probe:30                       *
    *                                                              *
    * DATA #1 : String, 12 bytes                                   *
    *                                                              *
    * Double free.                                                 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Not using DBMS_SQL (SP_GA_PBS_MNS_P11_CALC_SD_PR and         *
    * SP_GA_PBS_MNS_P11_CALC_YR_PR) as workaround.                 *
    ****************************************************************
    

Problem conclusion

  • During error handling of connection handlers, we are trying to
    free the pDbcInfo, but the cache is not being cleaned up
    properly. so we are making pDbcInfo = NULL to avoid calling free
    memory block to avoid the crash at this point .
    

Temporary fix

Comments

APAR Information

  • APAR number

    IC75889

  • 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

    2011-04-19

  • Closed date

    2012-02-01

  • Last modified date

    2012-02-01

  • 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

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
01 February 2012