[tor-bugs] #31632 [Core Tor/Tor]: hs-v3: Service doesn't re-upload descriptor on circuit failure

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 24 05:46:26 UTC 2019


#31632: hs-v3: Service doesn't re-upload descriptor on circuit failure
-------------------------------------------+-------------------------------
 Reporter:  dgoulet                        |          Owner:  (none)
     Type:  defect                         |         Status:  new
 Priority:  Medium                         |      Milestone:  Tor:
                                           |  unspecified
Component:  Core Tor/Tor                   |        Version:
 Severity:  Normal                         |     Resolution:
 Keywords:  tor-hs, 042-deferred-20190918  |  Actual Points:
Parent ID:  #30200                         |         Points:
 Reviewer:  asn                            |        Sponsor:
                                           |  Sponsor27-must
-------------------------------------------+-------------------------------

Comment (by arma):

 For the v2 case, check out these elements in the descriptor struct:
 {{{
   /** Has descriptor been uploaded to all hidden service directories? */
   int all_uploads_performed;
   /** List of hidden service directories to which an upload request for
    * this descriptor could be sent. Smartlist exists only when at least
 one
    * of the previous upload requests failed (otherwise it's not important
    * to know which uploads succeeded and which not). */
   smartlist_t *successful_uploads;
 }}}

 So v2 has the ability to notice that it e.g. doesn't have enough directory
 information about a given hsdir, and it will try republishing to just
 those hsdirs later in that case. But v2 is still missing the feature where
 the hsdir info is all set, and we make the circuit and attempt the upload,
 and something goes wrong with the circuit or stream.

 I looked at hs_circ_cleanup(), and maybe it is useful here but it's not
 obvious how.

 My thought instead would be to put something like the above v2 state into
 the v3 descriptor struct, and then hook
 connection_dir_client_request_failed() to note that a given hsdir upload
 needs to be retried on the next iteration. See how
 connection_dir_about_to_close(), which calls that request_failed function,
 has a call to connection_dir_client_refetch_hsdesc_if_needed(). We could
 expand that refetch function to be about refetching-or-reposting, or we
 could make a second parallel function that is about reposting if needed.)

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


More information about the tor-bugs mailing list