[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] improve log messages to try to track down #17659
commit 0c7bfb206ea14ea3115c1b8b214ec79f5e6694e1
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu Nov 26 12:44:12 2015 -0500
improve log messages to try to track down #17659
---
src/or/connection_edge.c | 14 +++++++++-----
src/or/connection_edge.h | 5 ++++-
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index aad1ea4..496fe21 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -800,8 +800,10 @@ connection_ap_attach_pending(int retry)
continue;
}
if (conn->state != AP_CONN_STATE_CIRCUIT_WAIT) {
- log_warn(LD_BUG, "%p is no longer in circuit_wait. Why is it on "
- "pending_entry_connections?", entry_conn);
+ log_warn(LD_BUG, "%p is no longer in circuit_wait. Its current state "
+ "is %s. Why is it on pending_entry_connections?",
+ entry_conn,
+ conn_state_to_string(conn->type, conn->state));
SMARTLIST_DEL_CURRENT(pending_entry_connections, entry_conn);
continue;
}
@@ -831,7 +833,8 @@ connection_ap_attach_pending(int retry)
* call connection_ap_attach_pending().
*/
void
-connection_ap_mark_as_pending_circuit(entry_connection_t *entry_conn)
+connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn,
+ const char *fname, int lineno)
{
connection_t *conn = ENTRY_TO_CONN(entry_conn);
tor_assert(conn->state == AP_CONN_STATE_CIRCUIT_WAIT);
@@ -843,8 +846,9 @@ connection_ap_mark_as_pending_circuit(entry_connection_t *entry_conn)
if (PREDICT_UNLIKELY(smartlist_contains(pending_entry_connections,
entry_conn))) {
- log_warn(LD_BUG, "What?? pending_entry_connections already contains %p!",
- entry_conn);
+ log_warn(LD_BUG, "What?? pending_entry_connections already contains %p! "
+ "(called from %s:%d)",
+ entry_conn, fname, lineno);
return;
}
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index 521e759..90cf2a3 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -66,7 +66,10 @@ int connection_ap_can_use_exit(const entry_connection_t *conn,
void connection_ap_expire_beginning(void);
void connection_ap_rescan_and_attach_pending(void);
void connection_ap_attach_pending(int retry);
-void connection_ap_mark_as_pending_circuit(entry_connection_t *entry_conn);
+void connection_ap_mark_as_pending_circuit_(entry_connection_t *entry_conn,
+ const char *file, int line);
+#define connection_ap_mark_as_pending_circuit(c) \
+ connection_ap_mark_as_pending_circuit_((c), __FILE__, __LINE__)
void connection_ap_fail_onehop(const char *failed_digest,
cpath_build_state_t *build_state);
void circuit_discard_optional_exit_enclaves(extend_info_t *info);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits