[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington

miss-islington  added the comment:


New changeset 622a824802771fc5aa133ae92101bc8303360294 by Miss Islington (bot) 
in branch '3.7':
bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)
https://github.com/python/cpython/commit/622a824802771fc5aa133ae92101bc8303360294


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington

miss-islington  added the comment:


New changeset ef0bb5c7b76a49a5f3c5b85b5f9112cfefe54328 by Miss Islington (bot) 
in branch '3.6':
bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)
https://github.com/python/cpython/commit/ef0bb5c7b76a49a5f3c5b85b5f9112cfefe54328


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5537

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread miss-islington

Change by miss-islington :


--
pull_requests: +5538

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread Zachary Ware

Zachary Ware  added the comment:


New changeset 5537646bfacec463b450871dde31cb06c44a0556 by Zachary Ware in 
branch 'master':
bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)
https://github.com/python/cpython/commit/5537646bfacec463b450871dde31cb06c44a0556


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-02-19 Thread Zachary Ware

Change by Zachary Ware :


--
pull_requests: +5536

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-01-09 Thread STINNER Victor

STINNER Victor  added the comment:

> Oops, I merged the pull requests, but I forgot to close the issue.

Oops, I forgot to close the issue, again... Thanks Segev for closing it, 
finally :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2018-01-09 Thread Segev Finer

Change by Segev Finer :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-12-18 Thread STINNER Victor

STINNER Victor  added the comment:

Oops, I merged the pull requests, but I forgot to close the issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-21 Thread STINNER Victor

STINNER Victor added the comment:

Python 2.7 doesn't seem to be affected by this issue. Extract of Popen.__init__:

try:
self._execute_child(args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell, to_close,
p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite)
except Exception:
# Preserve original exception in case os.close raises.
exc_type, exc_value, exc_trace = sys.exc_info()

for fd in to_close:
try:
if mswindows:
fd.Close()
else:
os.close(fd)
except EnvironmentError:
pass

On Windows, fd.Close() is always used.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e76cb435563cd14bb085942dfefbb469b8f40aa9 by Victor Stinner in 
branch '3.6':
[3.6] bpo-30121: Fix debug assert in subprocess on Windows (#1224) (#3173)
https://github.com/python/cpython/commit/e76cb435563cd14bb085942dfefbb469b8f40aa9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-21 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3209

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-21 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 9a83f651f31b47b3f6c8b210f7807b26e8c373a5 by Victor Stinner in 
branch 'master':
Add test_subprocess.test_nonexisting_with_pipes() (#3133)
https://github.com/python/cpython/commit/9a83f651f31b47b3f6c8b210f7807b26e8c373a5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-18 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3167

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-18 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 4d3851727fb82195e4995c6064b0b2d6cbc031c4 by Victor Stinner (Segev 
Finer) in branch 'master':
bpo-30121: Fix debug assert in subprocess on Windows (#1224)
https://github.com/python/cpython/commit/4d3851727fb82195e4995c6064b0b2d6cbc031c4


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-17 Thread STINNER Victor

STINNER Victor added the comment:

See https://github.com/python/cpython/pull/1224 and 
http://bugs.python.org/issue30121

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-08-17 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I determined in #31228 (also on Windows, closed as a duplicate) that a debug 
build, bad file, and subprocess.PIPE are all required.  Has this been tried on 
non-Windows?  I confirmed the crash on 3.6.  I do not have a 2.7 repository 
build.

The two lines above constitute a unittest that currently fails  on a Windows 
debug build.  Even if there is no such buildbot, I think a test should be added 
that will fail on developer machines with such builds.  It should be skipped on 
non-debug and perhaps non-Windows machines.

--
nosy: +terry.reedy
stage:  -> patch review
type: behavior -> crash
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-20 Thread Segev Finer

Changes by Segev Finer :


--
pull_requests: +1346

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-20 Thread Segev Finer

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com