segment fault with 2.6.6 or CVS
Helmut Jarausch
jarausch at igpm.rwth-aachen.de
Fri Jul 29 09:04:38 GMT 2005
Hi,
I've rebuilt rsync (which was running just fine for quite some time)
and it works if used via ssh or if the daemon is started via ssh.
But it crashed in daemon mode (started standalone or by xinetd)
Here is the gdb log
gdb ...
set follow-fork-mode child
run --daemon --no-detach
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 32521]
0x08056577 in glob_expand (base1=0x5 <Address 0x5 out of bounds>,
argv_ptr=0xbfa4a20c, argc_ptr=0xbfa4a210, maxargs_ptr=0xbfa4a214)
at util.c:548
548 if (!(argv[argc++] = strdup(globbuf.gl_pathv[i])))
(gdb) where
#0 0x08056577 in glob_expand (base1=0x5 <Address 0x5 out of bounds>,
argv_ptr=0xbfa4a20c, argc_ptr=0xbfa4a210, maxargs_ptr=0xbfa4a214)
at util.c:548
#1 0x080710f6 in start_daemon (f_in=7, f_out=7) at clientserver.c:451
line 451: glob_expand(name, &argv, &argc, &maxargs);
line 232: char *name = lp_name(i);
within gdb:
print lp_name
$1 = {char *(int)} 0x806f0c0 <lp_name>
(gdb) print lp_name at 5
$2 = {{char *(int)} 0, {char *(int)} 0, {char *(int)} 0, {char *(int)} 0, {
char *(int)} 0}
I don't understand the code since I see 2 (global) definitions of
lp_name
first in t_stub.c
char *lp_name(UNUSED(int mod))
{
return NULL;
}
and second in loadparm.c
FN_LOCAL_STRING(lp_name, name)
where
#define FN_LOCAL_STRING(fn_name,val) \
char *fn_name(int i) {return((LP_SNUM_OK(i)&&pSERVICE(i)->val)?pSERVICE(i)->val : (sDefault.val?sDefault.val:""));}
#2 0x0806b9e5 in start_accept_loop (port=873, fn=0x80706a0 <start_daemon>)
at socket.c:512
#3 0x0807181a in daemon_main () at clientserver.c:675
#4 0x08058cbf in main (argc=0, argv=0x0) at main.c:1154
Any help is greatly appreciated,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
More information about the rsync
mailing list