tor_tls_server_info_callback(): SSL3_ST_SW_SRVR_HELLO_B missed.

		case SSL3_ST_SW_SRVR_HELLO_A:
		case SSL3_ST_SW_SRVR_HELLO_B:
			ret=ssl3_send_server_hello(s);
			if (ret <= 0) goto end;
#ifndef OPENSSL_NO_TLSEXT
			if (s->hit)
				{
				if (s->tlsext_ticket_expected)
					s->state=SSL3_ST_SW_SESSION_TICKET_A;
				else
					s->state=SSL3_ST_SW_CHANGE_A;
				}
#else
			if (s->hit)
					s->state=SSL3_ST_SW_CHANGE_A;
#endif
			else
				s->state=SSL3_ST_SW_CERT_A;
			s->init_num=0;
			break;
			if ((cb != NULL) && (s->state != state))
				{
				new_state=s->state;
				s->state=state;
				cb(s,SSL_CB_ACCEPT_LOOP,1);
				s->state=new_state;
				}

As non blocking io ssl3_send_server_hello() can return -1 (can't to fit all bytes of record in wire), and no CallBack of tor's tor_tls_server_info_callback(). Later SSL_accept() calling callback with s->state == SSL3_ST_SW_SRVR_HELLO_B.

If relay can't to fit server's hello in wire once, it never can finish v2 link hanshake.

Trac:
Username: troll_un