Message73327
I thought first that the problem was during the execution of
gc.collect(), but its not: when configured --with-pydebug, the exception
is printed before:
>>> import gc, _bsddb; env=_bsddb.DBEnv(3); del env
XXX undetected error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
bsddb.db.DBNoServerError: (-30992, 'DB_NOSERVER: Fatal error, no RPC
server -- No Berkeley DB RPC server environment')
gc.collect() is just a rude way to display this "XXX undetected error".
(Victor: does Fusil check for this? gc.collect() will not fail if there
is another exception in-between, or in debug mode)
Now, to the _bsddb module: in general, the following pattern is wrong:
dummy = someFunction();
Py_XDECREF(dummy);
because it does nothing about an eventual exception set. If the
exception can be discarded, PyErr_Clear() must be called.
I think there is an invariant to keep in each function: return NULL if
and only if an exception is set. Many places in _bsddb do not respect this. |
|
Date |
User |
Action |
Args |
2008-09-17 08:53:45 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, jcea, vstinner |
2008-09-17 08:53:44 | amaury.forgeotdarc | set | messageid: <1221641624.71.0.373281108932.issue3885@psf.upfronthosting.co.za> |
2008-09-17 08:53:29 | amaury.forgeotdarc | link | issue3885 messages |
2008-09-17 08:53:28 | amaury.forgeotdarc | create | |
|