home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC82751 Status: Closed

When load command from cursor results in a warning, db2bp attempts to
double free the memory.

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
When Load command from cursor fails with SQL0437W and user is 
prompted with c/d/t messages, and upon selecting any option, 
db2bp might try to double free the memory that has already been 
freed vis clpPostLoadFreeDynMem(). 
 
Error while running load: 
 
Do you want to continue(c), terminate this device only(d), abort 
the  utility(t) ? (c/d/t) c 
 
SQL0437W  Performance of this complex query may be sub-optimal. 
Reason code:  "1".  SQLSTATE=01602 
 
Do you want to continue(c), terminate this device only(d), abort 
the utility(t) ? (c/d/t) 
 
 
In db2diag.log we can see entries as below: 
 
012-02-22-17.49.36.688978+060 I1083415A1469      LEVEL: Severe 
PID     : 53477450             TID  : 1           PROC : db2bp 
INSTANCE: db2inst1              NODE : 000 
APPID   : *N0.db2inst1.120222164343 
EDUID   : 1 
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 
0x000000011011aee0 
DATA #3 : Block header, PD_TYPE_BLK_HEADER, 24 bytes 
0x000000011011AEC8 : FAB0 0000 0011 0114 0000 0001 1011 8148 
...............H 
0x000000011011AED8 : 0000 0000 0000 0000 
........ 
DATA #4 : Data header, PD_TYPE_BLK_DATA_HEAD, 48 bytes 
0x000000011011AEE0 : 0000 0000 0000 9120 0001 0000 0000 0000 
....... ........ 
0x000000011011AEF0 : 0000 0000 0002 0000 0000 0000 0000 0000 
................ 
0x000000011011AF00 : 0003 0000 0000 0000 0000 0000 0004 0000 
................ 
CALLSTCK: 
  [0] 0x0900000002FF6CD4 pdLog + 0xA8 
  [1] 0x0900000003175E2C 
@28@sqloDiagnoseFreeBlockFailure__FP8SMemFBlk + 0x15C 
  [2] 0x0900000003838ED4 sqlofmblkEx + 0x88 
  [3] 0x0900000002F5E46C clpPostLoadFreeDynMem + 0xB0 
  [4] 0x00000001000422B0 clpbp_exe_sqluload__Fv + 0x130 
  [5] 0x0000000100001794 clp_bp_con__Fv + 0x634 
  [6] 0x0000000100000B24 main + 0x224 
  [7] 0x0000000100000320 __start + 0x98 
  [8] 0x0000000000000000 ?unknown + 0x0 
  [9] 0x0000000000000000 ?unknown + 0x0 
 
2012-02-22-17.49.36.689490+060 I1084885A337       LEVEL: Severe 
PID     : 53477450             TID  : 1           PROC : db2bp 
INSTANCE: db2inst1              NODE : 000 
APPID   : *N0.db2inst1.120222164343 
EDUID   : 1 
FUNCTION: DB2 UDB, SQO Memory Management, 
sqloDiagnoseFreeBlockFailure, probe:30 
DATA #1 : String, 12 bytes 
Double free. 
 
The issue happened because once the memory was allocated 
successfully and also de-allocated by OSS, then clp tried 
freeing the same memory again and again after supplying the 
input i.e  (c/d/t). clp_bp was reading the input queue again and 
again which was duplicating the memory pointer, because of which 
there was attempt to free the memory 
pointer again and again, hence the double free. 
 
 
In the traces we will have the following entries: 
 
1779        | | clp_bp_con entry 
849439      | | | clp_bp_exe entry 
849442      | | | | clpbp_exe_sqluload entry 
849523      | | | | | clppostloadfreedynmem entry 
 
 
 
849523  entry DB2 UDB command line process clppostloadfreedynmem 
fnc (1.3.41.788.0) 
    pid 3068074 tid 1 cpid 1221 node 0 sec 4 nsec 419553800 
 
    bytes 64 
 
    Data1   (PD_TYPE_PTR,8) Pointer: 
    0x0000000110046ff0 
    Data2   (PD_TYPE_HEXDUMP,40) Hexdump: 
    0000 0000 0000 0000 0000 0000 0000 0000    ................ 
    0000 0000 0000 0000 0000 0001 1011 BC40    ...............@ 
    0000 07D2 0000 0000                        ........
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Users Prior to V97fp7                                        * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to V97fp7                                            * 
****************************************************************
Local Fix:
available fix packs:
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
19.04.2012
01.11.2012
01.11.2012
Problem solved at the following versions (IBM BugInfos)
9.7.FP7
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.7 FixList