Opened 5 years ago

Closed 5 years ago

#16829 closed defect (fixed)

tor: src/common/log.c:484: logv: Assertion `severity >= 3 && severity <= 7' failed.

Reported by: arma Owned by:
Priority: High Milestone: Tor: 0.2.7.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: crash
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


On moria1:

#0  0x00007fbf4e9c9625 in raise () from /lib64/
#1  0x00007fbf4e9cae05 in abort () from /lib64/
#2  0x00007fbf4e9c274e in __assert_fail_base () from /lib64/
#3  0x00007fbf4e9c2810 in __assert_fail () from /lib64/
#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 ?

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by arma

I am running moria1 with 20254907d7 reverted. So far so good I think.

comment:2 Changed 5 years ago by arma

Looks like the fix might be to pass 'severity' through on that other call to dirserv_get_status_impl(), and also to fix the first function prototype declaration.

comment:3 Changed 5 years ago by nickm

Keywords: crash added
Priority: normalmajor
Resolution: fixed
Status: newclosed

Should be fixed in 2691b2bb064466c96c346e6a416658b8b4749a85. Thanks!

Note: See TracTickets for help on using tickets.