New submission from Segev Finer: subprocess triggers a debug assertion in the CRT on failure to execute the process due to closing the pipe *handles* in the except clause using os.close rather than .Close() (os.close closes CRT file descriptors and not handles).
In addition to that once this is fixed there is also a double free/close since we need to set `self._closed_child_pipe_fds = True` once we closed the handles in _execute_child so they won't also be closed in __init__. To reproduce, do this in a debug build of Python: import subprocess subprocess.Popen('exe_that_doesnt_exist.exe', stdout=subprocess.PIPE) See: https://github.com/python/cpython/pull/1218#discussion_r112550959 ---------- components: Library (Lib), Windows messages: 292002 nosy: Segev Finer, eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows: subprocess debug assertion on failure to execute the process type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30121> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com