Bug 176393 - Log stack-trace for run-webkit-tests when interrupted
Summary: Log stack-trace for run-webkit-tests when interrupted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on: 178587
Blocks: 178402
  Show dependency treegraph
 
Reported: 2017-09-05 12:32 PDT by Jonathan Bedard
Modified: 2019-04-08 18:32 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.87 KB, patch)
2017-09-05 12:36 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (5.70 KB, patch)
2017-09-06 08:52 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (5.92 KB, patch)
2017-11-17 09:48 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (6.17 KB, patch)
2019-04-08 16:30 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (6.18 KB, patch)
2019-04-08 16:56 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (2.73 KB, patch)
2019-04-08 17:00 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (6.18 KB, patch)
2019-04-08 17:11 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2017-09-05 12:32:57 PDT
We have a number of circumstances where run-webkit-tests gets stuck.  Debugging these issues is difficult since these issues can often only be reproduced on specific configurations and even then, are frequently flakey.  If run-webkit-tests printed a stack-trace when interrupted, these issues would be much easier to debug.
Comment 1 Radar WebKit Bug Importer 2017-09-05 12:33:27 PDT
<rdar://problem/34262310>
Comment 2 Jonathan Bedard 2017-09-05 12:36:49 PDT
Created attachment 319924 [details]
Patch
Comment 3 Darin Adler 2017-09-05 20:55:14 PDT
Comment on attachment 319924 [details]
Patch

This is great for someone who is working on run-webkit-tests, or who is annoyed that it is stuck, but makes things worse if you are not working on run-webkit-test and are not annoyed, but just want to cancel it so you can correct a mistake or type another command.

I don’t think this should be turned on for everybody. I find these tools that dump stack traces whenever you interrupt them super-frustrating when just trying to use the tools to do my work.
Comment 4 Darin Adler 2017-09-05 20:56:03 PDT
Comment on attachment 319924 [details]
Patch

Maybe have it just dump the stack trace into a file?
Comment 5 Jonathan Bedard 2017-09-06 08:52:39 PDT
Created attachment 320024 [details]
Patch
Comment 6 WebKit Commit Bot 2017-10-02 07:59:32 PDT
Comment on attachment 320024 [details]
Patch

Clearing flags on attachment: 320024

Committed r222709: <http://trac.webkit.org/changeset/222709>
Comment 7 WebKit Commit Bot 2017-10-02 07:59:33 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 WebKit Commit Bot 2017-10-20 09:06:58 PDT
Re-opened since this is blocked by bug 178587
Comment 9 Jonathan Bedard 2017-11-17 09:48:23 PST
Created attachment 327187 [details]
Patch
Comment 10 Jonathan Bedard 2017-11-17 09:51:32 PST
Updating the patch so that when multiple processes print stack traces, they don't all go to the same file.
Comment 11 Jonathan Bedard 2019-04-08 15:43:42 PDT
I think we should revive this change, it was just quite valuable in root-causing <https://bugs.webkit.org/show_bug.cgi?id=196694>.
Comment 12 Lucas Forschler 2019-04-08 15:44:42 PDT
Comment on attachment 327187 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=327187&action=review

the two functions appear to be nearly identical to each other. is there any way to simplify the do reduce code duplication?

> Tools/Scripts/webkitpy/common/interupt_debugging.py:28
> +

nit: please alphabetize

> Tools/Scripts/webkitpy/common/interupt_debugging.py:63
> +def log_stack_trace_on_cntrl_c(output_file=None):

I usually see control abbreviated as CTRL

> Tools/Scripts/webkitpy/common/interupt_debugging.py:74
> +        file.write('cntrl C received\n')

CTRL+C received
Comment 13 Jonathan Bedard 2019-04-08 16:30:04 PDT
Created attachment 366996 [details]
Patch
Comment 14 Lucas Forschler 2019-04-08 16:46:02 PDT
Comment on attachment 366996 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=366996&action=review

lgtm.

> Tools/Scripts/webkitpy/common/interupt_debugging.py:28
> +

nit: alphabetize
Comment 15 Jonathan Bedard 2019-04-08 16:56:17 PDT
Created attachment 366999 [details]
Patch
Comment 16 Jonathan Bedard 2019-04-08 17:00:26 PDT
Created attachment 367000 [details]
Patch
Comment 17 EWS Watchlist 2019-04-08 17:03:17 PDT
Attachment 367000 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:39:  No name 'interrupt_debugging' in module 'webkitpy.common'  [pylint/E0611] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 Jonathan Bedard 2019-04-08 17:11:42 PDT
Created attachment 367003 [details]
Patch
Comment 19 WebKit Commit Bot 2019-04-08 18:32:22 PDT
Comment on attachment 367003 [details]
Patch

Clearing flags on attachment: 367003

Committed r244064: <https://trac.webkit.org/changeset/244064>
Comment 20 WebKit Commit Bot 2019-04-08 18:32:24 PDT
All reviewed patches have been landed.  Closing bug.