Consultor Eletrônico



Kbase P174905: ABL: Memory leak reusing object with database access
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/7/2010
Status: Unverified

SYMPTOM(s):

ABL: Memory leak reusing object with database access

Errors (538), (6498) and (1450) are generated running code that repeatedly instantiate a class that has a method with database access

** There is not enough memory to allocate a sort buffer. (538)

** stget: out of storage. (6498)

stget: out of storage (1450)

The error(s) are generated running the following Runit.p procedure against the compiled r-code of the following Test.cls class:

/* Runit.p */
DEFINE VARIABLE i64Counter AS INT64 NO-UNDO.
DEFINE VARIABLE clsTest AS CLASS Test NO-UNDO .
FORM HEADER "Iterations" WITH FRAME fName NO-LABELS.
MainBlock:
DO ON ERROR UNDO, LEAVE MainBlock ON STOP UNDO, LEAVE MainBlock:
DO i64Counter = 1 TO 100000000 ON ERROR UNDO, RETURN ERROR ON STOP UNDO, RETURN ERROR:
DISPLAY i64Counter WITH FRAME fName.

clsTest = NEW Test().
DELETE OBJECT clsTest NO-ERROR.
END.
END.

/* Test.cls */
CLASS Test:
METHOD PUBLIC VOID mTest ():
FIND FIRST Customer NO-LOCK NO-ERROR.
END METHOD.
END CLASS.

FACT(s) (Environment):

The errors do not occur if the above procedure Runit.p is run (either compiled, Runit.r or un-compiled, Runit.p) against the un-compiled version of the Test.cls class object.
All Supported Operating Systems
OpenEdge 10.2B

CAUSE:

Bug# OE00200882

CAUSE:

The client will leak memory when reusing an OO class object with database access ( FIND, FOR EACH, etc). Creating & deleting the class object many times, the problem manifests itself causing the process to eventually run out of available memory and generate one or more of the above errors.

FIX:

None at this time. . A workaround is to start the session with the -reusableObjects 0 client session startup parameter to disable object reuse. For example:
pro sports2000 -1 -reusableObjects 0 -p Runit.r.