[ZCM] [ZC] 1872/ 4 Comment "2.8 SQLAlias leaks"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Sun Aug 21 16:48:32 EDT 2005
Issue #1872 Update (Comment) "2.8 SQLAlias leaks"
Status Pending, Zope/bug medium
To followup, visit:
http://www.zope.org/Collectors/Zope/1872
==============================================================
= Comment - Entry #4 by tseaver on Aug 21, 2005 4:48 pm
Uploaded: "results_leak.py"
- http://www.zope.org/Collectors/Zope/1872/results_leak.py/view
Attaching a script which (I think) demonstrates the leak. Here
is output on my machine:
$ bin/zopectl run ../results_leak.py
================================
2.3.5 (#1, Apr 11 2005, 13:18:06)
[GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)]
================================
--------------------------------
Leak test: None
--------------------------------
leaked: 0
--------------------------------
Leak test: by attribute
--------------------------------
leaked: 16
--------------------------------
Leak test: by item
--------------------------------
leaked: 15
________________________________________
= Comment - Entry #3 by tseaver on Aug 21, 2005 4:01 pm
Andreas wrote:
> hm...what is the usecase for binding a Results instance as
> instance attribute? I can not think of a case where this would
> make sense.
1. I have a view for a content object, which execute an SQL
query and stores the results as an instance of the view, which
should be only for the life of the request. However, due to
this bug, the view and all associated objects (the request,
the SQL results, etc.) leak.
2. I can also imagine this being problematic for caches of the
SQL results.
________________________________________
= Comment - Entry #2 by ajung on Aug 20, 2005 2:37 am
hm...what is the usecase for binding a Results instance as instance attribute? I can not think of a case where this would make sense.
________________________________________
= Request - Entry #1 by mcdonc on Aug 19, 2005 10:10 pm
When you bind a Shared.DC.ZRDB.Results.Results class to an instance of a 2.8 extensionclass (e.g. self.results = <result instance>), it creates a cycle that eventually manifests itself as SQLAlias reference leaks. This appears to be a resurrection of an ancient bug (ala http://mail.zope.org/pipermail/zope-dev/2000-December/008280.html).
==============================================================
More information about the Zope-Collector-Monitor
mailing list