[BIND-BUGS #4082] [823] forwarder setting with NetBSD/sparc

Mark.Andrews at nominum.com Mark.Andrews at nominum.com
Tue Feb 6 12:52:29 UTC 2001


> > 	While this was a problem it would not have caused a problem with
> > 	a config where the forwarders were not changed as the reference
> > 	count would never get to zero.  
> 
> I tried this patch... I still get the same a segfault:

	I didn't expect it to fix it as there was no indication that
	the forwarders were changed.  Apply the patch just eliminated
	this as the cause.

> 
> This GDB was configured as "sparc--netbsd"...
> Core was generated by `named'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/libexec/ld.elf_so...done.
> Reading symbols from /usr/lib/libutil.so.5...done.
> Reading symbols from /usr/lib/libc.so.12...done.
> #0  0x39984 in ns_resp (msg=0xeffff450 ")\221¤\200", msglen=28, from={
>       sin_len = 16 '\020', sin_family = 2 '\002', sin_port = 53, sin_addr = {
>         s_addr = 3474032925}, sin_zero = "\000\000\000\000\000\000\000"}, 
>     qsp=0x0) at ns_resp.c:457
> 457                     if (ina_equal(fwd->fwddata->fwdaddr.sin_addr, from.si
> n_addr))
> (gdb) p fwd
> $1 = (struct fwdinfo *) 0x0
> 
> Don't know if gcc/gdb can be believed.  If fwd is NULL, line 457
> should not be hit.
> 
> (gdb) l 450
> 445                     /* We don't generate or forward these (yet). */
> 446                     formerrmsg = notSingleQuery;
> 447                     goto formerr;
> 448             }
> 449     
> 450             /*
> 451              * Determine if the response came from a forwarder.  Packets 
> from
> 452              * anyplace not listed as a forwarder or as a server to whom 
> we
> 453              * might have forwarded the query will be dropped.
> 454              * XXX - should put this in STATS somewhere.
> (gdb) l
> 455              */
> 456             for (fwd = NS_ZFWDTAB(qp->q_fzone); fwd; fwd = fwd->next)
> 457                     if (ina_equal(fwd->fwddata->fwdaddr.sin_addr, from.si
> n_addr))
> 458                             break;
> 459             /*
> 460              * find the qinfo pointer and update
> 461              * the rtt and fact that we have called on this server before
> .
> 462              */
> 463             {
> 464                     struct timeval *stp;
> (gdb) 
> 
> But then fwd should not be NULL:
> 
> (gdb) p qp->q_fzone
> $2 = (struct zoneinfo *) 0x0
> (gdb) p server_options->fwdtab
> $4 = (struct fwdinfo *) 0xe4aa0
> (gdb) p *server_options->fwdtab
> $5 = {next = 0xe4ab0, fwddata = 0xf20a8}
> (gdb) p *server_options->fwdtab->next
> $6 = {next = 0x0, fwddata = 0xf20c4}
> (gdb) p/x *server_options->fwdtab->fwddata
> $8 = {fwdaddr = {sin_len = 0x0, sin_family = 0x2, sin_port = 0x35, sin_addr =
>  {
>       s_addr = 0xcf9bb748}, sin_zero = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
>       0x0}}, ns = 0xeb168, nsdata = 0xeb18c, ref_count = 0x1}
> (gdb) p/x *server_options->fwdtab->next->fwddata
> $9 = {fwdaddr = {sin_len = 0x0, sin_family = 0x2, sin_port = 0x35, sin_addr =
>  {
>       s_addr = 0xcead7748}, sin_zero = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 
>       0x0}}, ns = 0xeb1b0, nsdata = 0xeb1d4, ref_count = 0x1}
> (gdb) 
> 
> I'll recompile with -O0 for laughs.
> 
> --sjg
--
Mark Andrews, Nominum Inc.
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at nominum.com


More information about the bind-workers mailing list