[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: assert() crasher in circuitlist.c:414



On Mon, Oct 11, 2004 at 02:49:04AM +0400, Joe Magic wrote:
> lately we where able to reproduce a crasher bug on a
> windows xp system. as that happened a few times we
> truned on the debug-mode before.
> 
> [notice] Tor 0.0.9pre2 opening new log file.
> ...
> [warn] Stream is 15 secondslate. Retrying.
> [warn] circ (length: 3, exit random): solid(open)
> err(open) random(open)
> [warn] No Tor server exists that allows exit to
> xxx.xxx.xxx.xxx:4662. Rejecting. (please note that I
> replaced the ip-address with xxx)
> [err] D:\\Documents and Settings\\someone\\My
> Documents\\tor\\src\\or\\circuitlist.c:414: ???: Assertion 
> 0 failed; aborting.

Hi,

Thanks for sending the assert line. Below is a patch so you can change
your code and let me know if that fixes it. (Or if you want us to build
a new exe with the patch in it, let me know and we will.)

One question for you, though -- were the [warn] lines above printed with
about the same timestamp, or were there many minutes between them?

Thanks again! All of you should please keep sending me your assert bugs.
--Roger

diff -u -r1.10 circuitlist.c
--- circuitlist.c       29 Sep 2004 06:52:35 -0000      1.10
+++ circuitlist.c       10 Oct 2004 23:21:38 -0000
@@ -411,6 +411,7 @@
       tor_assert(cp->handshake_state);
       break;
     default:
+      log_fn(LOG_WARN,"Unexpected state %d",cp->state);
       tor_assert(0);
     }
   tor_assert(cp->package_window >= 0);

diff -u -r1.14 circuituse.c
--- circuituse.c        3 Oct 2004 19:39:29 -0000       1.14
+++ circuituse.c        11 Oct 2004 01:07:35 -0000
@@ -333,6 +333,8 @@

   tor_assert(circ && conn);

+  conn->cpath_layer = NULL; /* make sure we don't keep a stale pointer */
+
   if(conn == circ->p_streams) {
     circ->p_streams = conn->next_stream;
     return;