Skip to content

Question about usage with su/interactive session debugging #714

Answered by ronf
isamu-isozaki asked this question in Q&A
Discussion options

You must be logged in to vote

I think your problem here might be the use of read() with no argument. That will block waiting for the remote system to return EOF, which won't happen on an interactive shell if you haven't closed stdin. If you pass in a maximum read size, it will return as soon as any data is sent (up to the max bytes you requested).

In terms of debugging, I see you are already adding in print statements. You can add more to narrow down exactly which call it is blocking on, and then start to dig into why. You can also turn on AsyncSSH debugging to see the actual messages being sent and received on the network. Enabling that would look something like:

import logging
logging.basicConfig(level='DEBUG')
asyn…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@isamu-isozaki
Comment options

Answer selected by isamu-isozaki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants