Opened 5 weeks ago

Last modified 2 weeks ago

#24977 needs_information defect

Non-fatal assertion !(tor_mem_is_zero((const char*)node->hsdir_index->fetch, DIGEST256_LEN))

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

Description

This one is back, since pre-release days of hsv3. Something makes it such that the hsdir index is not well set for some relays.

I got this to happen on my hsv3 service a few weeks ago. I got it a few times on the same second for the same node, and then it got fixed... There were no other references to that node (or its fpr) before that.

Jan 04 21:30:54.000 [warn] tor_bug_occurred_(): Bug: src/or/hs_common.:1277: node_has_hsdir_index: Non-fatal assertion !(tor_mem_is_zero((const char*)node->hsdir_index->fetch, DIGEST256_LEN)) failed. (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug: Non-fatal assertion !(tor_mem_is_zero((const char*)node->hsdir_index->fetch, DIGEST256_LEN)) failed in node_has_hsdir_index at src/or/hs_common.c:1277. Stack trace: (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(log_backtrace+0x42) [0x7f6079a21db2] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(tor_bug_occurred_+0xb7) [0x7f6079a3cc57] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(hs_get_responsible_hsdirs+0x4f9) [0x7f6079a046c9] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(hs_service_run_scheduled_events+0x1a5b) [0x7f6079a11c5b] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(+0x4b9f1) [0x7f60798ed9f1] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(+0x6b4f0) [0x7f607990d4f0] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7f6078f253dc] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(do_main_loop+0x244) [0x7f60798f0eb4] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(tor_main+0x1c25) [0x7f60798f46f5] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(main+0x19) [0x7f60798ec629] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) [0x7f60781182b1] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [warn] Bug:     ./tor/src/or/tor(_start+0x2a) [0x7f60798ec67a] (on Tor 0.3.2.6-alpha-dev b6fd78ea301bd089)
Jan 04 21:30:55.000 [info] hs_get_responsible_hsdirs(): Node $EEC47B34F9403AA7F765D070BB3011E50A373C21~ivanmk2 at 185.22.173.162 was found without hsdir index.
Jan 04 21:30:55.000 [info] run_upload_descriptor_event(): Initiating upload for hidden service current descriptor for service onion with 3/3 introduction points.

Child Tickets

Change History (4)

comment:1 Changed 5 weeks ago by nickm

Component: - Select a componentCore Tor/Tor

comment:2 Changed 3 weeks ago by dgoulet

Owner: set to dgoulet
Status: newaccepted

comment:3 Changed 3 weeks ago by dgoulet

Hmmm I have not seen that on any of my v3 services for a _while_ now.

What I can see that makes me wonder. We can have node_t without an ed25519 known ID that is before we get the descriptor.

Notice node_set_hsdir_index(), it doesn't set anything if the node_get_ed25519_id() returns NULL. We only set HSDir index if rs->supports_v3_hsdir meaning when we have a rs. But the hs_get_responsible_hsdirs() looks up the node by identity_digest ...

And node_supports_v3_hsdir() can return true with only using the ri and not the rs ... so we have this difference here where we only set the indexes if we have a rs but then we can also validate HSDir support by ri.

Although, in this situation, we loop over the rs list so any node_t we look at from the rs->identity_digest should return a node that has a valid rs....

Very puzzling!

comment:4 Changed 2 weeks ago by asn

Milestone: Tor: 0.3.3.x-finalTor: 0.3.4.x-final
Status: acceptedneeds_information

Yep, this needs more debugging and more logs. Seems quite rare right now. Pushing to 034 until more info arrives.

Note: See TracTickets for help on using tickets.