Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP mode: mysterious connect which did not happen #216

Open
pspacek opened this issue Jan 16, 2023 · 2 comments
Open

TCP mode: mysterious connect which did not happen #216

pspacek opened this issue Jan 16, 2023 · 2 comments

Comments

@pspacek
Copy link
Contributor

pspacek commented Jan 16, 2023

Version: 638e7e7

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
  • /tmp/qlist content: net. SOA
  • nothing is listening on 127.0.0.2:53
  • repeat until you get non-zero connection statistics, e.g.
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
Copy link
Member

jelu commented Jan 17, 2023

Duplicate #208

@jelu jelu closed this as completed Jan 17, 2023
@pspacek
Copy link
Contributor Author

pspacek commented Jan 18, 2023

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

@jelu jelu reopened this Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants