-
Notifications
You must be signed in to change notification settings - Fork 939
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
Patch libev and c-ares configure scripts for M1 #1828
Conversation
M1 uses arm64 as a cpu identifier. This is not understood by the two configure scripts, but appears to work when patched.
hmm ... looks like pypi is no longer available on bitbucket to download...
|
Update the appveyor download url for pypi2.7-v7.3.1
This updates the config.sub and config.guess files for libev and c-ares to the versions that are packaged with automake 1.16.5. This pulls in a version compatible with Apples aarch64 chip.
It looks like something changed in Python 3.9.7 around threading and interpreter shutdown that's causing a test to fail. (The same test passes in 3.9.7.) Not the fault of this PR, of course. |
hmm .. I'm getting a crash in 3.8.12 locally:
|
An ancient (2006) Python bug involving threads and shutdown was fixed for 3.9 and eventually for 3.10. But the fix is incompatible with gevent, which also has to manage threads and shutdown carefully. It'll take some looking to figure out a fix.
First, thanks for being willing to run them! I've seen A couple of things to try:
If the first one works, or you get interesting output from the second, please let us know. |
@jamadden my team is using gevent with Python 3.9 on x86 machines and things appear to be working fine. Is there some issue that we are not noticing? |
It has to do with the interactions between gevent and multiple native threads. The manifestation in the test suite is that the test that monkey-patches from a non-main thread hangs on 3.9.8 and above when the interpreter tries to exit; you have to kill it with ctrl-C. $ python -u -mgevent.tests.test__threading_monkey_in_thread
.
----------------------------------------------------------------------
Ran 1 test in 0.236s
OK
^CException ignored in: <module 'threading' from '//3.9/lib/python3.9/threading.py'>
Traceback (most recent call last):
File "//3.9/lib/python3.9/threading.py", line 1470, in _shutdown
lock.acquire()
KeyboardInterrupt: In the past, gevent has had to special-case some things around this, in part to workaround the bug that just got fixed in CPython. But just disabling that workaround doesn't fix the test. |
On running tests: Running
This is on an M1 running Monterey. Should I expect different? Should 837 test have been skipped? |
Should this patch fix the If I install via |
No, this patch has nothing to do with CFFI. gevent has no control over CFFI. However, since you were able to build gevent and run the tests, presumably the updated CFFI that was installed solves the problem. |
Thanks everyone! I'll deal with the 3.9.8 issue separately. |
yes, but the CFFI issue linked to this one.
See my details on the other issue. I hope they’re useful. |
They're not particularly helpful, no. They're out of context, you don't specify any details around when you get that error or with what CFFI version. But since above you said you built gevent and ran the tests, I can only assume that the newer CFFI version fixed it. |
M1 uses arm64 as a cpu identifier. This is not understood
by the two configure scripts, but appears to work when patched.
Possible fix for #1721