Closed Bug 509406 Opened 11 years ago Closed 11 years ago

JSBridge throws exception if starting the application under test takes too long (ECONNREFUSED)


(Testing Graveyard :: Mozmill, defect)

Not set


(Not tracked)



(Reporter: whimboo, Unassigned)



(Whiteboard: [verified-mozmill-1.2.2])

When Firefox takes too long to start (a lot of processes are slowing down the hard drive throughput) jsbridge stops execution with an excption:

raceback (most recent call last):
  File "/usr/local/bin/mozmill", line 8, in <module>
    load_entry_point('mozmill==1.2', 'console_scripts', 'mozmill')()
  File "/Volumes/data/build/mozmill/trunk/mozmill/", line 392, in cli
  File "/Volumes/data/build/mozmill/trunk/mozmill/", line 337, in run
    m.start(runner=runner, profile=runner.profile)
  File "/Volumes/data/build/mozmill/trunk/mozmill/", line 104, in start
    self.back_channel, self.bridge = jsbridge.wait_and_create_network("", self.jsbridge_port)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/", line 69, in wait_and_create_network
    back_channel, bridge = create_network(host, port)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/", line 267, in create_network
    back_channel = BackChannel(hostname, port)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/", line 234, in __init__
    super(BackChannel, self).__init__(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/", line 166, in __init__
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/", line 316, in connect
    raise socket.error, (err, errorcode[err])
socket.error: (61, 'ECONNREFUSED')

We had a similar problem for mozmill-restart which we have already fixed. I havent't got it anymore. But running the mozmill command I saw this one a couple of times the last week.
We should fix this for 1.2.1. Nominating.
Whiteboard: [mozmill-1.2.1?]
I saw this a dozen times lately. Each time you start a build the first time Mozmill always failed and jsbridge throws this exception. It has to be fixed before we can run Mozmill on the build system.
Severity: critical → blocker
Whiteboard: [mozmill-1.2.1?] → [mozmill-1.2.1]
Blocks: 457265
I see this frequently on debug builds on Thunderbird more so when a re-registration of components is being run. It hasn't (so far) affected our automated release builds that are under test with mozmill, but still a pain.
Summary: JSBridge throws exception if starting Firefox takes too long (ECONREFUSED) → JSBridge throws exception if starting the application under test takes too long (ECONREFUSED)
Thanks Mark. I have to add that I don't only see this with debug builds but also with nightly and release builds for the very first start. So I wonder how test runs on the build system could be affected.
Whiteboard: [mozmill-1.2.1] → [mozmill-1.2.2]
Mikeal, can you please check this ASAP? It is very annoying today while I'm working on my software update test. After the 1st restart (while the updater is running) jsbridge fails all the time. There is no way to check if the update is performed correctly.
Blocks: 498912, 504653
Summary: JSBridge throws exception if starting the application under test takes too long (ECONREFUSED) → JSBridge throws exception if starting the application under test takes too long (ECONNREFUSED)
There is already a loop that waits until the connection works with a 10 second timeout.

I've increased the timeout and added an exception when the timeout is exceeded so that the error is clearer. If you still see this issue then we'll need to figure out why this connection is never working properly, my guess is that the load time is just taking a long time on windows and the timeout is too short.

Updates pushed to github.
Ok, it works now and running a full update doesn't break jsbridge. But after talking to Mikeal on IRC we will further increase this value probably to 1 minute.
Closed: 11 years ago
Resolution: --- → FIXED
I haven't seen this anymore while running my tests. Marking it verified fixed.
Whiteboard: [mozmill-1.2.2] → [verified-mozmill-1.2.2]
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.