[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/maint-0.3.1] Add a stack trace to the warning at issue with 23105.
commit 9c404602a0a5dd0b916957f4c456c59defecea13
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Sep 7 08:49:11 2017 -0400
Add a stack trace to the warning at issue with 23105.
With luck, this will help us diagnose 23105 and fix it.
I also added a stack trace to the warning right before it, since why
not.
---
changes/bug23105-diagnostic | 4 ++++
src/or/relay.c | 3 +++
2 files changed, 7 insertions(+)
diff --git a/changes/bug23105-diagnostic b/changes/bug23105-diagnostic
new file mode 100644
index 000000000..8ba4931e3
--- /dev/null
+++ b/changes/bug23105-diagnostic
@@ -0,0 +1,4 @@
+ o Minor features (diagnostic):
+ - Add a stack trace to the bug warnings that can be logged when
+ trying to send an outgoing relay cell with n_chan == 0.
+ Diagnostic attempt for bug 23105.
diff --git a/src/or/relay.c b/src/or/relay.c
index 0ff53ed5e..cb1a0692b 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -48,6 +48,7 @@
#define RELAY_PRIVATE
#include "or.h"
#include "addressmap.h"
+#include "backtrace.h"
#include "buffers.h"
#include "channel.h"
#include "circpathbias.h"
@@ -511,11 +512,13 @@ circuit_package_relay_cell(cell_t *cell, circuit_t *circ,
if (!chan) {
log_warn(LD_BUG,"outgoing relay cell sent from %s:%d has n_chan==NULL."
" Dropping.", filename, lineno);
+ log_backtrace(LOG_WARN,LD_BUG,"");
return 0; /* just drop it */
}
if (!CIRCUIT_IS_ORIGIN(circ)) {
log_warn(LD_BUG,"outgoing relay cell sent from %s:%d on non-origin "
"circ. Dropping.", filename, lineno);
+ log_backtrace(LOG_WARN,LD_BUG,"");
return 0; /* just drop it */
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits