Skip to content
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: return without exception set when attempting to load an oid #91

Closed
cguardia opened this issue Jun 12, 2018 · 4 comments
Closed

Comments

@cguardia
Copy link

cguardia commented Jun 12, 2018

We are getting a SystemError where a POSKeyError should be raised, probably due to the exception not being set in the C code. Here is an example traceback (data is an OOBTree):

>>> data.get(u'photo', None)
2018-05-25 18:19:20,336 WARNI [relstorage][MainThread] POSKeyError on oid 57955827: no tid found; history-free adapter
2018-05-25 18:19:20,337 ERROR [ZODB.Connection][MainThread] Couldn't load state for BTrees.OOBTree.OOBTree 0x037455f3
Traceback (most recent call last):
 File "/srv/osfkarl/.buildout/eggs/cp27mu/ZODB-5.2.0-py2.7.egg/ZODB/Connection.py", line 796, in setstate
   p, serial = self._storage.load(oid)
 File "/srv/osfkarl/.buildout/eggs/cp27mu/perfmetrics-2.0-py2.7.egg/perfmetrics/__init__.py", line 127, in call_with_metric
   return f(*args, **kw)
 File "/srv/osfkarl/.buildout/eggs/cp27mu/RelStorage-2.1a2-py2.7-linux-i686.egg/relstorage/storage.py", line 587, in load
   raise POSKeyError(oid)
POSKeyError: 0x037455f3
Traceback (most recent call last):
 File "<console>", line 1, in <module>
SystemError: error return without exception set

This is very similar to #82, but since this is a POSKeyError it might come from a different place in the C code. Or it could be this is just a duplicate. The difference with the other issue is that there is no client disconnect involved.

@jamadden
Copy link
Member

jamadden commented Apr 6, 2021

Is this something that you can still reproduce?

I'm having difficulty reproducing it with BTrees 4.8, persistent 4.6.4 and ZODB 5.5.1. With the script I added in #161, I can delete either the root of the BTree or some/all of its internal nodes. If the root is deleted, the POSKeyError is percolated to the caller of get; if internal nodes are deleted, the POSKeyError is logged, but get returns cleanly. (Tested both 2.7 and 3.8.)

@cguardia
Copy link
Author

cguardia commented Apr 6, 2021

Original application is dead, so not the exact same conditions, but a simple attempt at reproducing gave me the same results as yours, so I guess the issue is gone.

@cguardia cguardia closed this as completed Apr 6, 2021
@jamadden
Copy link
Member

jamadden commented Apr 6, 2021

Thanks for responding! Dormant issues like this rarely get all the help you gave.

@jamadden
Copy link
Member

jamadden commented Apr 6, 2021

I am still worried about #82 but I also can’t reproduce that. There are a lot of places that could go wrong, but by inspection I’m not finding a problem.

To anyone finding this in the future, please file a new issue with a reproducible scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants