Bug 4957 - rsync with acl patch crashes with fuzzy option
Summary: rsync with acl patch crashes with fuzzy option
Status: RESOLVED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 2.6.9
Hardware: x64 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-06 19:40 UTC by Ruediger Oertel
Modified: 2007-09-10 21:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ruediger Oertel 2007-09-06 19:40:20 UTC
#rm -r test1 test2
#mkdir test1
#echo foo > test1/t
#rsync --acls --fuzzy -a test1 test2
(first one works)
#rsync --acls --fuzzy -a test1 test2
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(453) [sender=2.6.9]

#dmesg | tail -n 1
rsync[32093] trap stack segment rip:41d89f rsp:7fff3c9e8e90 error:0
Comment 1 Ruediger Oertel 2007-09-07 03:37:51 UTC
since the subject may be a bit cryptic:
this happens with plain 2.6.8 / 2.6.9 plus the acl patch applied,
I've been able to narrow it down that far. (other patches can be applied
but are not necessary to reproduce the problem).
Comment 2 Ruediger Oertel 2007-09-07 06:02:44 UTC
at least in 2.6.8+acl_patch, this seems to cure the problem:
--- acls.c
+++ acls.c
@@ -455,7 +455,7 @@
        do {
                int index;
                rsync_acl_list *racl_list = rsync_acl_lists(type);
-               if (f == -1) {
+               if (f == -1 || f == -2) {
                        rsync_acl_free(curr_racl);
                        continue;
                }

not sure if this is the correct solution though.

for 2.6.9 I have no idea yet, send_acl does not even check for "f == -1"
in 2.6.9, far less for -2.
Comment 3 Wayne Davison 2007-09-07 18:56:58 UTC
For 2.6.8, you could simplify your patch by just checking for "f < 0".

For 2.6.9, make sure you have this patch installed for ACL use:

http://lists.samba.org/archive/rsync/2006-November/016706.html

See the reply if you have the xattrs patch installed.
Comment 4 Ruediger Oertel 2007-09-10 09:55:14 UTC
ah, perfect. thanks for the confirmation and the hint about 2.6.9!

if there is no issue with 3.0, you can probably close this one.
Comment 5 Wayne Davison 2007-09-10 21:00:20 UTC
excellent.  Closing.