[tor-bugs] #31958 [Core Tor/Tor]: connection_dir_is_anonymous: Non-fatal assertion !(CONST_TO_OR_CIRCUIT(circ)->p_chan == NULL) failed

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Oct 3 21:05:23 UTC 2019


#31958: connection_dir_is_anonymous: Non-fatal assertion
!(CONST_TO_OR_CIRCUIT(circ)->p_chan == NULL) failed
--------------------------------+----------------------------------
     Reporter:  dgoulet         |      Owner:  (none)
         Type:  defect          |     Status:  new
     Priority:  Medium          |  Milestone:  Tor: 0.4.2.x-final
    Component:  Core Tor/Tor    |    Version:
     Severity:  Normal          |   Keywords:  regression, 042-must
Actual Points:                  |  Parent ID:
       Points:                  |   Reviewer:
      Sponsor:  Sponsor27-must  |
--------------------------------+----------------------------------
 Hmm, I just noticed this on one of my test relay:

 {{{
 Sep 14 17:35:18.196 [warn] tor_bug_occurred_(): Bug:
 src/feature/dircommon/directory.c:229: connection_dir_is_anonymous: Non-
 fatal assertion !(CONST_TO_OR_CIRCUIT(circ)->p_chan == NULL) failed.
 (Future instances of this warning will be silenced.) (on Tor 0.4.2.0
 -alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug: Tor 0.4.2.0-alpha-dev (git-
 796a9b37ea346f41): Non-fatal assertion !(CONST_TO_OR_CIRCUIT(circ)->p_chan
 == NULL) failed in connection_dir_is_anonymous at
 src/feature/dircommon/directory.c:229. Stack trace: (on Tor 0.4.2.0-alpha-
 dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(log_backtrace_impl+0x46) [0x56174b20aae6] (on
 Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(tor_bug_occurred_+0x16c) [0x56174b205d9c] (on
 Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(connection_dir_is_anonymous+0x131)
 [0x56174b0ef421] (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(directory_handle_command+0x1ef) [0x56174b19755f]
 (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(connection_dir_process_inbuf+0x95)
 [0x56174b0efb85] (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(connection_handle_read+0xa0d) [0x56174b064bfd]
 (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /root/git/tor/src/app/tor(+0x6fe0e)
 [0x56174b069e0e] (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /usr/lib/x86_64-linux-
 gnu/libevent-2.1.so.6(+0x1e8f8) [0x7f65e17278f8] (on Tor 0.4.2.0-alpha-dev
 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /usr/lib/x86_64-linux-
 gnu/libevent-2.1.so.6(event_base_loop+0x53f) [0x7f65e172833f] (on Tor
 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(do_main_loop+0xd9) [0x56174b06b0f9] (on Tor
 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(tor_run_main+0x128d) [0x56174b058c8d] (on Tor
 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:
 /root/git/tor/src/app/tor(tor_main+0x3a) [0x56174b0560ca] (on Tor 0.4.2.0
 -alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /root/git/tor/src/app/tor(main+0x19)
 [0x56174b055c59] (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /lib/x86_64-linux-
 gnu/libc.so.6(__libc_start_main+0xe7) [0x7f65e09c2b97] (on Tor 0.4.2.0
 -alpha-dev 796a9b37ea346f41)
 Sep 14 17:35:18.257 [warn] Bug:     /root/git/tor/src/app/tor(_start+0x2a)
 [0x56174b055caa] (on Tor 0.4.2.0-alpha-dev 796a9b37ea346f41)
 }}}

 This is recent code that reject HSDir single hop connections (#24964).
 Offending piece of code is:

 {{{
   /* Get the previous channel to learn if it is a client or relay link. */
   if (BUG(CONST_TO_OR_CIRCUIT(circ)->p_chan == NULL)) {
     log_info(LD_DIR, "Rejected HSDir request: no p_chan");
     return false;
   }
 }}}

 Not sure why this can BUG()...

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31958>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list