chiark / gitweb /
+ * Do not spin if TCP connection blocks for writing (and add test case).
authorian <ian>
Tue, 27 Jun 2000 23:01:42 +0000 (23:01 +0000)
committerian <ian>
Tue, 27 Jun 2000 23:01:42 +0000 (23:01 +0000)
@@ -1,4 +1,4 @@
-adns (0.9) unstable; urgency=low
+adns (0.9) unstable; urgency=high

   Bug fixes:
   * Don't make _processany always kill the TCP connection with the message
@@ -7,6 +7,9 @@
     `qu->interim_allocd>=0' on some platforms eg 64 bit).
   * adnsresfilter doesn't resolve textual prefixes of addresses (eg,
     10.0.0.1 out of 10.0.0.123) if input happens to block at that point.
+  * Do not spin if TCP connection blocks for writing (and add test case).
+  * Fail queries if TCP dies repeatedly, rather than retrying many times.
+  * Do not abort in a couple of places if TCP unexpectedly broken.

   Portability/compilation fixes:
   * Move `extern "C" {' to after #include <...>'s.

17 files changed:
changelog
client/adnstest.c
regress/case-tcpallfail.err [new file with mode: 0644]
regress/case-tcpallfail.out [new file with mode: 0644]
regress/case-tcpallfail.sys [new file with mode: 0644]
regress/case-tcpblock.err [new file with mode: 0644]
regress/case-tcpblock.out [new file with mode: 0644]
regress/case-tcpblock.sys [new file with mode: 0644]
regress/case-tcpblockbrk.err [new file with mode: 0644]
regress/case-tcpblockbrk.out [new file with mode: 0644]
regress/case-tcpblockbrk.sys [new file with mode: 0644]
regress/case-tcpblockwr.err [new file with mode: 0644]
regress/case-tcpblockwr.out [new file with mode: 0644]
regress/case-tcpblockwr.sys [new file with mode: 0644]
regress/hcommon.c.m4
regress/init-anarres.text [new file with mode: 0644]
src/event.c

index 538275738971fb5a676bd7b55a94bfca409eaf54..25dc3475d4fba926873f8578dfaab249af91e3e5 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,4 +1,4 @@
-adns (0.9) unstable; urgency=low
+adns (0.9) unstable; urgency=high
 
   Bug fixes:
   * Don't make _processany always kill the TCP connection with the message
@@ -7,6 +7,9 @@ adns (0.9) unstable; urgency=low
     `qu->interim_allocd>=0' on some platforms eg 64 bit).
   * adnsresfilter doesn't resolve textual prefixes of addresses (eg,
     10.0.0.1 out of 10.0.0.123) if input happens to block at that point.
+  * Do not spin if TCP connection blocks for writing (and add test case).
+  * Fail queries if TCP dies repeatedly, rather than retrying many times.
+  * Do not abort in a couple of places if TCP unexpectedly broken.
 
   Portability/compilation fixes:
   * Move `extern "C" {' to after #include <...>'s.
index d8c81d21215e5abff10ed3fbd268ef56e3bb6e48..178bda583a4a60276b2c57866fda002d5c25edd8 100644 (file)
@@ -232,6 +232,8 @@ int main(int argc, char *const *argv) {
   }
   if (r) failure_errno("init",r);
 
+  setvbuf(stdout,0,_IOLBF,0);
+  
   for (qi=0; qi<qc; qi++) {
     fdom_split(fdomlist[qi],&domain,&qflags,ownflags,sizeof(ownflags));
     if (!consistsof(ownflags,"a")) usageerr("unknown ownqueryflag");
diff --git a/regress/case-tcpallfail.err b/regress/case-tcpallfail.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpallfail.out b/regress/case-tcpallfail.out
new file mode 100644 (file)
index 0000000..1294f3b
--- /dev/null
@@ -0,0 +1,34 @@
+adns debug: using nameserver 172.18.45.2
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2)
+adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2)
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604800
+rc=0
diff --git a/regress/case-tcpallfail.sys b/regress/case-tcpallfail.sys
new file mode 100644 (file)
index 0000000..08718fc
--- /dev/null
@@ -0,0 +1,63 @@
+anarres
+2/test.iwj.relativity.greenend.org.uk.
+ start 962142174.403028
+ socket type=SOCK_DGRAM
+ socket=4
+ +0.000120
+ fcntl fd=4 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000053
+ fcntl fd=4 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000034
+ socket type=SOCK_STREAM
+ socket=5
+ +0.000479
+ fcntl fd=5 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000036
+ fcntl fd=5 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000031
+ connect fd=5 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000182
+ select max=6 rfds=[4] wfds=[5] efds=[] to=13.999272
+ select=1 rfds=[] wfds=[5] efds=[]
+ +0.000862
+ read fd=5 buflen=1
+ read=ECONNREFUSED
+ +0.000087
+ close fd=5
+ close=OK
+ +0.000109
+ select max=5 rfds=[4] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000103
+ socket type=SOCK_STREAM
+ socket=5
+ +0.000392
+ fcntl fd=5 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000037
+ fcntl fd=5 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000030
+ connect fd=5 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000127
+ select max=6 rfds=[4] wfds=[5] efds=[] to=13.999414
+ select=1 rfds=[] wfds=[5] efds=[]
+ +0.000339
+ read fd=5 buflen=1
+ read=ECONNREFUSED
+ +0.000075
+ close fd=5
+ close=OK
+ +0.000084
+ select max=5 rfds=[4] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000098
+ close fd=4
+ close=OK
+ +0.000879
diff --git a/regress/case-tcpblock.err b/regress/case-tcpblock.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpblock.out b/regress/case-tcpblock.out
new file mode 100644 (file)
index 0000000..41f8854
--- /dev/null
@@ -0,0 +1,33 @@
+adns debug: using nameserver 172.18.45.2
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+adns debug: TCP connected (NS=172.18.45.2)
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): DNS query timed out; nrrs=0; cname=$; owner=$; ttl=604770
+rc=0
diff --git a/regress/case-tcpblock.sys b/regress/case-tcpblock.sys
new file mode 100644 (file)
index 0000000..5adf026
--- /dev/null
@@ -0,0 +1,114 @@
+anarres
+2/test.iwj.relativity.greenend.org.uk.
+ start 962142246.340485
+ socket type=SOCK_DGRAM
+ socket=4
+ +0.000126
+ fcntl fd=4 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000052
+ fcntl fd=4 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000035
+ socket type=SOCK_STREAM
+ socket=5
+ +0.000459
+ fcntl fd=5 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000036
+ fcntl fd=5 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000031
+ connect fd=5 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000184
+ select max=6 rfds=[4] wfds=[5] efds=[] to=13.999290
+ select=1 rfds=[] wfds=[5] efds=[]
+ +0.000937
+ read fd=5 buflen=1
+ read=EAGAIN
+ +0.000090
+ write fd=5
+     0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.000427
+ write fd=5
+     00353120 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.000271
+ write fd=5
+     00353121 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 050001.
+ write=55
+ +0.000429
+ write fd=5
+     00353122 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.000218
+ write fd=5
+     00353123 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.000212
+ write fd=5
+     00353124 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0d0001.
+ write=55
+ +0.000213
+ write fd=5
+     00353125 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.000212
+ write fd=5
+     00353126 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 100001.
+ write=55
+ +0.000214
+ write fd=5
+     00353127 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.000494
+ write fd=5
+     00353128 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.000239
+ write fd=5
+     00353129 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.000212
+ write fd=5
+     0035312a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.000213
+ write fd=5
+     0035312b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.000213
+ write fd=5
+     0035312c 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.000215
+ write fd=5
+     0035312d 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.000236
+ select max=6 rfds=[4,5] wfds=[] efds=[5] to=29.994245
+ select=0 rfds=[] wfds=[] efds=[]
+ +30.-04653
+ close fd=4
+ close=OK
+ +0.000943
+ close fd=5
+ close=OK
+ +0.000113
diff --git a/regress/case-tcpblockbrk.err b/regress/case-tcpblockbrk.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpblockbrk.out b/regress/case-tcpblockbrk.out
new file mode 100644 (file)
index 0000000..31f0488
--- /dev/null
@@ -0,0 +1,35 @@
+adns debug: using nameserver 172.18.45.2
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+adns debug: TCP connected (NS=172.18.45.2)
+adns warning: TCP connection failed: read: Connection reset by peer (NS=172.18.45.2)
+adns warning: TCP connection failed: connect/read: Connection refused (NS=172.18.45.2)
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): All nameservers failed; nrrs=0; cname=$; owner=$; ttl=604798
+rc=0
diff --git a/regress/case-tcpblockbrk.sys b/regress/case-tcpblockbrk.sys
new file mode 100644 (file)
index 0000000..68ce1d7
--- /dev/null
@@ -0,0 +1,144 @@
+anarres -0x300
+2/test.iwj.relativity.greenend.org.uk.
+ start 962143388.709150
+ socket type=SOCK_DGRAM
+ socket=5
+ +0.000434
+ fcntl fd=5 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000462
+ fcntl fd=5 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000439
+ socket type=SOCK_STREAM
+ socket=6
+ +0.001725
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000438
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000414
+ connect fd=6 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000724
+ select max=7 rfds=[5] wfds=[6] efds=[] to=13.996699
+ select=1 rfds=[] wfds=[6] efds=[]
+ +0.003661
+ read fd=6 buflen=1
+ read=EAGAIN
+ +0.000477
+ write fd=6
+     0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001553
+ write fd=6
+     00353120 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001612
+ write fd=6
+     00353121 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 050001.
+ write=55
+ +0.001289
+ write fd=6
+     00353122 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001204
+ write fd=6
+     00353123 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001200
+ write fd=6
+     00353124 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0d0001.
+ write=55
+ +0.001417
+ write fd=6
+     00353125 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001199
+ write fd=6
+     00353126 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 100001.
+ write=55
+ +0.001217
+ write fd=6
+     00353127 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001214
+ write fd=6
+     00353128 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001259
+ write fd=6
+     00353129 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001231
+ write fd=6
+     0035312a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001214
+ write fd=6
+     0035312b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001254
+ write fd=6
+     0035312c 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001443
+ write fd=6
+     0035312d 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001271
+ select max=7 rfds=[5,6] wfds=[] efds=[6] to=29.972984
+ select=1 rfds=[6] wfds=[] efds=[]
+ +2.-661933
+ read fd=6 buflen=2
+ read=ECONNRESET
+ +0.000519
+ close fd=6
+ close=OK
+ +0.000636
+ select max=6 rfds=[5] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000702
+ socket type=SOCK_STREAM
+ socket=6
+ +0.001734
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000435
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000537
+ connect fd=6 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000608
+ select max=7 rfds=[5] wfds=[6] efds=[] to=13.996686
+ select=1 rfds=[] wfds=[6] efds=[]
+ +0.000977
+ read fd=6 buflen=1
+ read=ECONNREFUSED
+ +0.000450
+ close fd=6
+ close=OK
+ +0.000617
+ select max=6 rfds=[5] wfds=[] efds=[] to=0.000000
+ select=0 rfds=[] wfds=[] efds=[]
+ +0.000689
+ close fd=5
+ close=OK
+ +0.002951
diff --git a/regress/case-tcpblockwr.err b/regress/case-tcpblockwr.err
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/regress/case-tcpblockwr.out b/regress/case-tcpblockwr.out
new file mode 100644 (file)
index 0000000..fa0e89a
--- /dev/null
@@ -0,0 +1,105 @@
+adns debug: using nameserver 172.18.45.2
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 1 A(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 2 NS(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 5 CNAME(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 6 SOA(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 12 PTR(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 13 HINFO(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 15 MX(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 16 TXT(-) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 17 RP(raw) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65537 A(addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65538 NS(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65548 PTR(checked) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 65551 MX(+addr) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131078 SOA(822) submitted
+test.iwj.relativity.greenend.org.uk. flags 2 type 131089 RP(822) submitted
+adns debug: TCP connected (NS=172.18.45.2)
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster.relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.6 )
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster@relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster.relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.6 )
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster@relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type A(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk
+test.iwj.relativity.greenend.org.uk. flags 2 type CNAME(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(raw): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster.relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type HINFO(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type TXT(-): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(raw): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type A(addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type NS(+addr): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk ok 0 ok "OK" ( INET 172.18.45.6 )
+test.iwj.relativity.greenend.org.uk. flags 2 type PTR(checked): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type MX(+addr): No such data; nrrs=0; cname=$; owner=$; ttl=59
+test.iwj.relativity.greenend.org.uk. flags 2 type SOA(822): OK; nrrs=1; cname=$; owner=$; ttl=59
+ ns0.relativity.greenend.org.uk hostmaster@relativity.greenend.org.uk 42 3600 120 6604800 60
+test.iwj.relativity.greenend.org.uk. flags 2 type RP(822): No such data; nrrs=0; cname=$; owner=$; ttl=60
+rc=0
diff --git a/regress/case-tcpblockwr.sys b/regress/case-tcpblockwr.sys
new file mode 100644 (file)
index 0000000..61c7bf5
--- /dev/null
@@ -0,0 +1,644 @@
+anarres -0x300
+2/test.iwj.relativity.greenend.org.uk. 2/test.iwj.relativity.greenend.org.uk. 2/test.iwj.relativity.greenend.org.uk.
+ start 962143438.172669
+ socket type=SOCK_DGRAM
+ socket=5
+ +0.000433
+ fcntl fd=5 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000443
+ fcntl fd=5 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000409
+ socket type=SOCK_STREAM
+ socket=6
+ +0.001762
+ fcntl fd=6 cmd=F_GETFL
+ fcntl=~O_NONBLOCK&...
+ +0.000420
+ fcntl fd=6 cmd=F_SETFL O_NONBLOCK|...
+ fcntl=OK
+ +0.000408
+ connect fd=6 addr=172.18.45.2:53
+ connect=EINPROGRESS
+ +0.000689
+ select max=7 rfds=[5] wfds=[6] efds=[] to=13.996721
+ select=1 rfds=[] wfds=[6] efds=[]
+ +0.278976
+ read fd=6 buflen=1
+ read=EAGAIN
+ +0.001048
+ write fd=6
+     0035311f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001447
+ write fd=6
+     00353120 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001424
+ write fd=6
+     00353121 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 050001.
+ write=55
+ +0.001287
+ write fd=6
+     00353122 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001199
+ write fd=6
+     00353123 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001220
+ write fd=6
+     00353124 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0d0001.
+ write=55
+ +0.001189
+ write fd=6
+     00353125 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001368
+ write fd=6
+     00353126 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 100001.
+ write=55
+ +0.001220
+ write fd=6
+     00353127 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001313
+ write fd=6
+     00353128 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001209
+ write fd=6
+     00353129 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001192
+ write fd=6
+     0035312a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001192
+ write fd=6
+     0035312b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001214
+ write fd=6
+     0035312c 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001195
+ write fd=6
+     0035312d 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001424
+ write fd=6
+     0035312e 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001226
+ write fd=6
+     0035312f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001214
+ write fd=6
+     00353130 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 050001.
+ write=55
+ +0.001202
+ write fd=6
+     00353131 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001187
+ write fd=6
+     00353132 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001207
+ write fd=6
+     00353133 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0d0001.
+ write=55
+ +0.001192
+ write fd=6
+     00353134 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001214
+ write fd=6
+     00353135 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 100001.
+ write=55
+ +0.001386
+ write fd=6
+     00353136 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001215
+ write fd=6
+     00353137 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001448
+ write fd=6
+     00353138 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001202
+ write fd=6
+     00353139 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001201
+ write fd=6
+     0035313a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001231
+ write fd=6
+     0035313b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001197
+ write fd=6
+     0035313c 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001212
+ write fd=6
+     0035313d 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001369
+ write fd=6
+     0035313e 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001212
+ write fd=6
+     0035313f 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 050001.
+ write=55
+ +0.001334
+ write fd=6
+     00353140 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001212
+ write fd=6
+     00353141 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001207
+ write fd=6
+     00353142 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0d0001.
+ write=55
+ +0.001187
+ write fd=6
+     00353143 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001186
+ write fd=6
+     00353144 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 100001.
+ write=55
+ +0.001204
+ write fd=6
+     00353145 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=55
+ +0.001365
+ write fd=6
+     00353146 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 010001.
+ write=55
+ +0.001254
+ write fd=6
+     00353147 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001.
+ write=55
+ +0.001278
+ write fd=6
+     00353148 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001.
+ write=55
+ +0.001207
+ write fd=6
+     00353149 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0f0001.
+ write=55
+ +0.001201
+ write fd=6
+     0035314a 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001.
+ write=55
+ +0.001188
+ write fd=6
+     0035314b 01000001 00000000 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001.
+ write=30
+ +1.814491
+ select max=7 rfds=[5,6] wfds=[6] efds=[6] to=27.847175
+ select=2 rfds=[6] wfds=[6] efds=[]
+ +5.-217468
+ read fd=6 buflen=2
+ read=OK
+     0082.
+ +0.012764
+ read fd=6 buflen=130
+ read=OK
+     311f8580 00010000 00010000 04746573 74036977 6a0a7265 6c617469 76697479
+     08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100 00003c00
+     41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72 6702756b
+     000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064 c8000000
+     003c.
+ +0.003700
+ read fd=6 buflen=132
+ read=OK
+     00713120 85800001 00010000 00010474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 020001c0 0c000200 01000000
+     3c002003 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b00c0 41000100 01000151 800004ac 122d0600 82312185 80000100 00000100
+     00047465.
+ +0.003001
+ read fd=6 buflen=115
+ read=OK
+     73740369 776a0a72 656c6174 69766974 79086772 65656e65 6e64036f 72670275
+     6b000005 0001c00c 00060001 0000003c 0041036e 73300a72 656c6174 69766974
+     79086772 65656e65 6e64036f 72670275 6b000a68 6f73746d 61737465 72c04500
+     00002a00 000e1000 00007800 64c80000 00003c.
+ +0.001128
+ read fd=6 buflen=132
+ read=OK
+     00a03122 85800001 00010001 00010474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 060001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c.
+ +0.299749
+ read fd=6 buflen=30
+ read=OK
+     c00c0002 00010000 003c0002 c041c041 00010001 00015180 0004ac12 2d06.
+ +0.000767
+ read fd=6 buflen=162
+ read=OK
+     00823123 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c 00823124 85800001 00000001 00000474 65737403 69776a0a 72656c61
+     7469.
+ +0.001110
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000d00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31258580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000934
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31268580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001041
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001000 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31278580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000940
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31288580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001164
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0071 31298580 00010001 00000001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000955
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000200 01c00c00 02000100
+     00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 00c04100 01000100 01518000 04ac122d 06008231 2a858000 01000000
+     01000004 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64
+     036f7267.
+ +0.001035
+ read fd=6 buflen=115
+ read=OK
+     02756b00 000c0001 c00c0006 00010000 003c0041 036e7330 0a72656c 61746976
+     69747908 67726565 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0
+     45000000 2a00000e 10000000 780064c8 00000000 3c008231 2b858000 01000000
+     01000004 74657374 0369776a 0a72656c 617469.
+ +0.000978
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c00a0 312c8580 00010001 00010001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000953
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000600 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003cc00c 00020001 0000003c 0002c041 c0410001 00010001 51800004
+     ac122d06.
+ +0.002102
+ read fd=6 buflen=162
+ read=OK
+     0082312d 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c 0082312e 85800001 00000001 00000474 65737403 69776a0a 72656c61
+     7469.
+ +0.001126
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0071 312f8580 00010001 00000001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000976
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000200 01c00c00 02000100
+     00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 00c04100 01000100 01518000 04ac122d 06008231 30858000 01000000
+     01000004 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64
+     036f7267.
+ +0.000930
+ read fd=6 buflen=115
+ read=OK
+     02756b00 00050001 c00c0006 00010000 003c0041 036e7330 0a72656c 61746976
+     69747908 67726565 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0
+     45000000 2a00000e 10000000 780064c8 00000000 3c00a031 31858000 01000100
+     01000104 74657374 0369776a 0a72656c 617469.
+ +0.001062
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000600 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003cc00c 00020001 0000003c 0002c041 c0410001 00010001 51800004
+     ac122d06.
+ +0.000937
+ read fd=6 buflen=162
+ read=OK
+     00823132 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c 00823133 85800001 00000001 00000474 65737403 69776a0a 72656c61
+     7469.
+ +0.001660
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000d00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31348580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001133
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31358580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000963
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001000 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31368580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001248
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31378580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001740
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0071 31388580 00010001 00000001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000981
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000200 01c00c00 02000100
+     00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 00c04100 01000100 01518000 04ac122d 06008231 39858000 01000000
+     01000004 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64
+     036f7267.
+ +0.000931
+ read fd=6 buflen=115
+ read=OK
+     02756b00 000c0001 c00c0006 00010000 003c0041 036e7330 0a72656c 61746976
+     69747908 67726565 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0
+     45000000 2a00000e 10000000 780064c8 00000000 3c008231 3a858000 01000000
+     01000004 74657374 0369776a 0a72656c 617469.
+ +0.000978
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c00a0 313b8580 00010001 00010001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000926
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000600 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003cc00c 00020001 0000003c 0002c041 c0410001 00010001 51800004
+     ac122d06.
+ +0.012223
+ read fd=6 buflen=162
+ read=OK
+     0082313c 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c 0082313d 85800001 00000001 00000474 65737403 69776a0a 72656c61
+     7469.
+ +0.001327
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0071 313e8580 00010001 00000001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000945
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000200 01c00c00 02000100
+     00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 00c04100 01000100 01518000 04ac122d 06008231 3f858000 01000000
+     01000004 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64
+     036f7267.
+ +0.000969
+ read fd=6 buflen=115
+ read=OK
+     02756b00 00050001 c00c0006 00010000 003c0041 036e7330 0a72656c 61746976
+     69747908 67726565 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0
+     45000000 2a00000e 10000000 780064c8 00000000 3c00a031 40858000 01000100
+     01000104 74657374 0369776a 0a72656c 617469.
+ +0.000930
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000600 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003cc00c 00020001 0000003c 0002c041 c0410001 00010001 51800004
+     ac122d06.
+ +0.000929
+ read fd=6 buflen=162
+ read=OK
+     00823141 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 0c0001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c 00823142 85800001 00000001 00000474 65737403 69776a0a 72656c61
+     7469.
+ +0.001098
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000d00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31438580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001053
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31448580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001035
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001000 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31458580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000974
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00001100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0082 31468580 00010000 00010000 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000933
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000100 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c0071 31478580 00010001 00000001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.001037
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000200 01c00c00 02000100
+     00003c00 20036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 00c04100 01000100 01518000 04ac122d 06008231 48858000 01000000
+     01000004 74657374 0369776a 0a72656c 61746976 69747908 67726565 6e656e64
+     036f7267.
+ +0.000956
+ read fd=6 buflen=115
+ read=OK
+     02756b00 000c0001 c00c0006 00010000 003c0041 036e7330 0a72656c 61746976
+     69747908 67726565 6e656e64 036f7267 02756b00 0a686f73 746d6173 746572c0
+     45000000 2a00000e 10000000 780064c8 00000000 3c008231 49858000 01000000
+     01000004 74657374 0369776a 0a72656c 617469.
+ +0.001151
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000f00 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003c00a0 314a8580 00010001 00010001 04746573 74036977 6a0a7265
+     6c617469.
+ +0.000955
+ read fd=6 buflen=132
+ read=OK
+     76697479 08677265 656e656e 64036f72 6702756b 00000600 01c00c00 06000100
+     00003c00 41036e73 300a7265 6c617469 76697479 08677265 656e656e 64036f72
+     6702756b 000a686f 73746d61 73746572 c0450000 002a0000 0e100000 00780064
+     c8000000 003cc00c 00020001 0000003c 0002c041 c0410001 00010001 51800004
+     ac122d06.
+ +0.000578
+ read fd=6 buflen=162
+ read=EAGAIN
+ +1.000435
+ write fd=6
+     76697479 08677265 656e656e 64036f72 6702756b 00001100 01.
+ write=25
+ +0.000932
+ select max=7 rfds=[5,6] wfds=[] efds=[6] to=21.691550
+ select=1 rfds=[6] wfds=[] efds=[]
+ +5.-217468
+ read fd=6 buflen=162
+ read=OK
+     0082314b 85800001 00000001 00000474 65737403 69776a0a 72656c61 74697669
+     74790867 7265656e 656e6403 6f726702 756b0000 110001c0 0c000600 01000000
+     3c004103 6e73300a 72656c61 74697669 74790867 7265656e 656e6403 6f726702
+     756b000a 686f7374 6d617374 6572c045 0000002a 00000e10 00000078 0064c800
+     0000003c.
+ +0.217468
+ read fd=6 buflen=162
+ read=EAGAIN
+ +0.017051
+ close fd=5
+ close=OK
+ +0.595595
+ close fd=6
+ close=OK
+ +0.000531
index b18cb4ec8ec1d9228a6233364b18ac37ee5b7c00..fab7c820903df66d9efb51e73a3c94f0d06392ac 100644 (file)
@@ -54,6 +54,7 @@ const struct Terrno Terrnos[]= {
   { "ENOSPC",                    ENOSPC                       },
   { "EWOULDBLOCK",               EWOULDBLOCK                  },
   { "EHOSTUNREACH",              EHOSTUNREACH                 },
+  { "ECONNRESET",                ECONNRESET                   },
   { "ECONNREFUSED",              ECONNREFUSED                 },
   { "EPIPE",                     EPIPE                        },
   {  0,                          0                            }
diff --git a/regress/init-anarres.text b/regress/init-anarres.text
new file mode 100644 (file)
index 0000000..1918381
--- /dev/null
@@ -0,0 +1,2 @@
+nameserver 172.18.45.2
+search davenant.greenend.org.uk
index 88e5d03077bd17fe2e73234fb9ca8586fcecae99..29d50a0cf6e8817476d4a300f400e1a99e85e1b0 100644 (file)
@@ -54,11 +54,18 @@ static void tcp_close(adns_state ads) {
 
 void adns__tcp_broken(adns_state ads, const char *what, const char *why) {
   int serv;
+  adns_query qu;
   
   assert(ads->tcpstate == server_connecting || ads->tcpstate == server_ok);
   serv= ads->tcpserver;
   if (what) adns__warn(ads,serv,0,"TCP connection failed: %s: %s",what,why);
 
+  if (ads->tcpstate == server_connecting) {
+    /* Counts as a retry for all the queries waiting for TCP. */
+    for (qu= ads->tcpw.head; qu; qu= qu->next)
+      qu->retries++;
+  }
+
   tcp_close(ads);
   ads->tcpstate= server_broken;
   ads->tcpserver= (serv+1)%ads->nservers;
@@ -328,6 +335,7 @@ int adns_processreadable(adns_state ads, int fd, const struct timeval *now) {
 
   switch (ads->tcpstate) {
   case server_disconnected:
+  case server_broken:
   case server_connecting:
     break;
   case server_ok:
@@ -425,6 +433,7 @@ int adns_processwriteable(adns_state ads, int fd, const struct timeval *now) {
 
   switch (ads->tcpstate) {
   case server_disconnected:
+  case server_broken:
     break;
   case server_connecting:
     if (fd != ads->tcpsocket) break;
@@ -447,8 +456,8 @@ int adns_processwriteable(adns_state ads, int fd, const struct timeval *now) {
       r= 0; goto xit;
     } /* not reached */
   case server_ok:
-    if (!(ads->tcpsend.used && fd == ads->tcpsocket)) break;
-    for (;;) {
+    if (fd != ads->tcpsocket) break;
+    while (ads->tcpsend.used) {
       adns__sigpipe_protect(ads);
       r= write(ads->tcpsocket,ads->tcpsend.buf,ads->tcpsend.used);
       adns__sigpipe_unprotect(ads);
@@ -462,7 +471,9 @@ int adns_processwriteable(adns_state ads, int fd, const struct timeval *now) {
        ads->tcpsend.used -= r;
        memmove(ads->tcpsend.buf,ads->tcpsend.buf+r,ads->tcpsend.used);
       }
-    } /* not reached */
+    }
+    r= 0;
+    goto xit;
   default:
     abort();
   }
@@ -476,6 +487,7 @@ int adns_processexceptional(adns_state ads, int fd, const struct timeval *now) {
   adns__consistency(ads,0,cc_entex);
   switch (ads->tcpstate) {
   case server_disconnected:
+  case server_broken:
     break;
   case server_connecting:
   case server_ok:
@@ -596,6 +608,7 @@ void adns_globalsystemfailure(adns_state ads) {
     adns__tcp_broken(ads,0,0);
     break;
   case server_disconnected:
+  case server_broken:
     break;
   default:
     abort();