Report tor segfaults when integ testing
From time to time Stem's integration tests crash tor (for example, #27500 (moved)). When this happens our test output is pretty confusing since from the point of the crash onward we fail with generic 'cannot connect to tor' errors.
There's two issues here...
-
Our test output doesn't indicate that tor crashed.
-
When reporting tor segfaults we need its stacktrace, which is swallowed by our tests.
We should adjust our test's get_tor_controller() helper to check if tor is still alive, failing the test with a clearer message if it isn't and providing the tor stacktrace at the end of the test run.