You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" #68913
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:
assignee='https://github.com/ned-deily'closed_at=Nonecreated_at=<Date2015-07-26.07:35:31.721>labels= ['OS-mac', '3.8', '3.9', '3.10']
title='test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"'updated_at=<Date2021-11-30.16:44:35.098>user='https://github.com/ned-deily'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_socket.py", line 2799, in testFDPassEmptylen(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)
test test_socket failed
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.
jramnani commented on Nov 18, 2015
jramnanimannequin
Mannequin
More actions
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.
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.
changed the title [-]test_socket testFDPassEmpty fails on OS X 10.11 DP with "Cannot allocate memory"[/-][+]test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"[/+]on Jan 2, 2017
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.
Did you report the bug to Apple? Any update? Should we just close the issue?
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 requires_mac_ver(14) or requires_mac_ver(13) depending on the result.
Activity
ned-deily commentedon Jul 26, 2015
======================================================================
ERROR: testFDPassEmpty (test.test_socket.RecvmsgSCMRightsStreamTest)
----------------------------------------------------------------------
======================================================================
ERROR: testFDPassEmpty (test.test_socket.RecvmsgIntoSCMRightsStreamTest)
----------------------------------------------------------------------
Ran 507 tests in 28.819s
FAILED (errors=2, skipped=122)
test test_socket failed
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.
ronaldoussoren commentedon Jul 26, 2015
I agree this needs a radar when it works on older releases of the OS and not on the 10.11 beta's.
jramnani commentedon Nov 18, 2015
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.
python-dev commentedon Dec 29, 2015
New changeset b4c6631737b3 by Brett Cannon in branch 'default':
Issue bpo-24725: Skip the test_socket.testFDPassEmpty on OS X.
https://hg.python.org/cpython/rev/b4c6631737b3
brettcannon commentedon Dec 29, 2015
Thanks for the patch, Jeff!
ned-deily commentedon Jan 2, 2017
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.
[-]test_socket testFDPassEmpty fails on OS X 10.11 DP with "Cannot allocate memory"[/-][+]test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"[/+]vstinner commentedon May 3, 2017
New changeset 5e9c110 by Victor Stinner in branch '3.5':
bpo-24725: Skip the test_socket.testFDPassEmpty on OS X (bpo-1427)
5e9c110
vstinner commentedon Sep 11, 2017
Ned Deily:
Did you report the bug to Apple? Any update? Should we just close the issue?
ronaldoussoren commentedon Oct 19, 2020
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:
# ---
sd1.sendmsg([b"hello"], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, b"")])
sd2.recvmsg(1)
# ---
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 :-)
ronaldoussoren commentedon Nov 30, 2021
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.
ronaldoussoren commentedon Dec 7, 2023
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
requires_mac_ver(14)orrequires_mac_ver(13)depending on the result.vstinner commentedon Dec 7, 2023
You can use
@support.requires_mac_ver()decorator.