rend_cache_failure_clean() is called every second and the reason is that we want to make the client wait as little as possible so we try our best to cleanup the failure cache.
This is not ideal CPU wise since the cache could technically grow to the number of possible introduction point in the network thus making it a larger loop every second.
Let's relax the cleanup timer here to 5 minutes (expiry time of an entry) and at each lookup, if the entry did expire, clean it and return that "we do not have an entry". This will not address the size of the cache that can grows but that's fine since we can handle that in the OOM. Also, a cache that has the maximum number of entries is a valid use case.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
It is impossible that we will fix all 226 currently open 028 tickets before 028 releases. Time to move some out. This is my second pass through the "new" and tickets, looking for things to move to 0.2.9.
Trac: Milestone: Tor: 0.2.8.x-final to Tor: 0.2.9.x-final
I have one question: In the return value of rend_cache_failure_clean_callback(), is 30 the equivalent of 1 second (where 5 minutes would be something like 5 * 60 * 30)?
Unfortunately, the patch is missing the "Cleanup expired entries on lookup for v3", only v2 in the branch has been modified.
You probably simply want to call hs_cache_client_intro_state_clean() before calling cache_client_intro_state_lookup() ... or something around those lines :).
You probably simply want to call hs_cache_client_intro_state_clean() before calling cache_client_intro_state_lookup() ... or something around those lines :).
I tried this, and get errors like this:
hs_client/client_pick_intro: [forking] Sep 05 20:12:27.607 [err] tor_assertion_failed_: Bug: src/test/test_hs_client.c:431: test_client_pick_intro: Assertion !ip failed; aborting. (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.613 [err] Bug: Assertion !ip failed in test_client_pick_intro at src/test/test_hs_client.c:431. Stack trace: (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.613 [err] Bug: 0x165515c <log_backtrace_impl+0x4c> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.613 [err] Bug: 0x1651420 <tor_assertion_failed_+0xa0> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.613 [err] Bug: 0x1390475 <dir_common_construct_vote_3+0x57cb5> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.613 [err] Bug: 0x14ac573 <testcase_run_one+0x373> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.614 [err] Bug: 0x14ac9ff <tinytest_main+0x1af> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)Sep 05 20:12:27.614 [err] Bug: 0x14ab9f3 <main+0x2f3> at /usr/home/neel/code/tor/tor/src/test/test (on Tor 0.3.5.0-alpha-dev e3d1c98f6add4d09)[Lost connection!] [client_pick_intro FAILED]
I am thinking about calling hs_cache_client_intro_state_clean() in cache_client_intro_state_lookup(). Is this okay?
UPDATE Nevermind, this fails also, it's basically the same thing.
I got it passing tests provided I remove this code from src/test/test_hs_client.c (function test_client_pick_intro():
/* Now also mark the chosen one as failed: See that we can't get any intro points anymore. */ hs_cache_client_intro_state_note(&service_kp.pubkey, &chosen_intro_point->auth_key_cert->signed_key, INTRO_POINT_FAILURE_TIMEOUT); extend_info_t *ip = client_get_random_intro(&service_kp.pubkey); tor_assert(!ip);
The reason why I think it's okay to remove this is because hs_cache_client_intro_state_find() and hs_cache_client_intro_state_note() would be calling hs_cache_client_intro_state_clean() which does it (and this test fails from the code I mentioned above if I did not delete it).
I got it passing tests provided I remove this code from src/test/test_hs_client.c (function test_client_pick_intro():
{{{
/* Now also mark the chosen one as failed: See that we can't get any intro
points anymore. */
hs_cache_client_intro_state_note(&service_kp.pubkey,
&chosen_intro_point->auth_key_cert->signed_key,
INTRO_POINT_FAILURE_TIMEOUT);
extend_info_t *ip = client_get_random_intro(&service_kp.pubkey);
tor_assert(!ip);
}}}
The reason why I think it's okay to remove this is because hs_cache_client_intro_state_find() and hs_cache_client_intro_state_note() would be calling hs_cache_client_intro_state_clean() which does it (and this test fails from the code I mentioned above if I did not delete it).
So hmmm it appears that from the above, hs_cache_client_intro_state_note() is used to mark the intro point as unusable and thus the client_get_random_intro() can't find any usable intro.
How is that related to the cleanup process that is about cache expiry? In other words, I'm not sure this test is suppose to fail all the sudden?
Mark some tickets as postfreeze-ok, to indicate that I think they are okay to accept in 0.4.0 post-freeze. Does not indicate that they are all necessary to do postfreeze.
Deferring 51 tickets from 0.4.0.x-final. Tagging them with 040-deferred-20190220 for visibility. These are the tickets that did not get 040-must, 040-can, or tor-ci.