Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:48:34Zhttps://gitlab.torproject.org/legacy/trac/-/issues/32609Improve practracker unit tests, and run them in "make check" and pre-commit2020-06-13T15:48:34ZteorImprove practracker unit tests, and run them in "make check" and pre-commitTor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32594Fix CID 1455953: Resource leaks in #324272020-06-13T15:48:31ZteorFix CID 1455953: Resource leaks in #32427```
** CID 1455953: Resource leaks (RESOURCE_LEAK)
/src/app/config/config.c: 1983 in options_act_reversible()
________________________________________________________________________________________________________
*** CID 1455953: ...```
** CID 1455953: Resource leaks (RESOURCE_LEAK)
/src/app/config/config.c: 1983 in options_act_reversible()
________________________________________________________________________________________________________
*** CID 1455953: Resource leaks (RESOURCE_LEAK)
/src/app/config/config.c: 1983 in options_act_reversible()
1977 tor_assert(*msg);
1978
1979 options_rollback_log_transaction(log_transaction);
1980 options_rollback_listener_transaction(listener_transaction);
1981
1982 done:
CID 1455953: Resource leaks (RESOURCE_LEAK)
Variable "listener_transaction" going out of scope leaks the storage it points to.
1983 return r;
1984 }
1985
1986 /** If we need to have a GEOIP ip-to-country map to run with our configured
1987 * options, return 1 and set *<b>reason_out</b> to a description of why. */
1988 int
```Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32559Travis: run chutney with clang for better diagnostics2020-06-13T15:48:24ZteorTravis: run chutney with clang for better diagnosticsIn #32555 and #32427, we discovered that clang picks up some memory errors, but gcc does not.In #32555 and #32427, we discovered that clang picks up some memory errors, but gcc does not.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32510Rename .dox files to end with .md, and remove their /** magic **/2020-06-13T15:48:16ZNick MathewsonRename .dox files to end with .md, and remove their /** magic **/I thought that we had to have documentation-only doxygen files wrapped in /** and **/. But we don't: we can just tell doxygen that those files are markdown, and it will do the right thing.
We should make this change so that other tools...I thought that we had to have documentation-only doxygen files wrapped in /** and **/. But we don't: we can just tell doxygen that those files are markdown, and it will do the right thing.
We should make this change so that other tools (like github) that have special handling for markdown can pretty-print our markdown files, and so that we can eventually incorporate some/all of doc/HACKING into our doxygen.Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32487Phase 1: Stop compiling "acting as a directory cache" in --disable-module-relay2020-06-13T15:48:12ZteorPhase 1: Stop compiling "acting as a directory cache" in --disable-module-relayWe want to stop compiling the code that makes tor act as a directory cache, when the relay module is disabled.
(We already disable DirPort and DirCache, so the functionality is not available.)
At each stage, we should work to minimize ...We want to stop compiling the code that makes tor act as a directory cache, when the relay module is disabled.
(We already disable DirPort and DirCache, so the functionality is not available.)
At each stage, we should work to minimize layer-violations: there should generally not be calls from src/core/ into relay-specific code, and we should plan to refactor as needed to minimize them. We can reduce layer violations in parallel with the above.Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32468test/parseconf: Actually detect --dump-config errors2020-06-13T15:48:09Zteortest/parseconf: Actually detect --dump-config errorsWhen we added $FILTER for Windows, we made the pipeline exit successfully, even when tor exits with an error.When we added $FILTER for Windows, we made the pipeline exit successfully, even when tor exits with an error.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32451test/parseconf: Add support for required log messages on success2020-06-13T15:48:07Zteortest/parseconf: Add support for required log messages on successWe want to test that the "obsolete" log message includes the name of the option. But test_parseconf.sh doesn't check for log content on success.
Similarly, our lzma, zstd, and nss tests should also test for logs from a successful launch...We want to test that the "obsolete" log message includes the name of the option. But test_parseconf.sh doesn't check for log content on success.
Similarly, our lzma, zstd, and nss tests should also test for logs from a successful launch. At the moment, they force a failure, then check the logs.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32450test/parseconf: Document include behaviour, and add basic parsing tests2020-06-13T15:48:06Zteortest/parseconf: Document include behaviour, and add basic parsing testsWe don't document the "%include" behaviour in test_parseconf.sh.
We also don't test the basic script behaviour, without any options.We don't document the "%include" behaviour in test_parseconf.sh.
We also don't test the basic script behaviour, without any options.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32427Refactor options_act_reversible into manageable chunks2020-06-13T15:48:03ZNick MathewsonRefactor options_act_reversible into manageable chunksTor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32415Rename every struct we declare to end with _t.2020-06-13T15:48:02ZNick MathewsonRename every struct we declare to end with _t.Per our style poll, we prefer this:
typedef struct foo_t foo_t;
over this:
typedef struct foo_s foo_t;
So let's replace all the cases where we do the latter.Per our style poll, we prefer this:
typedef struct foo_t foo_t;
over this:
typedef struct foo_s foo_t;
So let's replace all the cases where we do the latter.Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32404Add a CFLG_OBSOLETE flag, and handle it at the confvar layer2020-06-13T15:47:59ZteorAdd a CFLG_OBSOLETE flag, and handle it at the confvar layerFollow up to #32295 for 0.4.3.
nickm says:
My suggestion would be to change how OBSOLETE is implemented: it doesn't really make sense as a type. Instead, there should be an "empty" type for fields that can't be read or written, and a C...Follow up to #32295 for 0.4.3.
nickm says:
My suggestion would be to change how OBSOLETE is implemented: it doesn't really make sense as a type. Instead, there should be an "empty" type for fields that can't be read or written, and a CFLG_OBSOLETE flag that causes these warnings. The CFLG_OBSOLETE flag should be handled at the confvar layer, I think.
This is a bug caused by sponsor 31, so it's a must-have.Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32401Fix variable typos in configure's lzma and zstd support2020-06-13T15:47:57ZteorFix variable typos in configure's lzma and zstd supportNo user-visible changes, so no changes file required.No user-visible changes, so no changes file required.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32399Fix "make test-stem" after merging #32339 and #323442020-06-13T15:47:57ZteorFix "make test-stem" after merging #32339 and #32344In #32339 and #32344, we broke "make test-stem", but we didn't notice before merging, because "make test-stem" is allow_failure in Travis CI.
It looks like we need to get stem to launch a new tor process for more tests. Or our immutabil...In #32339 and #32344, we broke "make test-stem", but we didn't notice before merging, because "make test-stem" is allow_failure in Travis CI.
It looks like we need to get stem to launch a new tor process for more tests. Or our immutability checks are too strict.
Here is one of the errors:
```
======================================================================
FAIL: test_take_ownership_via_controller
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/dev/stem/stem/util/test_tools.py", line 152, in <lambda>
self.method = lambda test: self.result(test) # method that can be mixed into TestCases
File "/home/dev/stem/stem/util/test_tools.py", line 227, in result
test.fail(self._result.msg)
AssertionError: Traceback (most recent call last):
File "/home/dev/stem/stem/util/test_tools.py", line 169, in _wrapper
runner(*args) if args else runner()
File "/home/dev/stem/test/integ/process.py", line 641, in test_take_ownership_via_controller
take_ownership = True,
File "/home/dev/stem/stem/process.py", line 285, in launch_tor_with_config
return launch_tor(tor_cmd, ['-f', '-'], None, completion_percent, init_msg_handler, timeout, take_ownership, close_output, stdin = config_str)
File "/home/dev/stem/stem/process.py", line 158, in launch_tor
raise OSError('Process terminated: %s' % last_problem)
OSError: Process terminated: Failed to bind one of the listener ports.
----------------------------------------------------------------------
```Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32397Add lzma, nss, and zstd support to test_parseconf.sh2020-06-13T15:47:56ZteorAdd lzma, nss, and zstd support to test_parseconf.shWe want to allow files like "expected_nss_no_relay_dirauth", for cases where the outputs differ.We want to allow files like "expected_nss_no_relay_dirauth", for cases where the outputs differ.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32344Make immutability into a config_var_t flag2020-06-13T15:47:42ZNick MathewsonMake immutability into a config_var_t flagTor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32307Most every C file needs a doxygen @file declaration2020-06-13T15:47:33ZNick MathewsonMost every C file needs a doxygen @file declarationDoxygen does not generate any documentation for files that do not say @file or \file. We have dozens of those right now.Doxygen does not generate any documentation for files that do not say @file or \file. We have dozens of those right now.Tor: 0.4.3.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/32295"Skipping obsolete configuration option." doesn't say which one2020-06-13T15:47:30ZRoger Dingledine"Skipping obsolete configuration option." doesn't say which oneIn Tor 0.3.5.x:
```
app/config/confparse.c:
log_warn(LD_CONFIG, "Skipping obsolete configuration option '%s'", c->key);
```
But in 0.4.2.3-alpha:
```
lib/confmgt/type_defs.c:
log_warn(LD_GENERAL, "Skipping obsolete configuration option."...In Tor 0.3.5.x:
```
app/config/confparse.c:
log_warn(LD_CONFIG, "Skipping obsolete configuration option '%s'", c->key);
```
But in 0.4.2.3-alpha:
```
lib/confmgt/type_defs.c:
log_warn(LD_GENERAL, "Skipping obsolete configuration option.");
```
Resulting in log messages like:
```
Oct 25 16:19:28.906 [warn] Skipping obsolete configuration option.
Oct 25 16:19:28.906 [warn] Skipping obsolete configuration option.
```
which are not as helpful as they could be.
The bug went in with commit c60a85d2, which I think first went into 0.4.2.1-alpha.
The new file has a XXXX next to this line:
```
// XXXX move this to a higher level, once such a level exists.
log_warn(LD_GENERAL, "Skipping obsolete configuration option.");
```
but I see that most tickets like #29211 and #30866 are scheduled for 0.4.3.x, and this is an 0.4.2 bug so I am filing a separate ticket.
Bug reported by OFFShare in irc.Tor: 0.4.2.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32245Phase 0: Disable the relay_sys.c entry point in --disable-module-relay2020-06-13T15:47:24ZteorPhase 0: Disable the relay_sys.c entry point in --disable-module-relayWhen compiling with --disable-module-relay, we should disable the relay_sys.c entry point.
At each stage, we should work to minimize layer-violations: there should generally not be calls from src/core/ into relay-specific code, and we s...When compiling with --disable-module-relay, we should disable the relay_sys.c entry point.
At each stage, we should work to minimize layer-violations: there should generally not be calls from src/core/ into relay-specific code, and we should plan to refactor as needed to minimize them. We can reduce layer violations in parallel with the above.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32244Phase 0: Disable the relay_periodic.c entry point in --disable-module-relay2020-06-13T15:47:24ZteorPhase 0: Disable the relay_periodic.c entry point in --disable-module-relayWhen compiling with --disable-module-relay, we should disable the relay_periodic.c entry point.
At each stage, we should work to minimize layer-violations: there should generally not be calls from src/core/ into relay-specific code, and...When compiling with --disable-module-relay, we should disable the relay_periodic.c entry point.
At each stage, we should work to minimize layer-violations: there should generally not be calls from src/core/ into relay-specific code, and we should plan to refactor as needed to minimize them. We can reduce layer violations in parallel with the above.Tor: 0.4.3.x-finalteorteorhttps://gitlab.torproject.org/legacy/trac/-/issues/32163Stop using HAVE_MODULE_{DIRAUTH,RELAY} inside functions2020-06-13T15:46:59ZteorStop using HAVE_MODULE_{DIRAUTH,RELAY} inside functionsIn doc/HACKING/Modules.md, we say that we don't use module macros inside functions. But HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY are used inside a few functions.
We should stop using HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY inside fun...In doc/HACKING/Modules.md, we say that we don't use module macros inside functions. But HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY are used inside a few functions.
We should stop using HAVE_MODULE_DIRAUTH and HAVE_MODULE_RELAY inside functions, or update the documentation to say "avoid using".Tor: 0.4.3.x-finalteorteor