[metrics-bugs] #20994 [Metrics/Onionoo]: invalid first_seen timestamp on bridges

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Jan 5 13:51:07 UTC 2017


#20994: invalid first_seen timestamp on bridges
-----------------------------+------------------------------
 Reporter:  cypherpunks      |          Owner:  metrics-team
     Type:  defect           |         Status:  new
 Priority:  Medium           |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by karsten):

 The local run produced four bridges with `first_seen` date of 1970-01-01.

 I looked a bit more, and it seems that this only affects bridges that we
 have server descriptors (or extra-info descriptors) for but that are not
 listed in any of the statuses we have.

 The following code fixes the problem, but it might be a bad fix:

 {{{
 diff --git
 a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
 b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
 index a66aba8..a8f5807 100644
 ---
 a/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
 +++
 b/src/main/java/org/torproject/onionoo/updater/NodeDetailsStatusUpdater.java
 @@ -335,7 +335,7 @@ public class NodeDetailsStatusUpdater implements
 DescriptorListener,
      detailsStatus.setAdvertisedBandwidth(advertisedBandwidth);
      detailsStatus.setPlatform(descriptor.getPlatform());
      this.documentStore.store(detailsStatus, fingerprint);
 -    this.updatedNodes.add(fingerprint);
 +    //this.updatedNodes.add(fingerprint);
    }

    private void processBridgeExtraInfoDescriptor(
 @@ -352,7 +352,7 @@ public class NodeDetailsStatusUpdater implements
 DescriptorListener,
            descriptor.getPublishedMillis());
        detailsStatus.setTransports(descriptor.getTransports());
        this.documentStore.store(detailsStatus, fingerprint);
 -      this.updatedNodes.add(fingerprint);
 +      //this.updatedNodes.add(fingerprint);
      }
    }
 }}}

 It might be that we should leave these lines in and even add similar lines
 for relays of which we only have server descriptors and extra-info
 descriptors.  And then we make sure that `0L` is a special value for
 `first_seen` meaning "never seen before", rather than "seen on
 1970-01-01".  Needs more thoughts and testing.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20994#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list