[ZODB-Dev] Temporary files not closed
Izak Burger
izak at upfrontsystems.co.za
Thu Jun 25 04:46:04 EDT 2009
Hi all,
This is a zope issue that I think is probably zodb related. I've been
seeing this behaviour for a couple of years now. When I inspect
/proc/PID/fd (on a linux machine, this lists the open file descriptors
held by the process with process id PID), I see many descriptors that
point to open files, eg:
$ ls -go /proc/15431/fd | grep deleted
lrwx------ 1 64 2009-06-25 10:09 13 -> /var/tmp/tmptBEWCx.tbuf (deleted)
lrwx------ 1 64 2009-06-25 10:09 14 -> /var/tmp/tmpKSuzMN (deleted)
lrwx------ 1 64 2009-06-25 10:09 6 -> /var/tmp/tmp2HUAnn.tbuf (deleted)
lrwx------ 1 64 2009-06-25 10:09 7 -> /var/tmp/tmpex5QmJ (deleted)
This gets worse over time until we run out of diskspace, with a trace
back like this (somewhat sanitised to protect the guilty):
".../parts/zope2/lib/python/transaction/_manager.py",line 110, in
savepoint return self.get().savepoint(optimistic) File
".../parts/zope2/lib/python/transaction/_transaction.py", line 312, in
savepoint self._saveAndRaiseCommitishError() # reraises!
".../parts/zope2/lib/python/transaction/_transaction.py", line 422, in
_saveAndRaiseCommitishError t, v, tb = self._saveAndGetCommitishError() File
".../parts/zope2/lib/python/transaction/_transaction.py", line 309, in
savepoint savepoint = Savepoint(self, optimistic, *self._resources) File
".../parts/zope2/lib/python/transaction/_transaction.py", line 737, in
__init__ savepoint = savepoint()
".../parts/zope2/lib/python/ZODB/Connection.py", line 1046, in savepoint
self._commit(None)
".../parts/zope2/lib/python/ZODB/Connection.py",line 555, in _commit
self._store_objects(ObjectWriter(obj), transaction)
".../parts/zope2/lib/python/ZODB/Connection.py",line 583, in
_store_objects s = self._storage.store(oid, serial, p, self._version,
transaction)
".../parts/zope2/lib/python/ZODB/Connection.py", line 1180, in store
self._file.write(data) IOError: [Errno 28] No space left on device
Naturally a restart solves the problem immediately, but this is still a bug.
Before I dive into the code and attempt to find the problem, I thought
I'd post first, partly to report the problem, but at the same time to
find out if anyone has seen this and if perhaps a fix is already available.
regards,
Izak
More information about the ZODB-Dev
mailing list