[issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments

2021-02-23 Thread cptpcrd
New submission from cptpcrd : TL;DR: subprocess.Popen's handling of file descriptors opened for DEVNULL or PIPE inputs/outputs has serious problems, and it can be coerced into leaking file descriptors in several ways. This can cause issues related to resource exhaustion. # The basic pr

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-21 Thread cptpcrd
cptpcrd added the comment: No problem! I've noticed at least one other (relatively minor) issue in `os`, so I may be submitting further bug reports. I haven't been keeping close track of 3.6/3.7's status, so I added them in without thinking it. Thanks f

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-20 Thread cptpcrd
Change by cptpcrd : -- pull_requests: +23101 pull_request: https://github.com/python/cpython/pull/24278 ___ Python tracker <https://bugs.python.org/issue42

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-20 Thread cptpcrd
Change by cptpcrd : -- pull_requests: +23100 pull_request: https://github.com/python/cpython/pull/24277 ___ Python tracker <https://bugs.python.org/issue42

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-08 Thread cptpcrd
Change by cptpcrd : -- pull_requests: +22999 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24172 ___ Python tracker <https://bugs.python.org/issu

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2021-01-05 Thread cptpcrd
cptpcrd added the comment: I've put together some tests (patch attached). Should I PR this to python/cpython? -- Added file: https://bugs.python.org/file49721/set-inheritable-test.patch ___ Python tracker <https://bugs.python.org/is

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2020-12-29 Thread cptpcrd
cptpcrd added the comment: > I like this approach! Should I put together unit tests to go with the patch? Maybe `test_os.FDInheritanceTests.test_set_inheritable_o_path()`? -- ___ Python tracker <https://bugs.python.org/issu

[issue42780] os.set_inheritable() fails for O_PATH file descriptors on Linux

2020-12-29 Thread cptpcrd
New submission from cptpcrd : Note: I filed this bug report after seeing https://github.com/rust-lang/rust/pull/62425 and verifying that it was also reproducible on Python. Credit for discovering the underlying issue should go to Aleksa Sarai, and further discussion can be found there