#25306: tor_assertion_failed_(): Bug: ../src/or/hs_service.c:1985:
rotate_all_descriptors: Assertion service->desc_current failed; aborting.
------------------------------------------------+--------------------------
 Reporter:  cypherpunks                         |          Owner:  dgoulet
     Type:  defect                              |         Status:  accepted
 Priority:  Medium                              |      Milestone:  Tor:
                                                |  0.3.3.x-final
Component:  Core Tor/Tor                        |        Version:  Tor:
                                                |  0.3.3.2-alpha
 Severity:  Normal                              |     Resolution:
 Keywords:  tor-hs crash 033-must 032-backport  |  Actual Points:
Parent ID:                                      |         Points:
 Reviewer:                                      |        Sponsor:
------------------------------------------------+--------------------------

Comment (by dgoulet):

 So I was able to recreate this in the lab. Quick unit test that hits the
 asserts(). Unfortunately, there are unknowns on how `desc_current` can end
 up NULL after a suspend but still, here are my findings:

 If the service `next_rotation_time` ends up smaller than the `valid_after`
 time of the consensus, which usually it can't because when we do a
 rotation, we set it to the next time which is always in the future (after
 valid_after).

 However, when going in suspend and coming back to life, tor gets a new
 consensus and thus the valid_after time is bigger than the
 `next_rotation_time`. Which means that tor will allow the service to
 rotate the descriptors going straight into those asserts().

 So how can `desc_current` be NULL or even `desc_next`? For a regular
 service, I have no idea... I think it could be likely with `ADD_ONION` but
 the fact that we set the rotation time using the consensus and do it
 _before_ we build descriptors, we should never hit the asserts() because
 that time will always be smaller than `valid_after` so we won't allowed to
 rotate and then just after we'll build the descriptors.

 Puzzling...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25306#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to