aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml10
-rw-r--r--changes/ticket322404
-rw-r--r--changes/ticket322422
-rw-r--r--changes/ticket324074
-rw-r--r--src/core/mainloop/mainloop.c4
-rw-r--r--src/lib/evloop/compat_libevent.c10
-rw-r--r--src/lib/evloop/compat_libevent.h3
7 files changed, 31 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 98bb8cce80..7f7e7a5723 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -29,6 +29,9 @@ env:
- HARDENING_OPTIONS="--enable-expensive-hardening"
## We turn off asciidoc by default, because it's slow
- ASCIIDOC_OPTIONS="--disable-asciidoc"
+ ## Turn off tor's sandbox in chutney, until we fix sandbox errors that are
+ ## triggered by Ubuntu Xenial and Bionic. See #32722.
+ - CHUTNEY_TOR_SANDBOX="0"
matrix:
## This matrix entry is required, but it doesn't actually create any jobs
-
@@ -49,10 +52,6 @@ matrix:
## Chutney is a fast job, clang is slower on Linux, so we do Chutney clang
- env: CHUTNEY="yes" CHUTNEY_ALLOW_FAILURES="2" SKIP_MAKE_CHECK="yes"
compiler: clang
- ## (Linux only) Use an older Linux image (Ubuntu Trusty)
- ## The Xenial and Bionic images cause permissions issues for chutney,
- ## this is a workaround, until we fix #32240.
- dist: trusty
## We check asciidoc with distcheck, to make sure we remove doc products
## We use Linux clang, because there are no other Linux clang jobs
- env: DISTCHECK="yes" ASCIIDOC_OPTIONS="" SKIP_MAKE_CHECK="yes"
@@ -116,8 +115,7 @@ addons:
- libnss3-dev
- libscrypt-dev
- libseccomp-dev
- ## zstd doesn't exist in Ubuntu Trusty
- #- libzstd
+ - libzstd-dev
## Conditional build dependencies
## Always installed, so we don't need sudo
- asciidoc
diff --git a/changes/ticket32240 b/changes/ticket32240
new file mode 100644
index 0000000000..35cc3df27e
--- /dev/null
+++ b/changes/ticket32240
@@ -0,0 +1,4 @@
+ o Testing:
+ - Turn off Tor's Sandbox in Chutney jobs, and run those jobs on Ubuntu
+ Bionic. Turning off the Sandbox is a work-around, until we fix the
+ sandbox errors in 32722. Closes ticket 32240.
diff --git a/changes/ticket32242 b/changes/ticket32242
new file mode 100644
index 0000000000..d63d5a586e
--- /dev/null
+++ b/changes/ticket32242
@@ -0,0 +1,2 @@
+ o Testing (continuous integration):
+ - Use zstd in our Travis Linux builds. Closes ticket 32242.
diff --git a/changes/ticket32407 b/changes/ticket32407
new file mode 100644
index 0000000000..badb09abfe
--- /dev/null
+++ b/changes/ticket32407
@@ -0,0 +1,4 @@
+ o Minor bugfixes (crash):
+ - When running Tor with an option like --verify-config or --dump-config
+ that does not start the event loop, avoid crashing if we try to exit
+ early because of an error. Fixes bug 32407; bugfix on 0.3.3.1-alpha.
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c
index 4b3c3bf6af..f0aa37e8da 100644
--- a/src/core/mainloop/mainloop.c
+++ b/src/core/mainloop/mainloop.c
@@ -774,6 +774,10 @@ tor_shutdown_event_loop_and_exit(int exitcode)
main_loop_should_exit = 1;
main_loop_exit_value = exitcode;
+ if (! tor_libevent_is_initialized()) {
+ return; /* No event loop to shut down. */
+ }
+
/* Die with an assertion failure in ten seconds, if for some reason we don't
* exit normally. */
/* XXXX We should consider this code if it's never used. */
diff --git a/src/lib/evloop/compat_libevent.c b/src/lib/evloop/compat_libevent.c
index 91eacb9938..939d77f857 100644
--- a/src/lib/evloop/compat_libevent.c
+++ b/src/lib/evloop/compat_libevent.c
@@ -181,6 +181,16 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
event_get_version(), tor_libevent_get_method());
}
+/**
+ * Return true iff the libevent module has been successfully initialized,
+ * and not subsequently shut down.
+ **/
+bool
+tor_libevent_is_initialized(void)
+{
+ return the_event_base != NULL;
+}
+
/** Return the current Libevent event base that we're set up to use. */
MOCK_IMPL(struct event_base *,
tor_libevent_get_base, (void))
diff --git a/src/lib/evloop/compat_libevent.h b/src/lib/evloop/compat_libevent.h
index afe887a013..92724c369c 100644
--- a/src/lib/evloop/compat_libevent.h
+++ b/src/lib/evloop/compat_libevent.h
@@ -13,6 +13,8 @@
#include "lib/testsupport/testsupport.h"
#include "lib/malloc/malloc.h"
+#include <stdbool.h>
+
void configure_libevent_logging(void);
void suppress_libevent_log_msg(const char *msg);
@@ -68,6 +70,7 @@ typedef struct tor_libevent_cfg {
} tor_libevent_cfg;
void tor_libevent_initialize(tor_libevent_cfg *cfg);
+bool tor_libevent_is_initialized(void);
MOCK_DECL(struct event_base *, tor_libevent_get_base, (void));
const char *tor_libevent_get_method(void);
void tor_check_libevent_header_compatibility(void);