von / PerProxy

A python-based proxy that uses Perspectives to detect and thwart SSL MITM attacks.
7 stars 2 forks source link

Caught PerProxy running amuck (high CPU usage) #25

Open von opened 13 years ago

von commented 13 years ago

Caught PerProxy running at 100%+ CPU (dual core Mac).

Apparently doing nothing - logging showed no activity, but debug mode was not on.

von commented 13 years ago

Again: USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND von 35337 148.6 0.4 98156 14748 s002 R+ 5:54PM 5:42.94 /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ./PerProxy.py -d

Debug mode was on, but no apparent activity. This was current master branch.

von commented 13 years ago

Following up on 98a94ef, I'm seeing the following:

PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Writing 4298 bytes to client at 127.0.0.1:55346
PerProxy: Reading from server at s-external.ak.fbcdn.net:443
PerProxy: Ignoring read of None from server at s-external.ak.fbcdn.net:443
PerProxy: Reading from server at s-external.ak.fbcdn.net:443
PerProxy: Writing 2674 bytes to client at 127.0.0.1:55342
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Ignoring read of None from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reading from server at fbcdn-profile-a.akamaihd.net:443
PerProxy: Reach threshold (5) for None reads

Seen for fbcdn-profile-a.akamaihd.net, s-external.ak.fbcdn.net, api.del.icio.us, www.facebook.com

Haven't seen any CPU problems recently either, so I suspect this may be it.

von commented 13 years ago

I notice that photo downloads from FB are sometimes getting cut off with the threshold with partial photos being downloaded.

von commented 13 years ago

I'm consistently getting no visible content from https://bugzilla.mozilla.org because of None reads

2011-08-02 10:02:37,879:Thread-172:DEBUG:Starting SSL with client...
2011-08-02 10:02:37,917:Thread-172:DEBUG:SSL with client successful
2011-08-02 10:02:37,918:Thread-172:INFO:Entering pass_through mode
2011-08-02 10:02:37,918:Thread-172:DEBUG:Reading from client at 127.0.0.1:49700
2011-08-02 10:02:37,918:Thread-172:DEBUG:recv()...
2011-08-02 10:02:37,919:Thread-172:DEBUG:...returned 604 bytes
2011-08-02 10:02:37,919:Thread-172:DEBUG:recv()...
2011-08-02 10:02:37,919:Thread-172:DEBUG:...returned None
2011-08-02 10:02:37,919:Thread-172:DEBUG:Writing 604 bytes to server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,129:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,131:Thread-172:DEBUG:Writing 370 bytes to client at 127.0.0.1:49700
2011-08-02 10:02:39,133:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,134:Thread-172:DEBUG:Ignoring read of None from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,245:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,245:Thread-172:DEBUG:Ignoring read of None from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,248:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,248:Thread-172:DEBUG:Ignoring read of None from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,251:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,251:Thread-172:DEBUG:Ignoring read of None from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,254:Thread-172:DEBUG:Reading from server at bugzilla.mozilla.org:443
2011-08-02 10:02:39,254:Thread-172:INFO:Reached threshold (5) for None reads, treating as EOF
2011-08-02 10:02:39,254:Thread-172:INFO:Pass through done.
2011-08-02 10:02:39,254:Thread-172:DEBUG:Closing client connection
2011-08-02 10:02:39,255:Thread-172:INFO:Done.
von commented 13 years ago

Original bug dealing with the None read issue: https://github.com/von/PerProxy/issues/12