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
test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" #68913
Comments
====================================================================== Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_socket.py", line 2799, in testFDPassEmpty
len(MSG), 10240),
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_socket.py", line 1907, in doRecvmsg
result = sock.recvmsg(bufsize, *args)
OSError: [Errno 12] Cannot allocate memory ====================================================================== Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_socket.py", line 2799, in testFDPassEmpty
len(MSG), 10240),
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_socket.py", line 1998, in doRecvmsg
result = sock.recvmsg_into([buf], *args)
OSError: [Errno 12] Cannot allocate memory Ran 507 tests in 28.819s FAILED (errors=2, skipped=122) Same failures seen with 3.4.3 and 3.5.0b4 installers on 10.11 (El Capitan) Developer Previews 2 and 4. Passes on 10.10.x and earlier recent OS X systems. There have been other problems in this area on OS X in the past (see bpo-12958). Probably need to open a RADAR. |
I agree this needs a radar when it works on older releases of the OS and not on the 10.11 beta's. |
I'm still getting these test failures on OS X 10.11.1. Has a radar been filed with Apple? I'd submit one, but I don't know enough about the issue to create a good bug report. In the meantime, I'm attaching a patch to skip these tests as was done in issue bpo-12958. |
New changeset b4c6631737b3 by Brett Cannon in branch 'default': |
Thanks for the patch, Jeff! |
This issue slipped off the radar (so to speak) after being closed. For one, the tests also fail on 3.5.x (and probably earlier systems) and fail on macOS 10.12, not just 10.11. And, two, I'm not sure if anyone opened an issue with Apple about it. I'm re-opening it and assigning it to me to address those things. |
Ned Deily:
Did you report the bug to Apple? Any update? Should we just close the issue? |
The issue is still present with python 3.9 and macOS 10.15 as well as current macOS 11 betas. The following python scriptlet reproduces the issue: # --- import socket
sd1, sd2 = socket.socketpair() sd1.sendmsg([b"hello"], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, b"")]) I think the attached file "repro.c" does the same in C, it also fails with "recvmsg: Cannot allocate memory". I've filed an issue for this with Apple: FB8813140. I filed it from an Arm Mac system, with some luck this will help to get attention :-) |
The reproducer script and .c file I added earlier do not fail with "Cannot allocate memory" on macOS 12.0.1. I haven't checked yet if this is enough to avoid test failures in the (now skipped) testFDPassEmpty. |
This issue appears to be fixed in macOS 14 (haven't check macOS 13), tests pass without problems if I revert #1427 locally. My current plan is to test on macOS 13 as well and then create a PR that replaces the skip on macOS by |
You can use |
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: