DNS-OARC / dnsperf

DNS Performance Testing Tools
https://www.dns-oarc.net/tools/dnsperf
Apache License 2.0
416 stars 67 forks source link

TCP mode: mysterious connect which did not happen #216

Open pspacek opened 1 year ago

pspacek commented 1 year ago

Version: 638e7e76e9fc4f05a96b991b2de7a179708812a7

For mysterious reasons, dnsperf sometimes thinks it is connected to TCP when it really is not - because nothing is listening on the target port.

Reproducer:

while true; do time dnsperf -s 127.0.0.2 -d /tmp/qlist -l 0.0001 -m tcp; done
DNS Performance Testing Tool
Version 2.10.0

[Status] Command line: dnsperf -s 127.0.0.2 -d /tmp/qlist -l 0.0001 -m tcp
[Status] Sending queries (to 127.0.0.2:53)
[Status] Started at: Mon Jan 16 18:05:21 2023
[Status] Stopping after 0.000100 seconds
[Timeout] Query timed out: msg id 0
[Status] Testing complete (time limit)

Statistics:

  Queries sent:         1
  Queries completed:    0 (0.00%)
  Queries lost:         1 (100.00%)

  Response codes:       
  Average packet size:  request 21, response 0
  Run time (s):         0.001089
  Queries per second:   0.000000

  Average Latency (s):  0.000000 (min 0.000000, max 0.000000)

Connection Statistics:

  Reconnections:        26

  Average Latency (s):  0.000041 (min 0.000025, max 0.000294)
  Latency StdDev (s):   0.000054

real    0m5.008s
user    0m1.765s
sys 0m3.235s

This should be "impossible" because nothing is listening on 127.0.0.2 port 53. To verify that I've captured PCAP with all attempts leading to this output: dnsperf.pcap.zip

jelu commented 1 year ago

Duplicate #208

pspacek commented 1 year ago

This is not a duplicate, it's still reproducible on 2e648bbd5112bbc6118dd8746cceb722cf5d76bc (which includes fix for #208).