Opened 5 months ago

Closed 4 months ago

#21128 closed defect (fixed)

Bug: src/or/entrynodes.c:2266: entry_guard_failed: Non-fatal assertion !(*guard_state_p == NULL) failed. (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)

Reported by: asn Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version: Tor: 0.3.0.1-alpha
Severity: Normal Keywords: tor-guard
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by asn)

I was messing around with my state file to simulate various guard scenarios, and I ended up getting the following non-fatal assert. This happened when I replaced confirmed_on=2016 with confirmed_on=2014 in my state file, so that I test guard expiry:

Jan 03 14:09:42.000 [warn] Tried connecting to router at 91.219.236.222:443, but RSA identity key was not as expected: wanted EC413181CEB1C8EDC17608BBB177CD5FD8535E99 + no ed25519 key but got 20704E7DD51501DC303FA51B738D7B7E61397CF6 + no ed25519 key.
Jan 03 14:09:42.000 [warn] tor_bug_occurred_(): Bug: src/or/entrynodes.c:2266: entry_guard_failed: Non-fatal assertion !(*guard_state_p == NULL) failed. (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug: Non-fatal assertion !(*guard_state_p == NULL) failed in entry_guard_failed at src/or/entrynodes.c:2266. Stack trace: (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /usr/lib/x86_64-linux-gnu/libasan.so.1(backtrace+0x3a) [0x7f8a4383a48a] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(log_backtrace+0x46) [0x7f8a451fa806] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(tor_bug_occurred_+0x12f) [0x7f8a4524a6df] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(entry_guard_chan_failed+0x1f3) [0x7f8a451bac43] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(connection_or_client_learned_peer_id+0x8d7) [0x7f8a4510b3f7] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(channel_tls_handle_var_cell+0x613b) [0x7f8a45015d3b] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x7faa0f) [0x7f8a45103a0f] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x7dc2f8) [0x7f8a450e52f8] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x57df56) [0x7f8a44e86f56] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/libevent-2.0.so.5(event_base_loop+0x937) [0x7f8a430bc8d7] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(do_main_loop+0x385) [0x7f8a44e88d75] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(tor_main+0x1385) [0x7f8a44e8dbc5] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(main+0x1c) [0x7f8a44e7bddc] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f8a41314b45] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)
Jan 03 14:09:42.000 [warn] Bug:     /home/user/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x574e9b) [0x7f8a44e7de9b] (on Tor 0.3.0.0-alpha-dev 5a97a46e60c95b6f)

This error message appeared on startup and the RSA identity key error message has nothing to do with confirmed_on so that was a bit surprising.

Child Tickets

Change History (5)

comment:1 Changed 5 months ago by asn

  • Description modified (diff)

comment:2 Changed 4 months ago by nickm

  • Owner set to nickm
  • Status changed from new to accepted

comment:3 Changed 4 months ago by nickm

  • Status changed from accepted to needs_review

This is happening when a channel fails and at least one circuit that's pending for that channel doesn't have an associated guard state. _That_ can happen when we are trying to use a fallback directory, or when we're not using guards at all for some reason.

The sensible fix here is in branch bug21128. The underlying cause has something to do with a circuit that _isn't_ using a guard, not one that is.

comment:4 Changed 4 months ago by asn

  • Status changed from needs_review to merge_ready

Fix looks good to me.

comment:5 Changed 4 months ago by nickm

  • Resolution set to fixed
  • Status changed from merge_ready to closed

Thanks; merged!

Note: See TracTickets for help on using tickets.