-
Notifications
You must be signed in to change notification settings - Fork 320
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
python 3.10 issue with RLock patcher existing locks #730
Comments
@arthurzam thank you very much. I think with that patch, following code would not touch any locks because it would expect
|
@temoto Oh, I see my mistake - instead of more "lock patching", I'm doing none. This means that the issue isn't in the place I reported, but in Lines 426 to 444 in 8904a33
Which is quite more logical now that I think about it, as the CPython patch that "broke" us has changed traversing. So my new guess is we have an issue with our Back to investigation... |
I was looking at all this again recently, and rediscovered #546 (i.e., I think py310 finally got the existing RLocks to show up in |
gc.get_referrers() returns nothing but lists and dicts, so previously we'd always trip a TypeError and skip patching. Closes eventlet#730
gc.get_referrers() returns nothing but lists and dicts, so previously we'd always trip a TypeError and skip patching. Closes eventlet#730
This was recently fixed. |
As reported at #715 (review)
I decided to bisect the CPython for the commit which broke this test. I have found this commit python/cpython@e30fe27 . When running the test suite, it passes on its parent commit, but fails on this commit (the same way it fails for released 3.10.0). Just as information, it was between 3.10.0_beta2 and 3.10.0_beta3.
Now, about how to fix it? Sadly I'm quite new to eventlet and I don't understand quite well the code here:
eventlet/eventlet/patcher.py
Lines 392 to 403 in 8904a33
But when I tested the types on multiple targets (py3.8, py3.9, py3.10, pypy7.3.5, pypy7.3.6) it always returned
_thread.RLock
fortype(threading.RLock())
.So just as a test, I tried to manually set
pyrlock_type = rlock_type
at line 398, and the specific test passed. Here is the diff.I will repeat that I have no idea if my change is even mildly correct. I just know it managed to make this test, and added no new regressions when all other tests were run. That is also the reason this isn't an Pull Request, and just an issue report.
My test environment is Gentoo, using
master
version of eventlet. Tested on CPython 3.8.12 and 3.9.7 (passes with and without the diff) and CPython 3.10.0 (needed the diff, but there were still other failures in other parts, even without the diff), and PyPy3-7.3.5 and PyPy3-7.3.6 (passes with and without the diff).The text was updated successfully, but these errors were encountered: