classification
Title: test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory"
Type: Stage: needs patch
Components: macOS Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: ned.deily Nosy List: baikie, brett.cannon, jramnani, ned.deily, python-dev, ronaldoussoren, vstinner
Priority: normal Keywords: patch

Created on 2015-07-26 07:35 by ned.deily, last changed 2017-09-11 22:12 by vstinner.

Files
File name Uploaded Description Edit
issue-24725.patch jramnani, 2015-11-18 16:44 review
Pull Requests
URL Status Linked Edit
PR 1427 merged vstinner, 2017-05-03 10:16
Messages (8)
msg247414 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2015-07-26 07:35
======================================================================
ERROR: testFDPassEmpty (test.test_socket.RecvmsgSCMRightsStreamTest)
----------------------------------------------------------------------
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

======================================================================
ERROR: testFDPassEmpty (test.test_socket.RecvmsgIntoSCMRightsStreamTest)
----------------------------------------------------------------------
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)
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 Issue12958).  Probably need to open a RADAR.
msg247416 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2015-07-26 08:52
I agree this needs a radar when it works on older releases of the OS and not on the 10.11 beta's.
msg254848 - (view) Author: Jeff Ramnani (jramnani) * Date: 2015-11-18 16:44
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 #12958.
msg257153 - (view) Author: Roundup Robot (python-dev) Date: 2015-12-29 01:18
New changeset b4c6631737b3 by Brett Cannon in branch 'default':
Issue #24725: Skip the test_socket.testFDPassEmpty on OS X.
https://hg.python.org/cpython/rev/b4c6631737b3
msg257154 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-12-29 01:18
Thanks for  the patch, Jeff!
msg284474 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-01-02 08:09
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.
msg292893 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 12:11
New changeset 5e9c1101924bacf3ead03124b5c1e48551638360 by Victor Stinner in branch '3.5':
bpo-24725: Skip the test_socket.testFDPassEmpty on OS X (#1427)
https://github.com/python/cpython/commit/5e9c1101924bacf3ead03124b5c1e48551638360
msg301916 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-09-11 22:12
Ned Deily:
> 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?
History
Date User Action Args
2017-09-11 22:12:19vstinnersetmessages: + msg301916
2017-05-03 12:11:37vstinnersetnosy: + vstinner
messages: + msg292893
2017-05-03 10:17:00vstinnerlinkissue30201 superseder
2017-05-03 10:16:42vstinnersetpull_requests: + pull_request1532
2017-01-02 08:09:54ned.deilysetstatus: closed -> open

assignee: ned.deily
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"
resolution: fixed ->
versions: - Python 3.4
messages: + msg284474
stage: resolved -> needs patch
2015-12-29 01:18:49brett.cannonsetstatus: open -> closed
resolution: fixed
messages: + msg257154

stage: resolved
2015-12-29 01:18:31python-devsetnosy: + python-dev
messages: + msg257153
2015-12-27 21:07:58brett.cannonsetnosy: + brett.cannon
2015-11-18 16:44:18jramnanisetfiles: + issue-24725.patch

nosy: + jramnani
messages: + msg254848

keywords: + patch
2015-08-02 20:43:32baikiesetnosy: + baikie
2015-07-26 08:52:38ronaldoussorensetmessages: + msg247416
2015-07-26 07:35:31ned.deilycreate