[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-06 Thread l4mer
New submission from l4mer : I am using ssh mux + authorized key. So can exectute commands without passwod. 1. disconnect mux by: ssh user@localhost -O exit 2. run simple script import subprocess if __name__ == '__main__': cmd = ["ssh", "user@localhost&quo

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-06 Thread l4mer
l4mer added the comment: yes, works perfectly when omit stderr=subprocess.STDOUT no matter if mux exists. Also from bash: ssh user@locahost id always works. Problem exists only when stderr=subprocess.STDOUT and no MUX yet. BTW, first connection create a MUX - but this seems to be an

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-06 Thread l4mer
l4mer added the comment: BTW, when you will check point 3 you will notice that we already read id output, so command execute correctly: "uid=0(root" ... And problem is after that. Steps I reproduce this issue: - standard user have keys and in ~/.ssh/config Host * ControlM

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-07 Thread l4mer
l4mer added the comment: janusz@nc6120:~$ ssh -V OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016 janusz@nc6120:~$ I) manual check janusz@nc6120:~$ ssh root@localhost -p 50494 -O exit janusz@nc6120:~$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-07 Thread l4mer
l4mer added the comment: I) Manual test for subprocess32: janusz@nc6120:~$ python Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> impo

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-07 Thread l4mer
l4mer added the comment: Interesting when using faster machine with newer ssh don't see this problem :) janusz@t560:~$ ssh -V OpenSSH_7.3p1 Ubuntu-1ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016 janusz@t560:~$ ssh root@localhost -O exit; strace python test.py getrlimit(RLIMIT_NOFILE, {rlim_cur

[issue31712] subprocess with stderr=subprocess.STDOUT hang

2017-10-07 Thread l4mer
l4mer added the comment: confirm, OpenSSH_7.3p1 solve the problem. Thanks for help. -- resolution: -> third party status: -> closed ___ Python tracker <https://bugs.python.org/i