This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE
Type: crash Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Windows: subprocess debug assertion on failure to execute the process
View: 30121
Assigned To: Nosy List: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2017-08-17 17:28 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg300445 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-17 17:28
Running Debug|Win32 interpreter...
Python 3.7.0a0 (heads/master:b907abc885, Aug 17 2017, 11:41:56) [MSC v.1900 32 bit (Intel)] on win32

I get the following crash report
--------------------------------------------------------------
Microsoft Visual C++ Runtime Library
(X) Debug Assertion Failed!
Program: F:\dev\3x\PCBuild\win32\python_d.exe
File: minkernel\crts\ucrt\src\appcrt\lowio\close.cpp
Line: 48

Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle
...
(Press Retry to debug the application)
----------------------------------------------------------------

when running the following, extracted from test.pythoninfo

import subprocess
proc = subprocess.Popen(["gdb", "-nx", "--version"],
                        stdout=subprocess.PIPE,
                        stderr=subprocess.PIPE,
                        universal_newlines=True)

If I do any of the following, I get the expected FileNotFound error.
1. Run with installed normal 64-bit 3.6.
2. Replace 'gdb' with 'python' (but 'xyz' still crashes).
3. Remove the std... options or replace subprocess.PIPE with a real file.
msg300447 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-17 17:36
Appveyor ran pythoninfo successfully on its normal 32-bit build.
https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.5381
History
Date User Action Args
2022-04-11 14:58:50adminsetgithub: 75411
2017-08-17 18:52:45eryksunsetstatus: open -> closed
superseder: Windows: subprocess debug assertion on failure to execute the process
resolution: duplicate
stage: needs patch -> resolved
2017-08-17 17:36:23terry.reedysetmessages: + msg300447
2017-08-17 17:28:25terry.reedycreate