[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-12 Thread Clint Olsen
Clint Olsen added the comment: Yes, I tried FastChildWatcher and I've had much better luck with that. If any exception gets thrown we _know_ for certain that the process wasn't created. -- ___ Python tracker

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-12 Thread Andrew Svetlov
Andrew Svetlov added the comment: Yes, your environment is clear. As I see from traceback, you are stuck not with new process creation but with new thread starting. The thread is used for waiting for the started process to finish. It is the default configuration. Maybe you need an

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-11 Thread Clint Olsen
Clint Olsen added the comment: In a multi-user environment, you should not expect to be able to spawn infinite processes. In some cases system administrators have reduced the thresholds to values that guarantee a machine is still responsive under heavy load. See limits.conf(5) as an

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-11 Thread Andrew Svetlov
Andrew Svetlov added the comment: What do you mean by *process-limited environment*? It is very unusual configuration IMHO. -- ___ Python tracker ___

[issue46335] asyncio.create_subprocess_exec throws RuntimeError yet still executes subprogram

2022-01-10 Thread Clint Olsen
New submission from Clint Olsen : When stress testing my code in a process-limited environment I found that despite throwing an exception, it appears the process still executes. Attempting to catch/retry results in a duplicate. Attached is a script that I was able to repro the problem on