Consultor Eletrônico



Kbase P133306: How to detect ABL Memory Leaks with Dynamic Objects Logging
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   8/13/2010
Status: Verified

GOAL:

How to detect ABL Memory Leaks with Dynamic Objects Logging

GOAL:

How to find out if a memory leak is caused by ABL objects not being managed correctly ?

FACT(s) (Environment):

All Supported Operating Systems
OpenEdge 10.0B
OpenEdge 10.1x
OpenEdge 10.2x

FIX:

In 10.0B the new DynObjects log entry type was introduced to OpenEdge. This logging feature allows logging of all objects created in a OpenEdge session.
This feature is used by specifying one or more of the following after the -logentrytypes parameter or by setting the LOG-ENTRY-TYPES attribute of the LOG-MANAGER handle.
DynObjects.Class
DynObjects.DB
DynObjects.Other
DynObjects.XML
DynObjects.UI
DynObjects.*
e.g.
-clientlog <logfilename> -logentrytypes "DynObject.Class,DynObjects.UI" -logginglevel 3
When output is generated it can be analyzed using the logread utility or by simply reading the file and matching up all the creates with all the deletes.


Basically, the logs should show one of the following per handle number:
1. There?s both a "Created" and a "Deleted" entry for the number, indicating the object has been cleaned up after use.
2. There is only a "Created" entry, and the procedure and line number where this is seen is executed exactly once for the lifetime of the session. This is typically seen for persistent procedures etc. which are kept in memory and re-used, so the overhead of deleting and re-instantiating them can be avoided.

Anything else is a likely object leak which requires further investigation.

More specific information on logging levels and content is available in the Debugging and Troubleshooting Guide in the OpenEdge Product Documentation.