Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#31810] Handle errors from execve() in the Unix process backend more gracefully. #1359

Closed
wants to merge 2 commits into from

Conversation

Labels
None yet
Projects
None yet
4 participants
@ahf
Copy link
Member

@ahf ahf commented Sep 24, 2019

This patch removes a call to tor_assert_unreached() after execve()
failed. This assertion leads to the child process emitting a stack trace
on its output, which makes the error harder for the user to demystify,
since they think it is an internal error in Tor instead of "just" being
a "no such file or directory" error.

See: https://bugs.torproject.org/31810

This patch removes a call to tor_assert_unreached() after execve()
failed. This assertion leads to the child process emitting a stack trace
on its output, which makes the error harder for the user to demystify,
since they think it is an internal error in Tor instead of "just" being
a "no such file or directory" error.

See: https://bugs.torproject.org/31810
@coveralls
Copy link

@coveralls coveralls commented Sep 24, 2019

Pull Request Test Coverage Report for Build 6553

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 12 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.01%) to 63.379%

Files with Coverage Reduction New Missed Lines %
src/feature/dirauth/shared_random.c 3 85.54%
src/feature/dirauth/dirvote.c 9 64.99%
Totals Coverage Status
Change from base Build 6549: -0.01%
Covered Lines: 47987
Relevant Lines: 75714

💛 - Coveralls

if (-1 == retval)
fprintf(stderr, "Call to execve() failed: %s", strerror(errno));

/* LCOV_EXCL_START */
Copy link
Contributor

@nmathewson nmathewson Sep 27, 2019

I think it isn't appropriate to have LCOV_EXCL_START here if we believe that this code can sometimes be reached. We should only use LCOV_EXCL for things that are untestable because they are truly unreachable.

error:
/* LCOV_EXCL_START */
fprintf(stderr, "Error from child process: %s", strerror(errno));
fprintf(stderr, "Error from child process: %s\n", strerror(errno));
Copy link
Contributor

@nmathewson nmathewson Sep 27, 2019

This eventually gets logged, right?

@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment