Bug 123708

Summary: (PATCH) rsync crash transferring file list
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: rsyncAssignee: Jay Fenlason <fenlason>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: jfeeney
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.2-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-05-25 19:38:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
backtrace
none
patch
none
backport of upstream fix
none
spec file patch none

Description Mark McLoughlin 2004-05-20 07:32:29 UTC
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.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 07:34:38 UTC
Created attachment 100369 [details]
backtrace

Comment 2 Mark McLoughlin 2004-05-20 09:13:01 UTC
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 09:14:29 UTC
Created attachment 100370 [details]
patch

Comment 4 Mark McLoughlin 2004-05-25 06:51:24 UTC
I've checked upstream and the bug is fixed there with a simpler fix.
Attaching a backport.

Comment 5 Mark McLoughlin 2004-05-25 06:52:59 UTC
Created attachment 100529 [details]
backport of upstream fix

Comment 6 Mark McLoughlin 2004-05-25 06:54:58 UTC
Created attachment 100530 [details]
spec file patch

Comment 7 Mark McLoughlin 2004-05-25 19:38:02 UTC
Fix is in rawhide and FC2 updates:

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