[Bug 8308] New: rsync: exclude.c:532: change_local_filter_dir: Assertion `dir_depth < 4096/2+1' failed

samba-bugs at samba.org samba-bugs at samba.org
Sat Jul 16 20:03:37 MDT 2011


https://bugzilla.samba.org/show_bug.cgi?id=8308

           Summary: rsync: exclude.c:532: change_local_filter_dir:
                    Assertion `dir_depth < 4096/2+1' failed
           Product: rsync
           Version: 3.0.8
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: dave-samba-bugzilla at centerclick.org
         QAContact: rsync-qa at samba.org


I'm seeing the following assert:

rsync --archive --devices --specials --sparse --one-file-system --verbose
--whole-file --numeric-ids --delete-before --hard-links --delete-excluded
--exclude-from=/share/alliance-bind-local2/rsync.exclude.all
--include-from=/share/alliance-bind-local2/rsync.include.all
--include-from=/share/alliance-bind-local2/rsync.include.drive_a '--include=*/'
'--exclude=*' --prune-empty-dirs /share/alliance-bind-local2/
/media/backup1/alliance-bind-local2/
building file list ... done
rsync: exclude.c:532: change_local_filter_dir: Assertion `dir_depth < 4096/2+1'
failed.
rsync: connection unexpectedly closed (9 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(601)
[sender=3.0.8]



The include/exclude rules I am using are trying to accomplish the
following:
 * exclude everything listed in rsync.exclude.all
 * include everything listed in either rsync.include.all or include.drive_a
 * exclude everything else

The 3 files contain:

$ cat /share/alliance-bind-local2/rsync.exclude.all
/backup/snapshots/**
$ cat /share/alliance-bind-local2/rsync.include.all
/rsync.**
$ cat /share/alliance-bind-local2/rsync.include.drive_a
/videos/dvd/**


Note that the paths of any file in the source and dest (both included or
excluded) are nowhere near 2K in length.  the longest path is probably
about 300 characters.

running in gdb seems to indicate the file in question is in the root directory
and matches the 1st include rule (/rsync.**)


Any thoughts?



$ rsync --version
rsync  version 3.0.8  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, no ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.


(gdb) c
Continuing.

Breakpoint 6, change_local_filter_dir (
    dname=0xfffd3c5c "rsync.include.drive_b", dlen=21, dir_depth=3695)
    at exclude.c:532
532             assert(dir_depth < MAXPATHLEN/2+1);
(gdb) bt
#0  change_local_filter_dir (dname=0xfffd3c5c "rsync.include.drive_b", 
    dlen=21, dir_depth=3695) at exclude.c:532
#1  0x080544c3 in do_delete_pass () at generator.c:548
#2  0x08059ac0 in generate_files (f_out=1, local_name=0x0) at generator.c:2251
#3  0x08064c9e in do_recv (f_in=0, f_out=1, local_name=0x0) at main.c:843
#4  0x080656a4 in start_server (f_in=0, f_out=1, argc=1, argv=0xfffd6e30)
    at main.c:953
#5  0x08066738 in child_main (argc=2, argv=0xfffd6e30) at main.c:960
#6  0x0807c92e in local_child (argc=2, argv=0xfffd6e30, f_in=0xfffd8ed0, 
    f_out=0xfffd8ecc, child_main=0x8066710 <child_main>) at pipe.c:156
#7  0x080633e9 in do_cmd (cmd=0x0, machine=0x0, user=0x0, 
    remote_argv=0x80b39b4, remote_argc=0, f_in_p=0xfffd8ed0, 
    f_out_p=0xfffd8ecc) at main.c:469
#8  0x08065f4b in main (argc=Cannot access memory at address 0x0
) at main.c:1275
(gdb) p dir_depth
$5 = 3695
(gdb) up
#1  0x080544c3 in do_delete_pass () at generator.c:548
548                             change_local_filter_dir(fbuf, strlen(fbuf),
F_DEPTH(file));
(gdb) info local
file = (struct file_struct *) 0xf73f738c
fbuf = "rsync.include.drive_b\000b"
st = {st_dev = 65024, __pad1 = 0, __st_ino = 323281, st_mode = 16877, 
  st_nlink = 3, st_uid = 0, st_gid = 0, st_rdev = 0, __pad2 = 0, 
  st_size = 4096, st_blksize = 4096, st_blocks = 8, st_atim = {
    tv_sec = 1310865354, tv_nsec = 0}, st_mtim = {tv_sec = 1305164231, 
    tv_nsec = 0}, st_ctim = {tv_sec = 1305556305, tv_nsec = 0}, 
  st_ino = 323281}
j = 1295
(gdb) p *file
$6 = {dirname = 0x0, modtime = 0, len32 = 1290, mode = 0, flags = 0, 
  basename = ""}
(gdb) p *((union file_extras*)(file) - (1))
$7 = {num = 3695, unum = 3695}
(gdb)

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list