Skip to content

Conversation

@sathishsms
Copy link

Hi @mihaiparvu ,
issue_347_observation.docx

Scripts used:

scripts.zip

Steps to run the script:

  1. Place the large.html in any of the remote ssh machine under /tmp/ directory
  2. Provide the ip, username & credentials in test.py
host = "[email protected]"
username = "foo"
password = "bar"
  1. Run the robot command
    robot .\ssh_lib_test.robot

we have tested it in windows, linux & macintosh the results are consistent
• As an alternative we tried
taskset -c 0 time robot ssh_lib_test.robot
• Also, we tried inside docker with alpine linux same issue appears.

Ssh Lib Test                                                          | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================`
Output:  /opt/vntaf/output.xml
Log:     /opt/vntaf/log.html
Report:  /opt/vntaf/report.html
Command exited with non-zero status 1
real    0m 31.96s
user    0m 30.62s
sys     0m 0.09s

Observations in our system:

  1. First option tried: To include time.sleep(0.00001) or time.sleep(0) in _read_until function of abstractclient.py(SSHLibrary) --- Didn’t work
  2. Changed the SSHLibrary.pythonclient.Shell.read_byte to 500 – Works but not sure whether a proper solution
    def read(self):
        data = b''
        while self._output_available():
            data += self._shell.recv(4096)
        return data

    def read_byte(self):
         if self._output_available():
            return self._shell.recv(5000)
         return b''

Regards,
Sathish

freddebacker and others added 4 commits May 19, 2020 21:12
This should release the Python Gobal Interpreter Lock once per iteration, so the I/O bound paramiko thread get's a chance to run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants