classification
Title: os.set_inheritable() looks to be broken on OpenIndiana, regression of Python 3.6
Type: Stage: resolved
Components: Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: jcea, ned.deily, vstinner
Priority: deferred blocker Keywords:

Created on 2016-08-24 09:57 by vstinner, last changed 2017-06-28 01:05 by vstinner. This issue is now closed.

Messages (4)
msg273544 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-08-24 09:57
On Python 3.5, it seems ok:
---
test_get_inheritable_cloexec (test.test_socket.InheritanceTest) ... ok
test_set_inheritable (test.test_socket.InheritanceTest) ... ok
test_set_inheritable_cloexec (test.test_socket.InheritanceTest) ... ok
---
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.5/builds/1159/steps/test/logs/stdio

But not on on Python 3.6:
======================================================================
FAIL: test_get_set_inheritable (test.test_os.FDInheritanceTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", line 2723, in test_get_set_inheritable
    self.assertEqual(os.get_inheritable(fd), True)
AssertionError: False != True

======================================================================
FAIL: test_openpty (test.test_os.FDInheritanceTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", line 2796, in test_openpty
    self.assertEqual(os.get_inheritable(master_fd), False)
AssertionError: True != False

======================================================================
FAIL: test_set_inheritable_cloexec (test.test_os.FDInheritanceTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", line 2747, in test_set_inheritable_cloexec
    0)
AssertionError: 1 != 0

----------------------------------------------------------------------
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/11800/steps/test/logs/stdio
msg273545 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-08-24 09:59
Hum, the main difference between Python 3.5 and 3.6 is this optimization:

changeset:   101039:d268f108ba80
user:        Victor Stinner <victor.stinner@gmail.com>
date:        Sun Apr 17 16:51:52 2016 +0200
files:       Python/fileutils.c
description:
Avoid fcntl() if possible in set_inheritable()

Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
is already set/cleared. This change only impacts platforms using the fcntl()
implementation of set_inheritable() (not Linux nor Windows).
msg282489 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-12-06 00:20
Although Victor initiated some discussions on python-dev about support for OpenIndiana and other Solaris-related derivatives, I don't we ever reached a consensus, no one has proposed a solution, and currently the OpenIndiana 3.6 buildbot is not functioning well (I've pinged the owner).  I am not willing to hold 3.6.0 for a resolution.  Let's come back to this later.

https://mail.python.org/pipermail/python-dev/2016-September/146538.html
msg297099 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-28 01:05
I'm not interested to work on OpenIndiana, and I consider that we should just remove the OpenIndiana buildbot, so I abandon this issue.
History
Date User Action Args
2017-06-28 01:05:54vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg297099

stage: resolved
2016-12-06 00:21:43ned.deilysetnosy: + jcea
2016-12-06 00:20:24ned.deilysetpriority: release blocker -> deferred blocker

messages: + msg282489
versions: + Python 3.7
2016-08-24 09:59:17vstinnersettitle: os.set_inheritable() looks to be broken on OpenIndiana -> os.set_inheritable() looks to be broken on OpenIndiana, regression of Python 3.6
2016-08-24 09:59:09vstinnersetpriority: normal -> release blocker
nosy: + ned.deily
2016-08-24 09:59:03vstinnersetmessages: + msg273545
2016-08-24 09:57:23vstinnercreate