group change causing failure

Joe Eiler jeiler at ciprico.com
Wed Oct 6 00:47:07 GMT 2004


First, Thanks for all your help Wayne.  This doesn't appear to be an rsync
problem at all.

OK here is what I am seeing.  Here is the backtrace
(gdb) bt
#0  0x4000734c in open_path () from /lib/ld-linux.so.2
#1  0x40004eed in _dl_map_object () from /lib/ld-linux.so.2
#2  0x4011b114 in dl_open_worker () from /lib/tls/libc.so.6
#3  0x4000bb46 in _dl_catch_error () from /lib/ld-linux.so.2
#4  0x4011af37 in _dl_open () from /lib/tls/libc.so.6
#5  0x4011cf93 in do_dlopen () from /lib/tls/libc.so.6
#6  0x4000bb46 in _dl_catch_error () from /lib/ld-linux.so.2
#7  0x4011ce02 in __libc_dlopen_mode () from /lib/tls/libc.so.6
#8  0x400faa55 in __nss_lookup_function () from /lib/tls/libc.so.6
#9  0x400fb3a3 in __nss_next () from /lib/tls/libc.so.6
#10 0x400b341f in getgrgid_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6
#11 0x400b2c81 in getgrgid () from /lib/tls/libc.so.6
#12 0x0805d449 in add_gid (gid=99) at uidlist.c:75
#13 0x08058ab7 in send_file_entry (file=0x4019afd0, f=5, base_flags=1) at
flist.c:463
#14 0x080590df in send_file_name (f=5, flist=0x808ad80, fname=0xbfffa381
"test1", recursive=1, base_flags=1)
    at flist.c:976
#15 0x0805971e in send_file_list (f=5, argc=0, argv=0x80889b0) at
flist.c:1214
#16 0x0805137c in start_server (f_in=5, f_out=5, argc=2, argv=0x80889a8) at
main.c:440
#17 0x08062635 in start_daemon (f_in=5, f_out=5) at clientserver.c:479
#18 0x0805de03 in start_accept_loop (port=873, fn=0x8061b10 <start_daemon>)
at socket.c:512
#19 0x08062811 in daemon_main () at clientserver.c:625
#20 0x08051c0a in main (argc=0, argv=0x0) at main.c:1124
(gdb)

The difference between the root group and any other group is in uidlist.c
/* Add a gid to the list of gids.  Only called on sending side. */
void add_gid(gid_t gid)
{
    struct idlist *list;

    if (gid == 0)   /* don't map root */
        return;

    for (list = gidlist; list; list = list->next) {
        if (list->id == (int)gid)
            return;
    }

    add_to_list(&gidlist, (int)gid, gid_to_name(gid), 0);
}

so it looks like gid_to_name(well actually getgrgid) is segfaulting.

The gid(99) is right. so I guess it is back to the drawing board.

Thanks again,
Joe

-----Original Message-----
From: Wayne Davison [mailto:wayned at samba.org]
Sent: Tuesday, October 05, 2004 2:26 PM
To: Joe Eiler
Cc: rsync at lists.samba.org
Subject: Re: group change causing failure


On Tue, Oct 05, 2004 at 01:02:57PM -0500, Joe Eiler wrote:
> I have been doing a "rsync -av localhost::" to see if a daemon is
> running, is this a valid test?

Yes, that should return a connection-refused error if rsync isn't
running.

> The core file is about 680k, I am going to attempt to crack the core
> file open, would anyone else like to take a look (looking at Wayne
> with very sad eyes)

To ensure that the core file is useful, make sure that your rsync is
compiled with debug symbols (i.e. run "gdb rsync" and ensure that
"l main" shows you the source).  The default Makefile includes debug
symbols in the rsync it generates, so as long as they didn't get
stripped out, you should be OK.

Then, you should be able to run "gdb rsync core" and get a backtrace
("bt") of where it died and be able to look around at variables.  If you
want me to look at it, I'll need both the (debug-enabled) executable and
the core file -- either put them on a web site somewhere and email me
where they are located, or gzip the files and attach them to an email to
me (not the mailing list, though!).

..wayne..



More information about the rsync mailing list