Closed Bug 509406 Opened 11 years ago Closed 11 years ago

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

Categories

(Testing Graveyard :: Mozmill, defect)

defect
Not set
blocker

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: whimboo, Unassigned)

References

Details

(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/__init__.py", line 392, in cli
    CLI().run()
  File "/Volumes/data/build/mozmill/trunk/mozmill/__init__.py", line 337, in run
    m.start(runner=runner, profile=runner.profile)
  File "/Volumes/data/build/mozmill/trunk/mozmill/__init__.py", line 104, in start
    self.back_channel, self.bridge = jsbridge.wait_and_create_network("127.0.0.1", self.jsbridge_port)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/__init__.py", 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/network.py", line 267, in create_network
    back_channel = BackChannel(hostname, port)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/network.py", line 234, in __init__
    super(BackChannel, self).__init__(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/jsbridge-2.0-py2.5.egg/jsbridge/network.py", line 166, in __init__
    self.connect(args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/asyncore.py", 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. http://github.com/mikeal/jsbridge/tree/master
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.
http://github.com/mikeal/jsbridge/commit/597406ec5428b9b34b8a93c6d94d5d77f19cfb7e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
I haven't seen this anymore while running my tests. Marking it verified fixed.
Status: RESOLVED → VERIFIED
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.