Mochitest websocket server shouldn't terminate on ctrl-c when debugging with gdb

RESOLVED FIXED

Status

Testing
Mochitest
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Assigned: Justin Lebar (not reading bugmail))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

8 years ago
STR:

*  $ EXTRA_TEST_ARGS='--debugger=gdb' make mochitest-plain
*  Press ctrl-c at the gdb prompt

Actual results:

  Mochitest webserver receives the SIGINT and kills itself.

Expected results:

  Mochitest webserver should keep running.

Patch in a moment.
(Assignee)

Comment 1

8 years ago
Created attachment 492134 [details] [diff] [review]
Patch v1
Assignee: nobody → justin.lebar+bug
Status: NEW → ASSIGNED
Attachment #492134 - Flags: review?(ted.mielczarek)
Is it just the pywebsocket server that dies? We already have SIGINT ignored for interactive debugging, right?

I think all that pywebsocket code is from an upstream somewhere, I don't know if we want to take local patches.
(Assignee)

Comment 3

8 years ago
(In reply to comment #2)
> Is it just the pywebsocket server that dies? We already have SIGINT ignored for
> interactive debugging, right?

Correct.  Other modules already ignore ctrl+c, but the pywebsocket server sometimes captures it and dies.
The pywebsocket code comes from http://code.google.com/p/pywebsocket/.
Summary: Mochitest server shouldn't terminate on ctrl-c when debugging with gdb → Mochitest websocket server shouldn't terminate on ctrl-c when debugging with gdb
Comment on attachment 492134 [details] [diff] [review]
Patch v1

Can you try to upstream the pywebsocket bits of this? Otherwise we're likely to overwrite them if we have to update the code from upstream in the future.
Attachment #492134 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 6

8 years ago
The pywebsocket people suggested wrapping the invocation of standalone.py in a separate script which ignores SIGINT.

Ted, how would you feel about that?
Fine with me.
(Assignee)

Updated

8 years ago
Attachment #492134 - Attachment is obsolete: true
(Assignee)

Comment 9

8 years ago
Created attachment 497699 [details] [diff] [review]
Patch v2
Attachment #497699 - Flags: review?(ted.mielczarek)
Attachment #497699 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 10

8 years ago
Moving out of Testing product so I can request a2.0.  Although I think this is NPOTB, I guess it's debatable.
Assignee: justin.lebar+bug → nobody
Component: Mochitest → Build Config
Product: Testing → Core
QA Contact: mochitest → build-config
(Assignee)

Updated

8 years ago
Attachment #497699 - Flags: approval2.0?
test-only changes historically do not require approval. Just land with a=testonly.
(Assignee)

Updated

8 years ago
Assignee: nobody → justin.lebar+bug
Component: Build Config → Mochitest
Flags: approval2.0?
Product: Core → Testing
QA Contact: build-config → mochitest
(Assignee)

Comment 12

8 years ago
http://hg.mozilla.org/mozilla-central/rev/fcd0e21db895
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.