Closed Bug 1130220 Opened 6 years ago Closed 5 years ago

Marionette automation doesn't clean up its socket after getting killed with SIGINT

Categories

(Testing :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1081970

People

(Reporter: chmanchester, Unassigned)

Details

(Keywords: pi-marionette-runner)

Attachments

(1 file, 1 obsolete file)

A few people have called this out as a pain when debugging tests. The situation is: Run marionette tests. Realize something's wrong and kill with ctrl-C. Shortly thereafter run them again and get "MarionetteException: MarionetteException: localhost:2828 is unavailable.". 

A SIGINT handler in the runner might be able to ensure the appropriate cleanup happens in these cases.
/r/3423 - Bug 1130220 - Close marionette's socket in a signal handler when test execution is interuppted.

Pull down this commit:

hg pull review -r 7593f25bf13d2ff18437be9b0ee47f7577e94f2b
Comment 1 is what I mean, and seems like an improvement trying it out locally.
Even with this patch I'm still experiencing this with the gaia-ui-tests.  The bug can be reliably reproduced running gaiatest and interrupting.
I can perfectly replicate that now with latest Marionette on mozilla-central when running tests which internally restart the application. Once I run such a test, the port is still in use and Marionette cannot be run until it has been freed by the OS.

This is blocking our tests on CI given that followup jobs would fail when triggered immediately after the former finishes.

The only thing I have to do now in a tests is `self.marionette.restart(in_app=True)`. So it looks like with the landing of bug 1137388 this is a permanent failure now.
Blocks: 1129843, m21s, 1137388
OS: Linux → All
Hardware: x86_64 → All
Blocks: 1141335
Summary: Marionette automation doesn't clean up its socket after getting killed with SIGINT → Marionette automation doesn't clean up its socket after getting killed with SIGINT or Marionette gets restarted with in_app=True
(In reply to Henrik Skupin (:whimboo) from comment #4)
> I can perfectly replicate that now with latest Marionette on mozilla-central
> when running tests which internally restart the application. Once I run such
> a test, the port is still in use and Marionette cannot be run until it has
> been freed by the OS.
> 
> This is blocking our tests on CI given that followup jobs would fail when
> triggered immediately after the former finishes.
> 
> The only thing I have to do now in a tests is
> `self.marionette.restart(in_app=True)`. So it looks like with the landing of
> bug 1137388 this is a permanent failure now.

This has a different cause and different fix, it needs a different bug.
No longer blocks: m21s, 1129843, 1141335, 1137388
Summary: Marionette automation doesn't clean up its socket after getting killed with SIGINT or Marionette gets restarted with in_app=True → Marionette automation doesn't clean up its socket after getting killed with SIGINT
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1081970
Attachment #8560190 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.