[tor-bugs] #25306 [Core Tor/Tor]: tor_assertion_failed_(): Bug: ../src/or/hs_service.c:1985: rotate_all_descriptors: Assertion service->desc_current failed; aborting.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue Mar 20 13:08:40 UTC 2018
#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:
| merge_ready
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, | Actual Points:
032-backport, review-group-34 |
Parent ID: | Points:
Reviewer: asn | Sponsor:
-------------------------------------------------+-------------------------
Comment (by dgoulet):
I kind of think we need to nest the check unfortunately in order to catch
the bug. There is really only one way this can happen and it is if our
`valid_after` time is bigger than the service rotation time.
If we were to not nest the checks, we would have something like this:
{{{
if (ns->valid_after >= service->state.next_rotation_time ||
BUG(service->desc_current == NULL || service->desc_next == NULL)) {
goto no_rotation;
}
if (ns->valid_after >= service->state.next_rotation_time) {
goto rotation;
}
}}}
I'm not super convinced it makes the code simpler? or more trivial?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25306#comment:21>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list