[ZODB-Dev] Tracking down a freeze (deadlock?)

Dieter Maurer dieter at handshake.de
Fri Mar 4 13:17:34 EST 2005


Tim Peters wrote at 2005-3-3 15:46 -0500:
[DM]
>> However, deadlocking (or looping indefinitely) is not the right way to
>> flag an unuseful feature (such as "__del__" in a persistent class).
>> It is far too difficult to track down the cause of the
>> deadlocking/spinning.

[TP]
>Since
>there isn't even a Collector issue on this one, it's got no priority
>compared to the 40-or-so ZODB-related Collector issues already open.  If
>there were a Collector issue for this one(*), I don't think it would get
>high priority anyway, because of the historical rarity of the problem; the
>ease of avoiding it to begin with

"__del__" is a standard Python feature.

The ZODB documentation promisses minimal requirements to
make Python classes persistent. It does *NOT* list that
"__del__" must not be used.

Apparently (I am still not yet sure), a "__del__" in a persistent
class leads to a severe failure -- a very difficult to
detect deadlock.

We have many reports of hanging Zope instances -- reports where
we do not know the reason. Maybe, many of those are caused
by "__del__"s in persistent classes.

That this one was explained, a Zope expert has been necessary.
Think about the situation when this behaviour had occured with
a standard Zope user...

-- 
Dieter


More information about the ZODB-Dev mailing list