Opened 8 months ago

Closed 8 months ago

#31941 closed defect (fixed)

Old reverse DNS lookups are sometimes not cleared properly

Reported by: karsten Owned by: karsten
Priority: Medium Milestone:
Component: Metrics/Onionoo Version:
Severity: Normal Keywords:
Cc: metrics-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


This ticket is based on a report by the t6kexit1 operator on the metrics-team@ mailing list.

Relay t6kexit1 recently switched from IP address to While Onionoo was able to resolve the previous IP address to a host name, it fails to resolve the current IP address. This failure may or may not be an Onionoo bug, but let's ignore this possible bug for the moment.

The fact that Onionoo sticks to the previous host name, even after the relay changed its IP address, is for sure a bug. Let's focus on this one, because it may be harder to reproduce this situation at a later time.

I looked at the relevant code. It seems like Onionoo only considers successful reverse DNS lookups, but disregards failed lookup attempts. What it should do instead is clear previous results in case of a failed lookup attempt.

I'll work on a patch, test it, and then post it here for review.

Child Tickets

Change History (3)

comment:1 Changed 8 months ago by karsten

Status: assignedneeds_review

irl, please review commit 4693bba in my task-31941 branch.

I tested this patch on a local Onionoo instance that was based on a backup from omeiense. Here's how the details status file of t6kexit1 changed:

@@ -99,7 +99,7 @@
   "nickname": "t6kexit1",
   "address": "",
   "first_seen_millis": 1568728800000,
-  "last_seen_millis": 1570100400000,
+  "last_seen_millis": 1570086000000,
   "or_port": 443,
   "dir_port": 80,
   "relay_flags": [
@@ -117,10 +117,10 @@
   "exit_addresses": {
     "": 1570043529000
-  "consensus_weight_fraction": 2.0087525e-07,
+  "consensus_weight_fraction": 1.9711189e-07,
   "guard_probability": 0,
   "middle_probability": 0,
-  "exit_probability": 9.059996e-07,
+  "exit_probability": 8.4231533e-07,
   "latitude": 36.0907,
   "longitude": -115.0886,
   "country_code": "us",
@@ -129,9 +129,6 @@
   "city_name": "Las Vegas",
   "as_name": "Sharktech",
   "as_number": "AS46844",
-  "verified_host_names": [
-    ""
-  ],
   "version": "",
   "version_status": "recommended"

comment:2 Changed 8 months ago by irl

Status: needs_reviewmerge_ready

Reviewed this offline and forgot to update the ticket.

This looks good to me.

comment:3 Changed 8 months ago by karsten

Resolution: fixed
Status: merge_readyclosed

Thanks for the review! Merged, released, and deployed.

No host name entry for relay t6kexit1 anymore:


Note: See TracTickets for help on using tickets.