Bug 123708 - (PATCH) rsync crash transferring file list
(PATCH) rsync crash transferring file list
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: rsync (Show other bugs)
2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jay Fenlason
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-05-20 03:32 EDT by Mark McLoughlin
Modified: 2014-08-31 19:26 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.6.2-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-25 15:38:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
backtrace (9.15 KB, text/plain)
2004-05-20 03:34 EDT, Mark McLoughlin
no flags Details
patch (1.09 KB, patch)
2004-05-20 05:14 EDT, Mark McLoughlin
no flags Details | Diff
backport of upstream fix (543 bytes, patch)
2004-05-25 02:52 EDT, Mark McLoughlin
no flags Details | Diff
spec file patch (1.33 KB, patch)
2004-05-25 02:54 EDT, Mark McLoughlin
no flags Details | Diff

  None (edit)
Description Mark McLoughlin 2004-05-20 03:32:29 EDT
With a directory hierarchy in which a number of files had been
deleted, I found this crashed:

$> rsync -avrz -pot -e ssh --delete --existing
markmc@172.31.0.5:/photos/* .

This is a fresh install of FC2 - rsync-2.6.2-0. Attaching a backtrace.

I've kept a copy of the directory hierarchy causing the crash, but I
haven't found a simple isolated test case yet.
Comment 1 Mark McLoughlin 2004-05-20 03:34:38 EDT
Created attachment 100369 [details]
backtrace
Comment 2 Mark McLoughlin 2004-05-20 05:13:01 EDT
Test case:

mkdir /tmp/sync-from
mkdir /tmp/sync-from/test1
mkdir /tmp/sync-from/test2
> /tmp/sync-from/test1/a
> /tmp/sync-from/test2/a
mkdir /tmp/sync-to
cd /tmp/sync-to
rsync -av --delete localhost:/tmp/sync-from/* .
rsync -av --delete localhost:/tmp/sync-from/* .


Problem is that we rebuild the file_list for each of test1 and test2,
but "lastdir" in make_file() still points to the freed file_list of test1.

Attaching a patch that invalidates lastdir when freeing the file_list.
Comment 3 Mark McLoughlin 2004-05-20 05:14:29 EDT
Created attachment 100370 [details]
patch
Comment 4 Mark McLoughlin 2004-05-25 02:51:24 EDT
I've checked upstream and the bug is fixed there with a simpler fix.
Attaching a backport.
Comment 5 Mark McLoughlin 2004-05-25 02:52:59 EDT
Created attachment 100529 [details]
backport of upstream fix
Comment 6 Mark McLoughlin 2004-05-25 02:54:58 EDT
Created attachment 100530 [details]
spec file patch
Comment 7 Mark McLoughlin 2004-05-25 15:38:02 EDT
Fix is in rawhide and FC2 updates:

* Tue May 25 2004 Mark McLoughlin <markmc@redhat.com> - 2.6.2-1
- Backport fix for crasher when passing multiple directories of the same
  length (bug #123708)

Note You need to log in before you can comment on or make changes to this bug.