[tor-bugs] #16829 [Tor]: tor: src/common/log.c:484: logv: Assertion `severity >= 3 && severity <= 7' failed.

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Aug 16 07:51:41 UTC 2015


#16829: tor: src/common/log.c:484: logv: Assertion `severity >= 3 && severity <= 7'
failed.
--------------------+------------------------------------
 Reporter:  arma    |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:  Tor: 0.2.7.x-final
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 On moria1:
 {{{
 #0  0x00007fbf4e9c9625 in raise () from /lib64/libc.so.6
 #1  0x00007fbf4e9cae05 in abort () from /lib64/libc.so.6
 #2  0x00007fbf4e9c274e in __assert_fail_base () from /lib64/libc.so.6
 #3  0x00007fbf4e9c2810 in __assert_fail () from /lib64/libc.so.6
 #4  0x00007fbf5019bc61 in logv (severity=1, domain=16384,
     funcname=0x7fbf5022e9d0 "dirserv_get_status_impl", suffix=0x0,
     format=0x7fbf5022ddd0 "Not marking '%s' valid because of address
 '%s'",
     ap=0x7ffc23068590) at src/common/log.c:484
 #5  0x00007fbf5019be5c in log_fn_ (severity=<value optimized out>,
     domain=<value optimized out>, fn=<value optimized out>,
     format=<value optimized out>) at src/common/log.c:688
 #6  0x00007fbf501696b9 in dirserv_get_status_impl (
     id_digest=<value optimized out>, nickname=0x7fbf55542780 "[nickname]",
     addr=401543737, or_port=9001, platform=<value optimized out>,
     msg=0x7ffc23068888, severity=1) at src/or/dirserv.c:369
 #7  0x00007fbf50169850 in dirserv_router_get_status
 (router=0x7fbf55ac9400,
     msg=0x7ffc23068888, severity=6) at src/or/dirserv.c:291
 [...]
 }}}

 Here's the function prototype for dirserv_get_status_impl:
 {{{
 static uint32_t
 dirserv_get_status_impl(const char *fp, const char *nickname,
                         uint32_t addr, uint16_t or_port,
                         const char *platform, const char **msg,
                         int should_log);
 }}}

 And now here's a place where we call it with the last argument being
 reasonable:
 {{{
   return dirserv_get_status_impl(d, router->nickname,
                                  router->addr, router->or_port,
                                  router->platform, msg, 1);
 }}}

 and here's a place where we call it with...a severity as the last
 argument?
 {{{
   res = dirserv_get_status_impl(rs->identity_digest, rs->nickname,
                                 rs->addr, rs->or_port,
                                 NULL, NULL, LOG_DEBUG);
 }}}

 Looks like the problem came in during commit 20254907d7 ?

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


More information about the tor-bugs mailing list