Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1481338[details]
reproducer.pl
Description of problem:
Using the Net::FTP module, sometimes when retrieving a large number of files, closing the data connection fails with a "Timeout" error.
Version-Release number of selected component (if applicable):
perl-5.16.3-293.el7
How reproducible:
Not reliably. I've managed to reproduce it on non-x86_64 only (ppc64, ppc64le, aarch64).
Steps to Reproduce:
1. useradd foobar
2. echo foobar | passwd --stdin foobar
3. systemctl start vsftpd
4. ./reproducer.pl
Actual results:
The script exits with the following error:
Timeout at ./repro.pl line 21.
Expected results:
No timeout error. There doesn't even appear to be a reason it should timeout, all the iterations of the for loop take very little time.
Additional info:
This patch appears to fix the problem:
https://github.com/steve-m-hay/perl-libnet/commit/c37154d1b5c996
The close() call checks if there are more data pending in the FTP data connection to abort the connection if they are. The check is implemented by a nonblocking read and the nonblocking read starts with a nonblocking select() syscall and the result of the syscall depends on whether a kernel already processed the TCP close (returns "data are available") a or not (returns "no data are available").
The issue is that the non-blocking read actually does not implement non-blocking operations properly and evaluates unavailable data as a time out.
The linked patch indeed fixes the read() misuse. As it is well-tested fix we will apply it. However, upstream should have fixed it differently.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2020:0999