home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
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
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IT06009 Status: Geschlossen

MEMORY LEAK IN APPLICATION HEAP IF A COMPOUND STATEMENT IS TERMINATED EARLY
AFTER USING A LOCAL CURSOR VARIABLE.

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
Memory blocks for cursor variables might remain if a compound 
statement in a compiled SQL routine terminates early, in 
response to a condition handler or unhandled exception 
condition. 
 
The following example shows a SIGNAL statement that exits a 
procedure after using a local cursor variable.  Each time the 
procedure is invoked, memory blocks are leaked.  The following 
steps illustrate the issue. 
 
1. Deploy procedures like as below: 
 
db2 connect to sample 
db2 -td@ -vf p1.sql 
--------------------- 
CREATE OR REPLACE PROCEDURE PROC2() 
MODIFIES SQL DATA 
LANGUAGE SQL 
BEGIN 
  DECLARE CUR2 CURSOR; 
  SET CUR2 = CURSOR WITH HOLD FOR VALUES CURRENT TIMESTAMP; 
  OPEN CUR2; 
  CLOSE CUR2; 
  SIGNAL SQLSTATE '70100' SET MESSAGE_TEXT = 'Err'; 
END@ 
 
CREATE OR REPLACE PROCEDURE PROC1() 
MODIFIES SQL DATA 
LANGUAGE SQL 
BEGIN 
  DECLARE SQLERRM VARCHAR(256); 
  DECLARE EXIT HANDLER FOR SQLSTATE VALUE '70100' 
  BEGIN 
    GET DIAGNOSTICS EXCEPTION 1 SQLERRM = MESSAGE_TEXT; 
  END; 
  CALL PROC2(); 
END@ 
--------------------- 
 
2. Call the procedure several times, then take memory block 
statistics for the application. 
 
for i in `seq 1 250` 
> do 
> db2 "call PROC1" > /dev/null 
> done 
 
db2pd -db sample -memblock appl 1 sort 
 
Memory blocks sorted by size for apph pool: 
PoolID  PoolName  TotalSize(Bytes)  TotalCount LOC   File 
1       apph      54000             250        1159  1043897861 
1       apph      30000             250        11229 4262186386 
1       apph      16000             250        1216  1043897861 
<snip>
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* ALL                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Please upgrade to DB2 V10.1 FixPack 5 or later.              * 
****************************************************************
Local-Fix:
Please disconnect the application from the database to free up 
application heap.
Lösung
This problem was first fixed in DB2 V10.1 FixPack 5.
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
09.12.2014
15.07.2015
15.07.2015
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.5 FixList