[metrics-bugs] #24012 [Metrics/Onionoo]: Fix NullPointerExceptions from accessing descriptor parts that may be null

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Oct 26 19:04:34 UTC 2017


#24012: Fix NullPointerExceptions from accessing descriptor parts that may be null
-----------------------------+------------------------------
 Reporter:  karsten          |          Owner:  metrics-team
     Type:  defect           |         Status:  needs_review
 Priority:  High             |      Milestone:
Component:  Metrics/Onionoo  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------

Comment (by karsten):

 Thanks for reviewing and testing!

 Regarding your commit b7bd616, I'm afraid that it's flawed: we cannot
 create a `FileWriter` for `this.historyFile` and create its parent
 directory ''afterwards'' by calling
 `this.historyFile.getParentFile().mkdirs()`. I'd say let's keep this
 change out of the patch release and focus on the bugs that we're aware of.
 We can still make things more robust when we have more time.

 Your commit 3a72ead is a good catch! I tweaked it a bit by renaming
 `lastRestartedMillis()` to `calculateLastRestartedMillis()`. Save the
 verbs!

 I pushed two branches to my public repository:
 [https://gitweb.torproject.org/user/karsten/onionoo.git/log/?h=task-24012
 task-24012] contains your second commit rebased onto my earlier branch
 plus two squash commits, and
 [https://gitweb.torproject.org/user/karsten/onionoo.git/log/?h=next next]
 contains the same changes squashed into one commit plus preparations for
 the patch release.

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


More information about the metrics-bugs mailing list