Closed Bug 1538677 Opened 7 months ago Closed 7 months ago

[mozproxy] Aborting: mitmproxy playback process failed to work


(Testing :: Mozbase, defect, P1)

Version 3


(firefox-esr60 unaffected, firefox66 unaffected, firefox67 unaffected, firefox68 fixed)

Tracking Status
firefox-esr60 --- unaffected
firefox66 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed


(Reporter: whimboo, Assigned: whimboo)




(Keywords: regression)


(1 file)

(In reply to Andrew Creskey from bug 1532557 comment #8)

This looks to be causing a regression for me when running locally:
I now see this error:

16:50:19     INFO -  mozproxy Starting mitmproxy playback using command: /Users/acreskey/dev/src/build/obj-release/testing/mozproxy/mitmdump -k -s ""/Users/acreskey/dev/src/mozilla-central/testing/raptor/raptor/playback/ /Users/acreskey/dev/src/build/obj-release/testing/mozproxy/""
16:50:20     INFO -  mozproxy Aborting: mitmproxy playback process failed to work
16:50:20     INFO -  mozproxy Stopping mitmproxy playback, killing process 1852
16:50:20     INFO -  mozproxy Mitmproxy exited with error code -15

But if I run the given playback command from the terminal, mitmproxy starts up:

~/dev/src/mozilla-central$ /Users/acreskey/dev/src/build/obj-release/testing/mozproxy/mitmdump -k -s ""/Users/acreskey/dev/src/mozilla-central/testing/raptor/raptor/playback/ /Users/acreskey/dev/src/build/obj-release/testg/mozproxy/""
Loading script: /Users/acreskey/dev/src/mozilla-central/testing/raptor/raptor/playback/
Replaying from files: []
Proxy server listening at

I'm on a MacbookPro. I did make sure that there was no other instance of mitmdump running.

I see this too when trying to run Raptor tests. I'm not able to get any test running locally. I will have a look into that.

There is also the problem that the Raptor command returns with exit code 0, which would indicate that the command was executed successfully!

This error is when running tests locally.

Looks like this change was introduced recently:

For running tests locally we get a timeout of 1 second when running the test locally in

I would change this to 5 sec to make sure the proxy is starting properly.

Yes please just add back the sleep when running locally. Thanks!

This is not a regression from bug 1532557 but bug 1521967. At least on OS X the mitmproxy process isn't able to start within 1s, and as such it always fails. Increasing the value for local runs fixes it. I will check how we can make this more robust.

No longer blocks: 1532557

As I can see in the actual attempt was to only do this change for the certutil invocation, but it slipped through and also is in use for starting up the proxy.

The timeout for a mitmproxy command is only used for starting and stopping the process.

While starting the proxy uses a while loop with a delay of 1s up to the maximum allowed time, it would return early once the process is up. So there is no need to have a distinction between local or remote runs. For safety it will be better to always have a higher value here.

Stopping the process should actually not need it given that mozprocess.ProcessHandler.kill() waits for the shutdown of the process itself.

As such I would propose to partly revert the above changeset for the Mitmproxy class.

Pushed by
[mitmproxy] Allow mitmproxy commands at maximum 30s of runtime. r=rwood,tarek
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Blocks: 1527620
Bug 1538677 - [mitmproxy] Allow mitmproxy commands at maximum 30s of runtime. r=rwood,tarek
You need to log in before you can comment on or make changes to this bug.