Opened 2 years ago

Closed 2 years ago

#23346 closed defect (fixed)

prop224: HSdir set changed detection fails sometimes

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: prop224, tor-hs
Cc: Actual Points:
Parent ID: Points:
Reviewer: dgoulet Sponsor: SponsorR-can

Description

Seems like our logic for detecting HSDir hash ring changes on the service-side is not 100% correct. That's function service_desc_hsdirs_changed() and family.

David noticed that function thinking that the hsdir set changed when it actually didn't. That also happened right after a desc upload, which caused tor to order another upload instantly. Tor ended up doing two desc uploads in two seconds, which raced to the HSDirs and arrived there on the wrong order causing rev counter fails.

We don't know the culprit yet but David added some debug logs that should help us out here.

Child Tickets

Change History (4)

comment:1 Changed 2 years ago by asn

Status: newneeds_review

Please see branch bug23346 in my repo for a fix to these issues.

comment:2 Changed 2 years ago by dgoulet

lgtm;

I've been testing this for more than 24h now and I haven't see the problem happening again.

comment:3 Changed 2 years ago by dgoulet

Reviewer: dgoulet
Status: needs_reviewmerge_ready

comment:4 Changed 2 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

Hm. This code changes from an O(n log n) algorithm (sort and compare) to an O(n^2^) algorithm (iterate over list, searching second list for each element). I guess that's okay, because these lists are small?

If that's so, this looks okay to me. Merging.

Note: See TracTickets for help on using tickets.