Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:38:36Zhttps://gitlab.torproject.org/legacy/trac/-/issues/29586Intermittent test failures in relay/close_circ_rephist2020-06-13T15:38:36ZteorIntermittent test failures in relay/close_circ_rephistI observed this failure once out of about 10 tests when testing #29541 on commit:
```
commit 5614960e94 (HEAD, tor-github/pr/723/merge)
Merge: 69238ca2da 065e7da8e6
```
Here is the test error:
```
relay/close_circ_rephist: [forking]
...I observed this failure once out of about 10 tests when testing #29541 on commit:
```
commit 5614960e94 (HEAD, tor-github/pr/723/merge)
Merge: 69238ca2da 065e7da8e6
```
Here is the test error:
```
relay/close_circ_rephist: [forking]
FAIL ../src/test/test_relay.c:127: assert(find_largest_max(write_array) OP_EQ 2*(get_cell_network_size(nchan->wide_circ_ids) +TLS_PER_CELL_OVERHEAD)): 0 vs 1082
[close_circ_rephist FAILED]
```
It looks like this test was introduced in #23512 for Sponsor Q.
Is Sponsor Q still open?
Is it an obvious fix?
If not, let's see if it happens again.Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/28184Reload is additive with regards to new v3 HS client authorizations but it won...2020-06-13T15:33:18ZTracReload is additive with regards to new v3 HS client authorizations but it won't subtract deleted onesSending a reload signal seems to add to authorizations not present before the reload but when the reload is issued after some authorizations have been deleted or the files in which they resided given invalid extensions it won't clear tho...Sending a reload signal seems to add to authorizations not present before the reload but when the reload is issued after some authorizations have been deleted or the files in which they resided given invalid extensions it won't clear those from memory in this running instance.
**Trac**:
**Username**: jchevaliTor: 0.3.5.x-finalhaxxpophaxxpophttps://gitlab.torproject.org/legacy/trac/-/issues/27995hs v3 auth descriptor cookie validation: tor crash when parsing .auth file af...2020-06-13T15:32:41ZTrachs v3 auth descriptor cookie validation: tor crash when parsing .auth file after SIGHUPHello devs,
While running tor onion service v3 with client auth disabled, if a new client .auth file is put under the authorized_clients subdir and a SIGHUP is sent to tor, the main process crashes after a bad assertion.
######
Oct 10...Hello devs,
While running tor onion service v3 with client auth disabled, if a new client .auth file is put under the authorized_clients subdir and a SIGHUP is sent to tor, the main process crashes after a bad assertion.
######
Oct 10 16:29:42.000 [info] load_client_keys(): Loading a client authorization key file a.auth...
Oct 10 16:29:42.000 [info] load_client_keys(): Loaded a client authorization key file a.auth.
Oct 10 16:29:42.000 [err] tor_assertion_failed_(): Bug: ../tor-0.3.5.2-alpha/src/feature/hs/hs_descriptor.c:2883: hs_desc_build_authorized_client: Assertion !tor_mem_is_zero((char *) descriptor_cookie, HS_DESC_DESCRIPTOR_COOKIE_LEN) failed; aborting. (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: Assertion !tor_mem_is_zero((char *) descriptor_cookie, HS_DESC_DESCRIPTOR_COOKIE_LEN) failed in hs_desc_build_authorized_client at ../tor-0.3.5.2-alpha/src/feature/hs/hs_descriptor.c:2883. Stack trace: (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(log_backtrace_impl+0x5a) [0x781307] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(tor_assertion_failed_+0x105) [0x77bc33] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(hs_desc_build_authorized_client+0x255) [0x58cfa8] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x1216c9) [0x5936c9] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x1207f5) [0x5927f5] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x11ed28) [0x590d28] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(hs_service_load_all_keys+0xdc) [0x598fb8] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x1bf5ea) [0x6315ea] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(set_options+0xb0) [0x62e9f5] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(options_init_from_string+0x63d) [0x63b6d6] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(options_init_from_torrc+0x4f8) [0x63ad2c] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x43a82) [0x4b5a82] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x44666) [0x4b6666] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x4443a) [0x4b643a] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: /usr/lib/i386-linux-gnu/libevent-2.1.so.6(+0x209db) [0xb7dfa9db] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: /usr/lib/i386-linux-gnu/libevent-2.1.so.6(event_base_loop+0x4d1) [0xb7dfb3b1] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(tor_libevent_run_event_loop+0x4b) [0x67047e] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x4418c) [0x4b618c] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x443a2) [0x4b63a2] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(do_main_loop+0x372) [0x4b60e6] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(tor_run_main+0x256) [0x4bb6ac] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(tor_main+0x8a) [0x4b00d5] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(main+0x46) [0x4afc8f] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0xb791c9a1] (on Tor 0.3.5.2-alpha )
Oct 10 16:29:42.000 [err] Bug: tor(+0x3db41) [0x4afb41] (on Tor 0.3.5.2-alpha )
######
This crash happened while running a non-optimized tor version and this is the backtrace from gdb:
```
#0 0xb7f75b91 in __kernel_vsyscall ()
#1 0xb7931112 in __libc_signal_restore_set (set=0xbfe7a9fc) at ../sysdeps/unix/sysv/linux/nptl-signals.h:80
#2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48
#3 0xb7932531 in __GI_abort () at abort.c:79
#4 0x0058cfad in hs_desc_build_authorized_client ()
#5 0x005936c9 in build_service_desc_superencrypted ()
#6 0x005927f5 in move_descriptors ()
#7 0x00590d28 in register_all_services ()
#8 0x00598fb8 in hs_service_load_all_keys ()
#9 0x006315ea in options_act ()
#10 0x0062e9f5 in set_options ()
#11 0x0063b6d6 in options_init_from_string ()
#12 0x0063ad2c in options_init_from_torrc ()
#13 0x004b5a82 in do_hup ()
#14 0x004b6666 in process_signal ()
#15 0x004b643a in signal_callback ()
#16 0xb7dfa9db in ?? () from /usr/lib/i386-linux-gnu/libevent-2.1.so.6
#17 0xb7dfb3b1 in event_base_loop () from /usr/lib/i386-linux-gnu/libevent-2.1.so.6
#18 0x0067047e in tor_libevent_run_event_loop ()
#19 0x004b618c in run_main_loop_once ()
#20 0x004b63a2 in run_main_loop_until_done ()
#21 0x004b60e6 in do_main_loop ()
#22 0x004bb6ac in tor_run_main ()
#23 0x004b00d5 in tor_main ()
#24 0x004afc8f in main ()
```
######
If the process is restarted, there is no problem setting up the descriptor cookie.
I've coded a dirty patch that solves this problem:
On tor 0.3.5.2-alpha/src/feature/hs/hs_service.c
```
1764a1765,1771
> /* Test that descriptor_cookie is not zero because we will use it
> * bellow */
> if (tor_mem_is_zero((char*)desc->descriptor_cookie,
> HS_DESC_DESCRIPTOR_COOKIE_LEN)) {
> crypto_strongest_rand(desc->descriptor_cookie,
> sizeof(desc->descriptor_cookie));
> }
```
I don't know if this is the best course of action or if it would be wiser to check it elsewhere.
TODO: elaborate a unit test.
**Trac**:
**Username**: madageTor: 0.3.5.x-finalDavid Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/legacy/trac/-/issues/27992config DataDirectoryGroupReadable 1 is overridden if you set KeyDir == DataDir2020-06-13T15:32:35ZTracconfig DataDirectoryGroupReadable 1 is overridden if you set KeyDir == DataDirim trying to run zeronet over tor.
i need group access to the DataDirectory for cookie auth
so /var/lib/tor should have file mode 0750
spoiler: see below for workarounds + bugfix
when i run
# d=$(date +"%F %T"); \
chmod 0750 /var/lib/...im trying to run zeronet over tor.
i need group access to the DataDirectory for cookie auth
so /var/lib/tor should have file mode 0750
spoiler: see below for workarounds + bugfix
when i run
# d=$(date +"%F %T"); \
chmod 0750 /var/lib/tor; \
systemctl restart tor; sleep 2; \
journalctl -u tor --since="$d" \
| grep -i permissions; \
stat -c%a /var/lib/tor
i always get
Fixing permissions on directory /var/lib/tor
700
and datadir ends up with filemode 0700
so it is not accessible for other users in the tor group
... though in my torrc i set
DataDirectoryGroupReadable 1
# usermod -a -G tor zeronet
# sudo -u zeronet cat /var/lib/tor/control_auth_cookie
cat: /var/lib/tor/control_auth_cookie: Permission denied
the authcookie filemode is set correctly to 0640
with the config
CookieAuthFileGroupReadable 1
--
workaround 1
run
# chmod 0750 /var/lib/tor
after starting tor
workaround 2
add
CacheDirectoryGroupReadable 1
to your torrc file
workaround 3
add
CacheDirectory = /var/lib/tor/cache
to your torrc file
if your cache dir should not be group readable
why workaround 2 and 3?
cos the error only happens
if CacheDirectory == DataDirectory
which is the default config
--
bugfix
in
src/app/config/config.c
add
if (strcmp(options->KeyDirectory, options->DataDirectory) != 0) {
and
if (strcmp(options->CacheDirectory, options->DataDirectory) != 0) {
around line 1570 and 1590
before calling
check_and_create_data_directory
... and close the parentheses
--
# cat /etc/tor/torrc
Log notice syslog
DataDirectory /var/lib/tor
DataDirectoryGroupReadable 1
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/lib/tor/control_auth_cookie
**Trac**:
**Username**: needle8420Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/27963Undefined symbol: "timeradd", first referenced in src/lib/libtor-thread.a2020-06-13T15:32:30ZTracUndefined symbol: "timeradd", first referenced in src/lib/libtor-thread.aWhen compiling tor-0.3.5.2-alpha on Solaris10, x64, with gcc 5.2.0 I'm getting an undefined symbole "timeradd", see below (or attached log file):
...
...
CC src/feature/dirauth/src_core_libtor_app_testing_a-shared_random_state.o
...When compiling tor-0.3.5.2-alpha on Solaris10, x64, with gcc 5.2.0 I'm getting an undefined symbole "timeradd", see below (or attached log file):
...
...
CC src/feature/dirauth/src_core_libtor_app_testing_a-shared_random_state.o
AR src/core/libtor-app-testing.a
CC src/tools/tor_runner.o
AR src/tools/libtorrunner.a
CC src/app/main/tor_main.o
CCLD src/app/tor
Undefined first referenced
symbol in file
timeradd src/lib/libtor-thread.a(compat_pthreads.o)
ld: fatal: symbol referencing errors. No output written to src/app/tor
gmake[1]: *** [src/app/tor] Error 1
gmake[1]: Leaving directory `/usr/local/lib/tor-0.3.5.2-alpha'
gmake: *** [all] Error 2
#
**Trac**:
**Username**: KnutTor: 0.3.5.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/27946"ExitRelay 0" ignored if config files are in include directories2020-06-13T15:32:26Ztoralf"ExitRelay 0" ignored if config files are in include directoriesThis
```
%include /etc/tor/torrc.d/
ExitRelay 0
IPv6Exit 0
```
seems not to work if there'S a file in /etc/tor/torrc.d/ containing
```
ExitRelay 1
IPv6Exit 1
```This
```
%include /etc/tor/torrc.d/
ExitRelay 0
IPv6Exit 0
```
seems not to work if there'S a file in /etc/tor/torrc.d/ containing
```
ExitRelay 1
IPv6Exit 1
```Tor: unspecifiedhttps://gitlab.torproject.org/legacy/trac/-/issues/27943Broken Appveyor build2020-06-13T15:32:25Zrl1987Broken Appveyor build```
checking for file conflicts...
error:
failed to commit transaction (conflicting files)
```
https://ci.appveyor.com/project/torproject/tor/build/1.0.1020/job/o62dw3iklb8da8wv```
checking for file conflicts...
error:
failed to commit transaction (conflicting files)
```
https://ci.appveyor.com/project/torproject/tor/build/1.0.1020/job/o62dw3iklb8da8wvTor: 0.3.5.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/27861Tor 0.3.5.2-alpha-dev c82163dff468443d Bug in tor_assertion_failed_()2020-06-13T15:32:12ZTracTor 0.3.5.2-alpha-dev c82163dff468443d Bug in tor_assertion_failed_()Hi
Here is the log:
Sep 25 22:54:55.000 [notice] new bridge descriptor 'ahwahnee' (cached): $193423CE506EB2EE2BC119C40CCC9CA2C0B403BA~ahwahnee at 137.74.197.106
Sep 25 22:54:55.000 [debug] routerlist_retry_directory_downloads(): In rout...Hi
Here is the log:
Sep 25 22:54:55.000 [notice] new bridge descriptor 'ahwahnee' (cached): $193423CE506EB2EE2BC119C40CCC9CA2C0B403BA~ahwahnee at 137.74.197.106
Sep 25 22:54:55.000 [debug] routerlist_retry_directory_downloads(): In routerlist_retry_directory_downloads()
Sep 25 22:54:55.000 [debug] router_reset_descriptor_download_failures(): In router_reset_descriptor_download_failures()
Sep 25 22:54:55.000 [debug] networkstatus_reset_download_failures(): In networkstatus_reset_download_failures()
Sep 25 22:54:55.000 [err] tor_assertion_failed_(): Bug: src/core/mainloop/mainloop.c:1641: reschedule_directory_downloads: Assertion fetch_networkstatus_event failed; aborting. (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: Assertion fetch_networkstatus_event failed in reschedule_directory_downloads at src/core/mainloop/mainloop.c:1641. Stack trace: (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(log_backtrace_impl+0x48) [0x55c5d29aee78] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(tor_assertion_failed_+0x97) [0x55c5d29aa347] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(reschedule_directory_downloads+0x78) [0x55c5d2820728] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(routerlist_descriptors_added+0xc4) [0x55c5d28d8bc4] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(router_load_routers_from_string+0x41a) [0x55c5d28daf5a] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(+0x1213a4) [0x55c5d28db3a4] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(router_reload_router_list+0x26) [0x55c5d28db536] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(tor_run_main+0x1524) [0x55c5d280e594] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(tor_main+0x3b) [0x55c5d280b62b] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(main+0x1a) [0x55c5d280b1ba] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f4331b06223] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
Sep 25 22:54:55.000 [err] Bug: tor(_start+0x2e) [0x55c5d280b21e] (on Tor 0.3.5.2-alpha-dev c82163dff468443d)
**Trac**:
**Username**: fo0xyTor: 0.3.5.x-finalNick MathewsonNick Mathewson