-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SystemError: error return without exception set #82
Comments
Just one extra information regarding the |
We've got exactly that problem on an old Plone project we are currently migrating. It happens when trying to rename specific folders or when trying to delete them.
Has anyone an idea how to fix that or getting these objects deleted ignoring that error? We just wanna get rid of them. It does also not work in the Zope management interface. Or is there a tool which just scans the whole site and can detect these kind of errors? |
NicolasGoeddel wrote at 2020-7-2 08:55 -0700:
We've got exactly that problem on an old Plone project we are currently migrating. It happens when trying to rename specific folders or when trying to delete them.
```
2020-07-02 17:49:41 ERROR five.intid error return without exception set
Traceback (most recent call last):
File "/home/user/buildout-cache/eggs/five.intid-1.1.2-py2.7.egg/five/intid/intid.py", line 162, in moveIntIdSubscriber
uid = utility.getId(ob)
File "/home/user/buildout-cache/eggs/five.intid-1.1.2-py2.7.egg/five/intid/intid.py", line 44, in getId
return z3IntIds.getId(self, ob)
File "/home/user/buildout-cache/eggs/zope.intid-3.7.2-py2.7.egg/zope/intid/__init__.py", line 87, in getId
return self.ids[key]
SystemError: error return without exception set
```
Has anyone an idea how to fix that or getting these objects deleted ignoring that error? We just wanna get rid of them. It does also not work in the Zope management interface. Or is there a tool which just scans the whole site and can detect these kind of errors?
Maybe, the `BTrees` became physically damanged.
This should not happen but computers and hardware are only almost
(but not fully) reliable. In my life, I have met one such damaged `BTree`.
If you are lucky, then the sequence of leaves are still
accessible (--> `leaves = list(tree.items())`.
In this case, you can clear the tree and then recreate it from
its leaves (--> `tree.clear(); for i in leaves: tree[i[0]] = i[1]`).
|
Hi Dieter, I am not sure at which point I can access the BTrees to recreate and save them persistently. Usually I would inject |
NicolasGoeddel wrote at 2020-7-3 01:16 -0700:
I am not sure at which point I can access the BTrees to recreate and save them persistently. Usually I would inject `import pdb; pdb.set_trace()` right before the exception and look around the variables. I first will it test that way. If this does not work, I will come back here.
For fixups of this kind, I prefer the "interactive Zope session"
(i.e. `bin/{instance|client1} debug`) There, you can explore
the ZODB content and (if necessary) change it (and after a change test it).
Use "transaction.commit()" to make changes persistent.
|
Okay, I got rid of the folders making these problems. I used the debug mode but instead of trying to recreate BTrees I simply used So for my case it seems solved now. |
I've been going over these code paths (both the There is one exception for an "impossible" case: a tuple with a negative size. If we encounter such a tuple in If we do that, and someone can still reproduce this, then we can add some |
@gforcada and I are running into semi-rare weird error messages that seem to indicate that something in the BTrees can't handle issues when an object can't be loaded properly. This seems to be somewhat of a race condition around the C-level implementation of getitem, as many times the exception will occur around something like those lines of code:
Whenever this appears, either the Zope server is being shut down at the moment and ZEO has already disconnected, or the ZEO server has had a disconnect and immediately before those errors we see the ZEO client complaining:
One thing I'm wondering about is why there would be anything still processing data or requests if Zope already disconnected the database. My memory tells me that Zope would allow threads to finish their requests and then shut down.
So, from reading and googling the error message it seems somewhere the Python C API is signalled an error but no exception is set. I looked around a bit and a wild guess would be that this could be an issue from cPersistence in the PER_USE macro (it seems to signal an error condition but doesn't set an exception apparently) or by the _bucket_get function in BucketTemplate.c:86 where we return NULL indicating an error and seem to implictly rely on someone else already having set an exception. I could be digging at the completely wrong end, though ... :)
The text was updated successfully, but these errors were encountered: