Opened 12 years ago

Last modified 7 years ago

#574 closed defect (Fixed)

bridge or_conns aren't always setting identity map

Reported by: arma Owned by:
Priority: Low Milestone: 0.2.0.x-final
Component: Core Tor/Tor Version: 0.2.0.9-alpha
Severity: Keywords:
Cc: arma, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Dec 21 05:45:37.909 [warn] connection_or_remove_from_identity_map(): Bug: Didn't

find connection '$BD1A1566356ECC9FBF2BB8DE2CEE8C3F39BE61C9' on identity map whe

n trying to remove it.
Dec 21 05:45:37.909 [warn] connection_or_remove_from_identity_map(): Bug: Didn't

find connection '$BD1A1566356ECC9FBF2BB8DE2CEE8C3F39BE61C9' on identity map whe

n trying to remove it.
Dec 21 05:45:37.910 [warn] _connection_free(): Bug: called on OR conn with non-z
eroed identity_digest

I usually get this when I kill my bridge while the bridge user's connection to it
is still open.

I used to think it was due to the "unkeyed bridge" concept, where we don't specify
a digest and leave the or_conn with a digest of 000..000 for a while at the start.

But now I'm not so sure; I think I've seen this in cases where we specify the
digest when configuring the bridge too.

This bug has been around since 0.2.0.7-alpha or so. It appears harmless, but still
worth fixing sometime.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 12 years ago by arma

This is an 0.2.0.x bug. Roger needs to work with Nick to figure out what's
supposed to happen and what isn't happening.

comment:2 Changed 12 years ago by nickm

Okay, here's a fun debugging technique for the next time we run into this: Edit or.h to make
the identity_digest field in or_connection_t const. That way, we will get a warning for every line of code
that changes the value of or_identity_digest. If everything is right, all such lines should be in
connection_or_set_identity_digest(), connnection_or_remove_from_identity_map(), and connection_or_clear_identity_map().

But! It turned out that there was a rogue memcpy in connection_or_check_valid_tls_handshake! That must be the
cause of this.

comment:3 Changed 12 years ago by nickm

Fixed by r13341.

comment:4 Changed 12 years ago by nickm

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.