Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4873 closed defect (fixed)

[Error] connection_or_handle_event_cb(): Bug: connection_or.c:1281: connection_or_handle_event_cb: Assertion handshakes >= 2 failed; aborting.

Reported by: stars Owned by:
Priority: High Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.10-alpha
Severity: Keywords: tls crash regression tor-relay
Cc: stars@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi ,

From a couple days, i can't anymore finish the bootstrap with my relay.

I running kubuntu Oneric 64 bits Linux 3.0.0-15-server #25-Ubuntu SMP Mon Jan 2 19:14:55 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
OpenSSL 1.0.1-beta1 03 Jan 2012
Tor: janv. 08 14:55:34.841 [Notice] Tor v0.2.3.10-alpha-dev (git-59d0a5ae693efe93) (with bufferevents) running on Linux x86_64.
Initialized libevent version 2.1.0-alpha-dev using method epoll (with changelist). Good. tested with release-2.0.15-stable

janv. 08 14:56:07.127 [Warning] TLS error while handshaking (with bufferevent) with [scrubbed]: wrong cipher returned (in SSL routines:SSL3_GET_SERVER_HELLO:SSLv3 read server hello B)
janv. 08 14:56:07.767 [Warning] Problem bootstrapping. Stuck at 85%: Finishing handshake with first hop. (DONE; DONE; count 33; recommendation warn)
janv. 08 14:56:07.768 [Warning] 33 connections have failed:
janv. 08 14:56:07.768 [Warning] 33 connections died in state handshaking (TLS) with SSL state SSLv3 read server hello B
janv. 08 14:56:08.135 [Warning] TLS error while handshaking (with bufferevent) with [scrubbed]: wrong cipher returned (in SSL routines:SSL3_GET_SERVER_HELLO:SSLv3 read server hello B)
janv. 08 14:56:08.607 [Warning] Problem bootstrapping. Stuck at 85%: Finishing handshake with first hop. (DONE; DONE; count 34; recommendation warn)
janv. 08 14:56:08.607 [Warning] 34 connections have failed:
janv. 08 14:56:08.608 [Warning] 34 connections died in state handshaking (TLS) with SSL state SSLv3 read server hello B
janv. 08 14:56:08.936 [Warning] tor_tls_finish_handshake(): Bug: For some reason, wasV2Handshake didn't get set. Fixing that.
janv. 08 14:56:08.937 [Error] connection_or_handle_event_cb(): Bug: connection_or.c:1281: connection_or_handle_event_cb: Assertion handshakes >= 2 failed; aborting

Child Tickets

Change History (11)

comment:1 Changed 8 years ago by arma

See #4592 for a ticket that predicts this would never happen.

comment:2 Changed 8 years ago by stars

Cc: stars@… added

Hi arma,

I have deleted all old openssl library maually and updated to last Tor origin/master version: janv. 08 19:04:48.251 [Notice] Tor v0.2.3.10-alpha-dev (git-ecdea4eeafd921f0) (with bufferevents) running on Linux x86_64. and now finally worked again.

Best Regards

SwissTorExit

comment:3 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:4 Changed 8 years ago by nickm

Priority: blockermajor

comment:5 Changed 8 years ago by nickm

Keywords: tls crash regression added

comment:6 Changed 8 years ago by nickm

Status: newneeds_review

Turning this from an assert into a warn-and-close. I suspect that it was some kind of version mismatch deal, but if not, we should at least not crash next time.

See my branch bug4873. You'll want to review it with "diff -b" or equivalent, since it changes some indentation.

comment:7 Changed 8 years ago by ln5

Perhaps getting rid of the return in the first if clause in the block
where tor_tls_used_v1_handshake(conn->tls) != 0 (handshakes == 1)
would be proper? (We do return after the if clause so the return here
and shouldn't bring the idea of returning from each block into this
block too.)

And a log string fix: s/unexpectedly unexpectedly/unexpectedly/1.
Unless that's meant to be a funny way of expressing major
non-expectedness of course.

comment:8 in reply to:  7 Changed 8 years ago by ln5

Replying to ln5:

Perhaps getting rid of the return in the first if clause in the block
where tor_tls_used_v1_handshake(conn->tls) != 0 (handshakes == 1)
would be proper? (We do return after the if clause so the return here
and shouldn't bring the idea of returning from each block into this
block too.)

Wow, that wasn't very coherent. Please see bug4873_ln in my public
repo. After all, a commit says more than a thousand badly formed
sentences in a bug report.

comment:9 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looks like an improvement to me; merging it. Thanks!

comment:10 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:11 Changed 7 years ago by nickm

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