Red Hat Bugzilla – Bug 883002
curl used with file:// protocol opens and closes a destination file twice
Last modified: 2016-11-30 19:42:54 EST
+++ This bug was initially created as a clone of Bug #844385 +++ Description of problem: file_upload() function opens and closes the destination file twice. It causes two occurences of IN_CLOSE_WRITE inotify event. Version-Release number of selected component (if applicable): curl-7.24.0-4.fc17.src.rpm How reproducible: always Steps to Reproduce: 1. curl file:///tmp/testfile -T /etc/hosts Actual results: curl opens and closes the destination file twice Expected results: curl opens and closes destination file only once Additional info: source: lib/file.c line: 354 --- Additional comment from Kamil Dudka on 2012-07-30 15:06:41 CEST --- upstream commit: https://github.com/bagder/curl/commit/1f8518c --- Additional comment from Kamil Dudka on 2012-08-01 10:36:23 CEST --- fixed in curl-7.27.0-2.fc18 --- Additional comment from Fedora Update System on 2012-08-01 11:32:32 CEST --- curl-7.24.0-5.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/curl-7.24.0-5.fc17 --- Additional comment from Fedora Update System on 2012-08-02 00:26:24 CEST --- Package curl-7.24.0-5.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing curl-7.24.0-5.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-11375/curl-7.24.0-5.fc17 then log in and leave karma (feedback). --- Additional comment from Fedora Update System on 2012-08-10 01:26:22 CEST --- curl-7.24.0-5.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
ABRT uses inotify events to get notify about uploaded problem archives. When inotify event is received, ABRT unpacks an uploaded archive in the dump dir location and abrt-server starts its processing. The second inotify event causes that ABRT unpacks the uploaded archive again and abrt-server starts its processing again. Apart from wasting of disk space and cpu, double processing of a single problem leads to removal of all concurrently processed problems. Hence the second inotify event leads to loss of an uploaded archive. ABRT cannot keep list of processed archives because users can upload archives with a single name again. An enhancement of ABRT's architecture which can make ABRT capable to handle double occurrences of a single archive will be much more expensive than this well tested and isolated fix in curl.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
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://rhn.redhat.com/errata/RHSA-2015-1254.html