[distcc] Where does distcc --daemon put its core files?

Alan Conway aconway at redhat.com
Fri Aug 17 20:10:31 GMT 2007


On Fri, 2007-08-17 at 13:19 +1000, Martin Pool wrote:
> On 8/17/07, Alan Conway <aconway at redhat.com> wrote:
> > I'm trying to get my first distcc farm working and having no luck so
> > far. Work is being passed around but the distccd child processes are
> > crashing every time.
> 
> That is pretty strange.  I'm not sure off hand what would be causing
> this.  I suggest you build distccd with debug symbols then run it
> under gdb with --no-fork, or try to find the core files.
> 
> It should be dumping them in its cwd, but that may not be writable by
> the process.  Ubuntu puts in some special core-catching behaviour that
> redirects them.  I'm not sure if there is anything like that in Red
> Hat (as I presume you're using), but that would be something else to
> watch out for.
> 

Here's the stack trace, there's something odd going on:

#0  0x0000003dbf675330 in strlen () from /lib64/libc.so.6
#1  0x0000003dbf645b88 in vfprintf () from /lib64/libc.so.6
#2  0x0000003dbf66669a in vsnprintf () from /lib64/libc.so.6
#3  0x0000000000405417 in rs_logger_file (flags=-1450631280, fn=0x1 <Address 0x1 out of bounds>, fmt=0x0, va=0xffffffff00000000, private_ptr=<value optimized out>, log_fd=2)
    at src/trace.c:315
#4  0x00000000004057fb in rs_log_va (flags=4, caller_fn_name=0x40ba60 "dcc_check_compiler_masq", fmt=0x40b9d0 "%s on distccd's path is %s and really a link to %s",
    va=0x7fffa9891eb0) at src/trace.c:219
#5  0x0000000000405d21 in rs_log0 (level=1920169263, fn=0x40b9d0 "%s on distccd's path is %s and really a link to %s", fmt=0x7fffa9891f90 "/usr/bin/distcc") at src/trace.c:286
#6  0x0000000000403533 in dcc_service_job (in_fd=<value optimized out>, out_fd=7, cli_addr=<value optimized out>, cli_len=<value optimized out>) at src/serve.c:234
#7  0x0000000000402e70 in dcc_standalone_server () at src/dparent.c:240
#8  0x00000000004026ac in main (argc=5, argv=<value optimized out>) at src/daemon.c:208


Looking at the values, something strange happens between frames 4 and 3:

#4  0x00000000004057fb in rs_log_va (flags=4, caller_fn_name=0x40ba60 "dcc_check_compiler_masq", fmt=0x40b9d0 "%s on distccd's path is %s and really a link to %s",
    va=0x7fffa9891eb0) at src/trace.c:219
(gdb) p flags
$4 = 4
(gdb) p caller_fn_name
$5 = 0x40ba60 "dcc_check_compiler_masq"
(gdb) p fmt
$6 = 0x40b9d0 "%s on distccd's path is %s and really a link to %s"
(gdb) down

This log message indicates I've goofed, but that shouldn't crash the server. Now in the next frame: 

#3  0x0000000000405417 in rs_logger_file (flags=-1450631280, fn=0x1 <Address 0x1 out of bounds>, fmt=0x0, va=0xffffffff00000000, private_ptr=<value optimized out>, log_fd=2)
    at src/trace.c:315
(gdb) p flags
$7 = -1450631280
(gdb) p fn
$8 = 0x1 <Address 0x1 out of bounds>
(gdb) p fmt
$9 = 0x0

Somehow during the call in #4, the stack has been corrupted and all the
argumets are now garbage.

Taking the masquerade symlinks out of the servers path solves the
problem, it all works beautifully. It would be good to fix the crash
though, how do I submit a bug?

Thanks,
Alan.



More information about the distcc mailing list