- fixup testbound so it exits cleanly.
       - cleanup the caches on a reload, so that rrsetID numbers won't clash.


git-svn-id: file:///svn/unbound/trunk@740 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-11-12 13:58:34 +00:00
parent 0ee5532396
commit a6ae1d6194
10 changed files with 40 additions and 21 deletions

30
configure vendored
View file

@ -2,7 +2,7 @@
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for unbound 0.6.
#
# Report bugs to <wouter@nlnetlabs.nl>.
# Report bugs to <unbound-bugs@nlnetlabs.nl>.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@ -726,7 +726,7 @@ PACKAGE_NAME='unbound'
PACKAGE_TARNAME='unbound'
PACKAGE_VERSION='0.6'
PACKAGE_STRING='unbound 0.6'
PACKAGE_BUGREPORT='wouter@nlnetlabs.nl'
PACKAGE_BUGREPORT='unbound-bugs@nlnetlabs.nl'
# Factoring default headers for most tests.
ac_includes_default="\
@ -1483,7 +1483,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to <wouter@nlnetlabs.nl>.
Report bugs to <unbound-bugs@nlnetlabs.nl>.
_ACEOF
ac_status=$?
fi
@ -5925,9 +5925,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ---------------------------------- ##
## Report this to wouter@nlnetlabs.nl ##
## ---------------------------------- ##
## ---------------------------------------- ##
## Report this to unbound-bugs@nlnetlabs.nl ##
## ---------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@ -22204,9 +22204,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ---------------------------------- ##
## Report this to wouter@nlnetlabs.nl ##
## ---------------------------------- ##
## ---------------------------------------- ##
## Report this to unbound-bugs@nlnetlabs.nl ##
## ---------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@ -22585,9 +22585,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ---------------------------------- ##
## Report this to wouter@nlnetlabs.nl ##
## ---------------------------------- ##
## ---------------------------------------- ##
## Report this to unbound-bugs@nlnetlabs.nl ##
## ---------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;
@ -22813,9 +22813,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## ---------------------------------- ##
## Report this to wouter@nlnetlabs.nl ##
## ---------------------------------- ##
## ---------------------------------------- ##
## Report this to unbound-bugs@nlnetlabs.nl ##
## ---------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;;

View file

@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(unbound, 0.6, wouter@nlnetlabs.nl, unbound)
AC_INIT(unbound, 0.6, unbound-bugs@nlnetlabs.nl, unbound)
CFLAGS=
AC_AIX

View file

@ -437,6 +437,13 @@ daemon_cleanup(struct daemon* daemon)
don't die on multiple reload signals for example. */
signal_handling_record();
log_thread_set(NULL);
/* clean up caches because
* a) RRset IDs will be recycled after a reload, causing collisions
* b) validation config can change, thus rrset, msg, keycache clear
* The infra cache is kept, the timing and edns info is still valid */
slabhash_clear(&daemon->env->rrset_cache->table);
slabhash_clear(daemon->env->msg_cache);
/* key cache is cleared by module desetup during next daemon_init() */
for(i=0; i<daemon->num; i++)
worker_delete(daemon->workers[i]);
free(daemon->workers);

View file

@ -1,6 +1,9 @@
12 November 2007: Wouter
- fixup signal handling where SIGTERM could be ignored if a SIGHUP
arrives later on.
- bugreports to unbound-bugs@nlnetlabs.nl
- fixup testbound so it exits cleanly.
- cleanup the caches on a reload, so that rrsetID numbers won't clash.
9 November 2007: Wouter
- took ldns snapshot in repo.

View file

@ -59,4 +59,4 @@ o Other code origins are from the NSD (NLnet Labs) and LDNS (NLnet Labs)
projects. Such as buffer, region-allocator and red-black tree code.
o See Credits file for contributors.
* mailto:wouter@nlnetlabs.nl
* mailto:unbound-bugs@nlnetlabs.nl

View file

@ -22,6 +22,7 @@ server:
# The default is to listen to localhost (127.0.0.1 and ::1).
# specify 0.0.0.0 and ::0 to bind to all available interfaces.
# specify every interface on a new 'interface:' labelled line.
# The listen interfaces are not changed on reload, only on restart.
# interface: 192.0.2.153
# interface: 192.0.2.154
# interface: 2001:DB8::5

View file

@ -79,6 +79,7 @@ Interface to use to connect to the network. This interface is listened to
for queries from clients, and answers to clients are given from it.
Can be given multiple times to work on several interfaces. If none are
given the default is to listen to localhost.
The interfaces are not changed on a reload (kill -HUP) but only on restart.
.It \fBoutgoing-interface:\fR <ip address>
Interface to use to connect to the network. This interface is used to send
queries to authoritative servers and receive their replies. Can be given

View file

@ -248,7 +248,6 @@ rrset_array_lock(struct rrset_ref* ref, size_t count, uint32_t timenow)
if(i>0 && ref[i].key == ref[i-1].key)
continue; /* only lock items once */
lock_rw_rdlock(&ref[i].key->entry.lock);
log_assert(ref[i].id != 0 && ref[i].key->id != 0);
if(ref[i].id != ref[i].key->id || timenow >
((struct packed_rrset_data*)(ref[i].key->entry.data))
->ttl) {

View file

@ -56,6 +56,7 @@
#include "testcode/replay.h"
#include "testcode/ldns-testpkts.h"
#include "util/log.h"
#include <signal.h>
/** Global variable: the scenario. Saved here for when event_init is done. */
static struct replay_scenario* saved_scenario = NULL;
@ -522,6 +523,7 @@ run_scenario(struct replay_runtime* runtime)
fatal_exit("testbound: there are unmatched answers.");
}
log_info("testbound: exiting fake runloop.");
runtime->exit_cleanly = 1;
}
/*********** Dummy routines ***********/
@ -595,13 +597,17 @@ comm_base_dispatch(struct comm_base* b)
{
struct replay_runtime* runtime = (struct replay_runtime*)b;
run_scenario(runtime);
(*runtime->sig_cb)(SIGTERM, runtime->sig_cb_arg);
}
void
comm_base_exit(struct comm_base* ATTR_UNUSED(b))
comm_base_exit(struct comm_base* b)
{
/* some sort of failure */
fatal_exit("testbound: comm_base_exit was called.");
struct replay_runtime* runtime = (struct replay_runtime*)b;
if(!runtime->exit_cleanly) {
/* some sort of failure */
fatal_exit("testbound: comm_base_exit was called.");
}
}
struct comm_signal*

View file

@ -228,6 +228,8 @@ struct replay_runtime {
void (*sig_cb)(int, void*);
/** signal handler user arg */
void *sig_cb_arg;
/** time to exit cleanly */
int exit_cleanly;
/** size of buffers */
size_t bufsize;