[mozproxy] mozproxy logs an error when mitmproxy shuts down and causes tests to fail
Categories
(Testing :: Mozbase, defect)
Tracking
(firefox68 fixed)
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: erahm, Assigned: erahm)
References
Details
Attachments
(1 file)
See bug 1532491, comment 15-17.
If we specify --no-upstream-cert
mitmproxy sets an error code on exit for the AWSY tp6-based tests. From what I can tell the playback actually runs fine (I've visually verified this locally). This causes mozproxy
shutdown logic to log an error which will cause the test to fail in automation.
The simplest solution is to just not log at the error level. Given we're using a 2 year old version of mitmproxy this is probably the best option.
Assignee | ||
Comment 1•5 years ago
|
||
mitmproxy appears to return an error code of 1 if we use the --no-upstream-cert
. The actual playback works fine, this patch reduces the log level to info
in order to prevent tests from erroneously failing due to this error code.
Comment 2•5 years ago
|
||
The actual underlying problem here seems to be a crash of mitmproxy:
WebSocket connection closed by client: (status code missing) (message missing), unknown status code
Traceback (most recent call last):
File "mitmproxy/proxy/server.py", line 119, in handle
File "mitmproxy/proxy/modes/http_proxy.py", line 9, in call
File "mitmproxy/proxy/protocol/tls.py", line 383, in call
File "mitmproxy/proxy/protocol/http1.py", line 72, in call
File "mitmproxy/proxy/protocol/http.py", line 188, in call
File "mitmproxy/proxy/protocol/http.py", line 257, in _process_flow
File "mitmproxy/proxy/protocol/http.py", line 206, in handle_regular_connect
File "mitmproxy/proxy/protocol/tls.py", line 383, in call
File "mitmproxy/proxy/protocol/http1.py", line 72, in call
File "mitmproxy/proxy/protocol/http.py", line 188, in call
File "mitmproxy/proxy/protocol/http.py", line 420, in _process_flow
File "mitmproxy/proxy/protocol/websocket.py", line 154, in call
File "mitmproxy/net/tcp.py", line 387, in ssl_read_select
TypeError: argument must be an int, or have a fileno() method.mitmproxy has crashed!
We are upgrading to mitmproxy 4.0.4 over on bug 1457274, and it should land hopefully soon. Would that solve your problem Eric?
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+1] from comment #2)
The actual underlying problem here seems to be a crash of mitmproxy:
WebSocket connection closed by client: (status code missing) (message missing), unknown status code
Traceback (most recent call last):
File "mitmproxy/proxy/server.py", line 119, in handle
File "mitmproxy/proxy/modes/http_proxy.py", line 9, in call
File "mitmproxy/proxy/protocol/tls.py", line 383, in call
File "mitmproxy/proxy/protocol/http1.py", line 72, in call
File "mitmproxy/proxy/protocol/http.py", line 188, in call
File "mitmproxy/proxy/protocol/http.py", line 257, in _process_flow
File "mitmproxy/proxy/protocol/http.py", line 206, in handle_regular_connect
File "mitmproxy/proxy/protocol/tls.py", line 383, in call
File "mitmproxy/proxy/protocol/http1.py", line 72, in call
File "mitmproxy/proxy/protocol/http.py", line 188, in call
File "mitmproxy/proxy/protocol/http.py", line 420, in _process_flow
File "mitmproxy/proxy/protocol/websocket.py", line 154, in call
File "mitmproxy/net/tcp.py", line 387, in ssl_read_select
TypeError: argument must be an int, or have a fileno() method.mitmproxy has crashed!
We are upgrading to mitmproxy 4.0.4 over on bug 1457274, and it should land hopefully soon. Would that solve your problem Eric?
It does not, we now see an error code of -9
. Given the concerns over missing real failures, I'm going to rework the patch to make the log level for this specific error configurable so that I can unblock landing the awsy-tp6 tests.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
If we really get a failure due to the error code I would be fine with moving the log line to an info level without making it configurable. That wasn't that clear before. A try build might have helped.
Pushed by erahm@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/78a419376c0c Add option to ignore mitmproxy shutdown error code. r=rwood
Comment 6•5 years ago
|
||
bugherder |
Description
•