Nick Mathewson
6cbd17470d
Handle unlikely negative time in tor_log_err_sigsafe
...
Coverity wants this; CID 1130990.
2013-11-22 12:14:11 -05:00
Nick Mathewson
647248729f
Drop the MaxMemInQueues lower limit down to 256 MB.
...
on #9686 , gmorehose reports that the 500 MB lower limit is too high
for raspberry pi users.
2013-11-20 12:13:30 -05:00
Nick Mathewson
e572ec856d
Rename MaxMemInCellQueues to MaxMemInQueues
2013-11-20 12:12:23 -05:00
Nick Mathewson
03ff21b018
Changess file for #10169
2013-11-20 12:08:03 -05:00
Nick Mathewson
a406f6d0f0
doxygen comments for 10169 code
2013-11-20 12:05:36 -05:00
Nick Mathewson
eabcab2b7c
Count freed buffer bytes from buffers when oom-killing circuits.
...
Also, aggressively clear the buffers to try to make their bytes go
away fast rather than waiting for the close-marked-connection code
to get 'em.
2013-11-20 11:57:45 -05:00
Nick Mathewson
027f4c82eb
Whitespace cleanup
2013-11-20 11:05:00 -05:00
Nick Mathewson
03da9be2f1
Merge remote-tracking branch 'sysrqb/bug9859_5'
2013-11-20 11:03:37 -05:00
Nick Mathewson
e7165659e0
Fix crypto/digests test
2013-11-18 13:33:29 -05:00
Nick Mathewson
a7c9d64fd6
Merge branch 'finish_prop157'
2013-11-18 13:27:06 -05:00
Nick Mathewson
ec9d88e5a2
Tweak #10162 documentation a bit
2013-11-18 13:26:58 -05:00
Nick Mathewson
3cdd7966d7
Add a _GNU_SOURCE definition to backtrace.c to fix compilation
2013-11-18 13:05:23 -05:00
Nick Mathewson
d0f9a2b846
Whoops; changes files belong in changes.
2013-11-18 12:49:12 -05:00
Nick Mathewson
9025423471
Whoops -- add missing defined().
2013-11-18 11:36:23 -05:00
Nick Mathewson
93c99508d2
Make header includes match declarations in pc_from_ucontext.m4
...
With any luck, this will clean up errors where we detect that
REG_{EIP,RIP} is present in autoconf, but when we go to include it,
it isn't there.
2013-11-18 11:34:15 -05:00
Nick Mathewson
adf2fa9b49
Fix compilation under openssl 0.9.8
...
It's not nice to talk about NID_aes_{128,256}_{ctr,gcm} when they
don't exist.
Fix on 84458b79a78ea7e26820bf0; bug not in any released Tor.
2013-11-18 11:25:07 -05:00
Nick Mathewson
bd25bda7c0
Remove 'struct timeval now' that was shadowing 'struct timeval now'.
...
This was a mistake in the merge commit 7a2b30fe16
. It
would have made the CellStatistics code give completely bogus
results. Bug not in any released Tor.
2013-11-18 11:20:35 -05:00
Nick Mathewson
4b9ec85e47
Fix whitespace
2013-11-18 11:13:40 -05:00
Nick Mathewson
84458b79a7
Log more OpenSSL engine statuses at startup.
...
Fixes ticket 10043; patch from Joshua Datko.
2013-11-18 11:12:24 -05:00
Nick Mathewson
fe0d1c6661
Merge branch 'backtrace_squashed_merged'
2013-11-18 11:01:31 -05:00
Nick Mathewson
fbc20294aa
Merge branch 'backtrace_squashed'
...
Conflicts:
src/common/sandbox.c
src/common/sandbox.h
src/common/util.c
src/or/main.c
src/test/include.am
src/test/test.c
2013-11-18 11:00:16 -05:00
Nick Mathewson
c81f64ab44
Improve backtrace changes file
2013-11-18 10:48:14 -05:00
Nick Mathewson
c2dfae78d3
Refactor format_*_number_sigsafe to have a common implementation
2013-11-18 10:43:16 -05:00
Nick Mathewson
c3ea946839
Reseolve DOCDOC and XXXXs in backtrace.c
2013-11-18 10:43:15 -05:00
Nick Mathewson
56e3f056e9
Tests for backtrace.c
...
These need to be a separate executable, since the point of backtrace.c
is that it can crash and write stuff.
2013-11-18 10:43:15 -05:00
Nick Mathewson
0cf234317f
Unit tests for new functions in log.c
2013-11-18 10:43:15 -05:00
Nick Mathewson
d631ddfb59
Make backtrace handler handle signals correctly.
...
This meant moving a fair bit of code around, and writing a signal
cleanup function. Still pretty nice from what I can tell, though.
2013-11-18 10:43:15 -05:00
Nick Mathewson
2662885aa9
Use pc_from_ucontext.m4 from Google Performance Tools
...
This M4 module lets us learn the right way (out of at least 18
possibilities) to extract the current PC for stack-trace-fixup-in-signal
purposes. The Google Performance Tools license is 3-clause BSD.
2013-11-18 10:43:15 -05:00
Nick Mathewson
ce8ae49c94
Improve new assertion message logging
...
Don't report that a failure happened in the assertion_failed function just
because we logged it from there.
2013-11-18 10:43:15 -05:00
Nick Mathewson
bd8ad674b9
Add a sighandler-safe logging mechanism
...
We had accidentially grown two fake ones: one for backtrace.c, and one
for sandbox.c. Let's do this properly instead.
Now, when we configure logs, we keep track of fds that should get told
about bad stuff happening from signal handlers. There's another entry
point for these that avoids using non-signal-handler-safe functions.
2013-11-18 10:43:15 -05:00
Nick Mathewson
b0023083c4
On Linux (and some other systems) we need -rdynamic for backtraces
2013-11-18 10:43:14 -05:00
Nick Mathewson
063bea58bc
Basic backtrace ability
...
On platforms with the backtrace/backtrace_symbols_fd interface, Tor
can now dump stack traces on assertion failure. By default, I log
them to DataDir/stack_dump and to stderr.
2013-11-18 10:43:14 -05:00
Roger Dingledine
dfc1b62fc5
forward-port the 0.2.4.18-rc changelog
2013-11-16 23:02:26 -05:00
Nick Mathewson
91ec6f7269
Have the OOM handler also count the age the data in a stream buffer
2013-11-15 18:38:52 -05:00
Nick Mathewson
7a2b30fe16
Merge remote-tracking branch 'origin/maint-0.2.4'
...
Conflicts:
src/or/relay.c
Conflict changes were easy; compilation fixes required were using
using TOR_SIMPLEQ_FIRST to get head of cell queue.
2013-11-15 15:35:00 -05:00
Nick Mathewson
59f50c80d4
Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4
...
Conflicts:
src/or/or.h
src/or/relay.c
Conflicts were simple to resolve. More fixes were needed for
compilation, including: reinstating the tv_to_msec function, and renaming
*_conn_cells to *_chan_cells.
2013-11-15 15:29:24 -05:00
Nick Mathewson
9e90707602
Merge branch 'bug9093_023' into maint-0.2.3
2013-11-15 15:23:51 -05:00
Nick Mathewson
f6e07c158f
Make the dir-key-crosscert element required
...
In proposal 157, we added a cross-certification element for
directory authority certificates. We implemented it in
0.2.1.9-alpha. All Tor directory authorities now generate it.
Here, as planned, make it required, so that we can finally close
proposal 157.
The biggest change in the code is in the unit test data, where some
old hardcoded certs that we made long ago have become no longer
valid and now need to be replaced.
2013-11-14 09:37:41 -05:00
Nick Mathewson
4aa9affec2
Fix test_cmdline_args to work with old openssl
...
If openssl was old, Tor would add a warning about its version in
between saying "no torrc found, using reasonable defaults" and
"configuration was valid".
2013-11-11 15:22:08 -05:00
Nick Mathewson
ff08b9b231
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-11-11 10:50:05 -05:00
Nick Mathewson
a82b18f216
missing changes file for #10124
2013-11-11 10:49:44 -05:00
Nick Mathewson
fc5a881bd3
Merge remote-tracking branch 'origin/maint-0.2.4'
2013-11-10 12:24:12 -05:00
Nick Mathewson
8bfa596c15
Fix two more DirServer mentions in log
2013-11-10 12:23:56 -05:00
Nick Mathewson
56ac75b265
Fix a wide line
2013-11-10 12:22:34 -05:00
Nick Mathewson
532f70a807
Change documentation DirServer->DirAuthority
...
We renamed the option, but we didn't actually fix it in the log
messages or the docs. This patch does that.
For #10124 . Patch by sqrt2.
2013-11-10 12:21:23 -05:00
Nick Mathewson
e30fb0a160
Tweak file documentation in tor.1.txt
2013-11-07 14:52:29 -05:00
rl1987
75d2ea8a99
Updating manpage to describe some of the data directory files.
2013-11-07 14:47:47 -05:00
Nick Mathewson
940d286a74
Documentation and tests for 10060
2013-11-07 14:42:58 -05:00
rl1987
86cfc64d45
Implementing --allow-missing-torrc CLI option.
2013-11-07 14:26:05 -05:00
Nick Mathewson
1b8ceb83c9
Improved circuit queue out-of-memory handler
...
Previously, when we ran low on memory, we'd close whichever circuits
had the most queued cells. Now, we close those that have the
*oldest* queued cells, on the theory that those are most responsible
for us running low on memory, and that those are the least likely to
actually drain on their own if we wait a little longer.
Based on analysis from a forthcoming paper by Jansen, Tschorsch,
Johnson, and Scheuermann. Fixes bug 9093.
2013-11-07 12:15:30 -05:00