On Tue, Feb 10, 2004 at 01:40:48PM +0900, Shinichi Maruyama wrote: > I tried rsync 2.6.1cvs on my FreeBSD 4.X boxes. > It dumps core when preserve_hard_links and backup. > And SUPPORT_HARD_LINKS is true. > > rsync -avH --delete --backup --backup-dir=/some/backup/dir \ > srchost::dir/ dir/ > > The core says... > > ------------------------------------------------------------------------ > Program terminated with signal 11, Segmentation fault. > > #0 0x80536c0 in keep_backup (fname=0x808f060 "rsync.core") at backup.c:266 > 266 if (!kept && preserve_hard_links && file->link_u.links > > (gdb) where > #0 0x80536c0 in keep_backup (fname=0x808f060 "rsync.core") at backup.c:266 > #1 0x80537c9 in make_backup (fname=0x808f060 "rsync.core") at backup.c:297 > #2 0x804c003 in delete_files (flist=0x8096100) at receiver.c:112 > #3 0x805028c in do_recv (f_in=3, f_out=3, flist=0x8096100, local_name=0x0) > at main.c:434 > #4 0x805093c in client_run (f_in=3, f_out=3, pid=-1, argc=1, argv=0x8095004) > at main.c:666 > > (gdb) p *file > $1 = {modtime = 1076386251, length = 577536, mode = 33152, u = {rdev = 0, sum = 0x0, > link = 0x0}, link_u = {idev = 0x80d1734, links = 0x80d1734}, > basename = 0x80d1744 "rsync.core", dirname = 0x0, basedir = 0x0, uid = 0, gid = 0, > flags = 0 '\000'} > ------------------------------------------------------------------------ > > In file backup.c. > > 266 if (!kept && preserve_hard_links && file->link_u.links > 267 && hlink_list[file->F_HLINDEX] != file) { > 268 if (verbose > 1) > 269 rprintf(FINFO, "%s is a hard link\n", f_name(file)); > 270 } > > file->link_u.links (and also file->F_HLINDEX) has some values, > but no meanings because it's only an union with file->link_u.idev. > It may be > > if (!kept && preserve_hard_links && file->u.link) { > > or some ?
CVS has a simplified test now that should avoid the segfault. It is just for a verbose message. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html