Bug 1849069

Summary: libssh ssh_channel_read() randomly returns error
Product: [Fedora] Fedora Reporter: Anderson Sasaki <ansasaki>
Component: libsshAssignee: Anderson Sasaki <ansasaki>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ansasaki, asn, jfch, negativo17, rdieter, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libssh-0.9.4-3.fc32 libssh-0.9.4-3.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-04 01:12:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anderson Sasaki 2020-06-19 14:28:30 UTC
Description of problem:

The client may return error after successfully reading all data available from the server. Depending on the time the client detects the server closed the channel, it may return an error.

Version-Release number of selected component (if applicable):
libssh-0.9.4-2

How reproducible:
non-deterministic (depends on a race-condition)

Steps to Reproduce:
1. Compile exec example application available in libssh upstream repository: https://gitlab.com/libssh/libssh-mirror/-/blob/master/examples/exec.c
2. Start sshd and run the exec example application

Actual results:
Sometimes the exec example exits returning 1 for error instead of zero for success.

Expected results:
The exec example always returns zero for success

Additional info:
When libssh client is configured to be verbose, the following error message is printed to the log:

ssh_channel_read_timeout:  Remote channel is closed.

To configure libssh client to be verbose, run:

$ echo "LogLevel VERBOSE" >> ~/.ssh/config

Comment 1 Anderson Sasaki 2020-06-19 14:31:20 UTC
This bug was originally reported in https://bugs.libssh.org/T231

Comment 2 Fedora Update System 2020-06-24 12:14:08 UTC
FEDORA-2020-cecb600a30 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-cecb600a30

Comment 3 Fedora Update System 2020-06-24 12:15:06 UTC
FEDORA-2020-10ae0b41b9 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-10ae0b41b9

Comment 4 Fedora Update System 2020-06-25 00:58:18 UTC
FEDORA-2020-cecb600a30 has been pushed to the Fedora 31 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-cecb600a30`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-cecb600a30

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2020-06-25 01:03:43 UTC
FEDORA-2020-10ae0b41b9 has been pushed to the Fedora 32 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-10ae0b41b9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-10ae0b41b9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-07-04 01:12:02 UTC
FEDORA-2020-10ae0b41b9 has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-07-10 01:00:48 UTC
FEDORA-2020-cecb600a30 has been pushed to the Fedora 31 stable repository.
If problem still persists, please make note of it in this bug report.