New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race between command launch and tty initialization #1673
Comments
I tried to reproduce this with both paramiko 2.4.1 under python2.7 and paramiko. 2.7.1 under python 3.7, and could not, even with no I added:
before any paramiko calls, and added a log message just prior to sending the
I'm suspecting on your failures, the send is occurring before the session channel is fully opened (or acknowledged), as part of that is managed by the Transport thread. |
Here is the debug output after removing
I have to add that the remote target is a Raspberry. It is probably slow to process the data. And indeed, if I connect to a more powerful host, the problem does not appears. Also note that I use paramiko 2.7.1 with python 3 on Debian 11 (Bullseye). |
That looks okay from the client/paramiko side - I did just try the test program against my RaspberryPi (3B+) and did not have the timing issue that you get. |
I tried to run
So the problem would be on the remote side. |
My scenario is this one:
recv_exit_status()
return immediately. However, if I removetime.sleep(0.5)
,recv_exit_status()
return after 20sec.Note that if I replace
sleep
bycat
,cat
receive the character\x03
instead of receiving the signal interrupt.There is a race somewhere, but I can't say if it is in paramiko or in the remote shell.
The text was updated successfully, but these errors were encountered: