Opened 4 months ago

Closed 4 months ago

#24976 closed defect (fixed)

Bug: src/or/hs_cache.c:628: cache_store_as_client: Non-fatal assertion !(cache_entry->desc->plaintext_data.revision_counter > client_desc->desc->plaintext_data.revision_counter) failed

Reported by: asn Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Normal Keywords: tor-hs prop224
Cc: Actual Points:
Parent ID: Points: 0.4
Reviewer: Sponsor:

Description

Got the following non-fatal assert in my hsv3 IRC client some weeks ago. The tor version is pretty old, but I don't think we changed anything in the between to fix this issue.

Dec 13 16:58:04.000 [warn] tor_bug_occurred_(): Bug: src/or/hs_cache.c:628: cache_store_as_client: Non-fatal assertion !(cache_entry->desc->plaintext_data.revision_counter > client_desc->desc->plaintext_data.revision_counter) failed. (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug: Non-fatal assertion !(cache_entry->desc->plaintext_data.revision_counter > client_desc->desc->plaintext_data.revision_counter) failed in cache_store_as_client at src/or/hs_cache.c:628. Stack trace: (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(log_backtrace+0x42) [0x7fe385e0b442] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(tor_bug_occurred_+0xb7) [0x7fe385e262c7] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(hs_cache_store_as_client+0x1c2) [0x7fe385de4fc2] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(connection_dir_reached_eof+0x1a67) [0x7fe385dbb757] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(+0x1067cf) [0x7fe385d927cf] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(+0x4dcf1) [0x7fe385cd9cf1] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7fe38530f3dc] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(do_main_loop+0x244) [0x7fe385cdad84] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(tor_main+0x1c25) [0x7fe385cde5c5] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(main+0x19) [0x7fe385cd64d9] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7fe3845022b1] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)
Dec 13 16:58:04.000 [warn] Bug:     ./tor/src/or/tor(_start+0x2a) [0x7fe385cd652a] (on Tor 0.3.2.1-alpha-dev f71ff0cabc36b5ae)

Looking at the code, it seems to me that this BUG() could also be caused by some sort of HSDir-desynch, where some HSDirs have a newer desc than others? Perhaps we could look into this (altho it might be caused naturally with network issues), or just remove the BUG from that if statement, since it's handled pretty well?

Not a serious bug all in all.

Child Tickets

Change History (6)

comment:1 Changed 4 months ago by nickm

Component: - Select a componentCore Tor/Tor

comment:2 Changed 4 months ago by nickm

I think removing the BUG() is the right fix: it's not a bug if the hsdir has an older one than the one we had.

comment:3 Changed 4 months ago by dgoulet

Owner: set to dgoulet
Status: newaccepted

comment:4 Changed 4 months ago by dgoulet

Status: acceptedmerge_ready

Oneliner fix. Branch: bug24976_033_01

comment:5 Changed 4 months ago by asn

LGTM! :)

comment:6 Changed 4 months ago by nickm

Milestone: Tor: 0.3.3.x-finalTor: 0.3.2.x-final
Resolution: fixed
Status: merge_readyclosed

Cherry-picked to 0.3.2.x, since that's where the bug is. Merged forward. Thanks!

Note: See TracTickets for help on using tickets.