[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #5650 [Tor]: Tor hogging CPU
#5650: Tor hogging CPU
--------------------------+------------------------------------
Reporter: One Sock | Owner: nickm
Type: defect | Status: closed
Priority: major | Milestone: Tor: 0.2.3.x-final
Component: Tor | Version:
Resolution: fixed | Keywords: tor-relay 023-backport
Actual Points: | Parent ID:
Points: |
--------------------------+------------------------------------
Comment (by cypherpunks):
Merged fix do hides real reason of this bug. Suggests another way to fix
it.
{{{
--- connection.origin.c
+++ connection.c
@@ -3068,16 +3068,8 @@
connection_start_writing(conn);
return 0;
case TOR_TLS_WANTREAD:
- if (conn->in_connection_handle_write) {
- /* We've been invoked from connection_handle_write, because
we're
- * waiting for a TLS renegotiation, the renegotiation started,
and
- * SSL_read returned WANTWRITE. But now SSL_read is saying
WANTREAD
- * again. Stop waiting for write events now, or else we'll
- * busy-loop until data arrives for us to read. */
- connection_stop_writing(conn);
- if (!connection_is_reading(conn))
- connection_start_reading(conn);
- }
+ if (!connection_is_reading(conn)) /* XXX: It's bug if no reading
*/
+ connection_start_reading(conn);
/* we're already reading, one hopes */
result = 0;
break;
@@ -3500,6 +3492,7 @@
}
return 0;
} else if (conn->state == OR_CONN_STATE_TLS_SERVER_RENEGOTIATING) {
+ connection_stop_writing(conn);
return connection_handle_read(conn);
}
}}}
in_connection_handle_write flag is no need anymore.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5650#comment:37>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs