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
urllib.urlopen crashes in a thread on Snow Leopard #51100
Comments
The following program works fine under Mac OS 10.5.x. But in 10.6, it The crash seems to happen any time urllib.urlopen is done in a thread. #!/usr/bin/python
import threading, urllib
class MyThread (threading.Thread):
def run(self):
c = urllib.urlopen("http://www.google.com") MyThread().start() |
It seems that CoreFoundation doesn't like being loaded on a secondairy #0 0x00007fff8301bb90 in __CFInitialize () |
This probably means that the ctypes code in urllib.py needs to be ported Doing that would be a good idea anyway, while trying to create a In 32-bit mode you can avoid the crash by calling urllib.urlopen or |
Agreed this should be a release blocker for 2.6.3 |
The attached patch seems to fix the issue, but needs further testing. Warning: the patch is not entirely clean, the patch contains an The patch replaces some code that uses ctypes to read configuration data With this patch the crasher goes away, I still have to do more testing The patch is for the trunk, I expect it will cleanly port to 2.6. It |
The attached patch was not 100% correct in the error handling in the Committed as r74962 (trunk), r74963 (2.6). |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: