◐ Shell
reader mode source ↗
Skip to content

bpo-38692: Add os.pidfd_open.#17063

Merged
benjaminp merged 1 commit into
python:masterfrom
benjaminp:expose-pidfd_open
Nov 6, 2019
Merged

bpo-38692: Add os.pidfd_open.#17063
benjaminp merged 1 commit into
python:masterfrom
benjaminp:expose-pidfd_open

Conversation

@benjaminp

@benjaminp benjaminp commented Nov 5, 2019

Copy link
Copy Markdown
Contributor

@1st1

1st1 commented Nov 5, 2019

Copy link
Copy Markdown
Member

Thanks for working on this, Benjamin.

@njsmith

njsmith commented Nov 5, 2019

Copy link
Copy Markdown
Contributor

How are you testing this? AFAICT it's not currently possible to run a pidfd-supporting kernel in any of the hosted CI services. (Except maybe via User-Mode Linux, which I've seriously considered, but it's non-trivial.) Has anyone checked whether we have a buildbot running a new enough kernel? Having some kind of CI coverage seems important.

@benjaminp

Copy link
Copy Markdown
Contributor Author

I'm running a 5.3 kernel locally. The lack of CI is indeed troubling, but I expect it to be a temporary situation on the order of months. The next Ubunu LTS 20.04 will presumably support pidfds. I'm hoping CI will be available before 3.9 is released.

@vstinner

vstinner commented Nov 5, 2019

Copy link
Copy Markdown
Member

I checked AMD64 Fedora Rawhide 3.x buildbot: it runs Linux 5.4 (release 5.4.0-0.rc5.git0.1.fc32.x86_64).

@benjaminp

Copy link
Copy Markdown
Contributor Author

Sweet, sounds like we're all set then.

@benjaminp benjaminp merged commit 6c4c45e into python:master Nov 6, 2019
@benjaminp benjaminp deleted the expose-pidfd_open branch November 6, 2019 03:21
@vstinner

vstinner commented Nov 6, 2019

Copy link
Copy Markdown
Member

Perfect, thanks ;-)

@hroncok

hroncok commented Nov 20, 2019

Copy link
Copy Markdown
Contributor

Just a heads up: In Fedora, I am getting:

======================================================================
FAIL: test_pidfd_open (test.test_posix.PosixTester)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.9.0a1/Lib/test/test_posix.py", line 1479, in test_pidfd_open
    self.assertEqual(cm.exception.errno, errno.EINVAL)
AssertionError: 1 != 22

----------------------------------------------------------------------

When building Python 3.9.0a1. I'm still investigating as I can only get the problem in local chroot, but not in the remote build system.

EDIT: The remote build system has an older kernel.

https://bugzilla.redhat.com/show_bug.cgi?id=1774417#c2

@njsmith

njsmith commented Nov 20, 2019

Copy link
Copy Markdown
Contributor

Sounds like you're using some kind of buggy sandbox that's returning EPERM for unrecognized syscalls: https://bugs.python.org/issue38692#msg356235

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants