Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug28780 squashed expiretest #966

Conversation

Labels
None yet
Projects
None yet
3 participants
@mikeperry-tor
Copy link
Contributor

@mikeperry-tor mikeperry-tor commented Apr 18, 2019

No description provided.

@coveralls
Copy link

@coveralls coveralls commented Apr 18, 2019

Pull Request Test Coverage Report for Build 4988

  • 28 of 38 (73.68%) changed or added relevant lines in 4 files are covered.
  • 6630 unchanged lines in 39 files lost coverage.
  • Overall coverage increased (+0.2%) to 62.457%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/circuituse.c 0 1 0.0%
src/feature/client/circpathbias.c 0 2 0.0%
src/core/or/circuitpadding.c 26 29 89.66%
src/core/or/circuitlist.c 2 6 33.33%
Files with Coverage Reduction New Missed Lines %
src/lib/crypt_ops/crypto_rand.c 2 97.06%
src/lib/encoding/kvline.c 2 97.89%
src/lib/encoding/confline.c 3 98.38%
src/feature/hs/hs_config.c 3 86.64%
src/feature/stats/rephist.c 4 43.28%
src/app/main/shutdown.c 6 77.33%
src/feature/control/fmt_serverstatus.c 7 0.0%
src/feature/dirauth/bwauth.c 8 89.42%
src/core/or/protover.c 9 92.35%
src/core/or/circuitpadding.c 11 90.97%
Totals Coverage Status
Change from base Build 4776: 0.2%
Covered Lines: 46555
Relevant Lines: 74539

💛 - Coveralls

If circuit padding wants to keep a circuit open and pathbias used to ignore
it, pathbias should continue to ignore it.

This may catch other purpose-change related miscounts (such as timeout
measurement, cannibalization, onion service circuit transitions, and
vanguards).
To ease debugging of miscount issues, attach vanguards with --loglevel DEBUG
and obtain control port logs (or use any other control port CIRC and
CIRC_MINOR event logging mechanism).
Because padding machine timers are UINT32_MAX in size, if some sort of network
event doesn't happen on a padding-only circuit within that time, we can
conclude it is deadlocked.
Inverting the logic makes it easier to see that there is only one place the
function returns true to decide to keep ownership of a circuit. In all other
cases it will release control and allow circuits to be closed.
…uits.

Cast after division to avoid sign vs unsigned comparison.
* last circpad_delay_t timespan, it's in some deadlock state.
* It's Ok to close now. */
if (circ->padding_info[i]->last_cell_time_sec +
(CIRCPAD_DELAY_INFINITE/CIRCPAD_DELAY_UNITS_PER_SECOND)+1
Copy link
Member

@asn-d6 asn-d6 May 9, 2019

I think we can simplify this a bit. Instead of defining the constant number CIRCPAD_DELAY_UNITS_PER_SECOND and the constant expression (CIRCPAD_DELAY_INFINITE/CIRCPAD_DELAY_UNITS_PER_SECOND)+1, instead let's define a single constant number with the result of the above expression and document exactly what it means.

Copy link
Contributor Author

@mikeperry-tor mikeperry-tor May 11, 2019

/* If we weren't marked dirty yet, let's pretend we're dirty now, to use
* that timer instead of the idle one (we're not supposed to look idle,
* after all) */
if (!circ->timestamp_dirty)
Copy link
Member

@asn-d6 asn-d6 May 9, 2019

I really like this commit. But what does this timestamp_dirty thing does here? I was not expecting to see it and I'm not sure what timestamp_dirty does in general, or why we need to mod it. Perhaps some more comments?

Copy link
Member

@asn-d6 asn-d6 May 9, 2019

Ah I guess it's so that circuit_expire_old_circuits_clientside() definitely applies.

I think we should find a place and write a detailed analysis of how we think that this "block mark for close, but close in the expiry function" codepath should work exactly.

Copy link
Contributor Author

@mikeperry-tor mikeperry-tor May 11, 2019

More comments: f6d815f

Copy link
Contributor Author

@mikeperry-tor mikeperry-tor May 11, 2019

More comments: f6d815f

@mikeperry-tor
Copy link
Contributor Author

@mikeperry-tor mikeperry-tor commented May 11, 2019

Superceded by PR #1015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment