Changeset 222709 in webkit


Ignore:
Timestamp:
Oct 2, 2017 7:59:28 AM (7 years ago)
Author:
Jonathan Bedard
Message:

Log stack-trace for run-webkit-tests when interrupted
https://bugs.webkit.org/show_bug.cgi?id=176393
<rdar://problem/34262310>

Reviewed by Darin Adler.

When run-webkit-tests is stuck, it is difficult to immediately tell
why. Saving a stack-trace when run-webkit-tests is terminated
or stopped with CNTRL-C will make such issues easier to debug.

  • Scripts/webkitpy/common/interupt_debugging.py: Added.

(log_stack_trace): Given a Python frame object, log a stack trace to
the provided file.
(log_stack_trace_on_term): Attach a listener to SIGTERM so that a
stack-trace can be logged when a program is terminated.
(log_stack_trace_on_cntrl_c): Attach a listener to SIGINT so that a
stack-trace can be logged when a program is CNTRL-Ced.

  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:

(main): Set handlers to log stack trace on interruption.

Location:
trunk/Tools
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r222704 r222709  
     12017-10-02  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Log stack-trace for run-webkit-tests when interrupted
     4        https://bugs.webkit.org/show_bug.cgi?id=176393
     5        <rdar://problem/34262310>
     6
     7        Reviewed by Darin Adler.
     8
     9        When run-webkit-tests is stuck, it is difficult to immediately tell
     10        why. Saving a stack-trace when run-webkit-tests is terminated
     11        or stopped with CNTRL-C will make such issues easier to debug.
     12
     13        * Scripts/webkitpy/common/interupt_debugging.py: Added.
     14        (log_stack_trace): Given a Python frame object, log a stack trace to
     15        the provided file.
     16        (log_stack_trace_on_term): Attach a listener to SIGTERM so that a
     17        stack-trace can be logged when a program is terminated.
     18        (log_stack_trace_on_cntrl_c): Attach a listener to SIGINT so that a
     19        stack-trace can be logged when a program is CNTRL-Ced.
     20        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     21        (main): Set handlers to log stack trace on interruption.
     22
    1232017-10-02  Michael Catanzaro  <mcatanzaro@igalia.com>
    224
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r222631 r222709  
    3636
    3737from webkitpy.common.host import Host
     38from webkitpy.common.interupt_debugging import log_stack_trace_on_cntrl_c, log_stack_trace_on_term
    3839from webkitpy.layout_tests.controllers.manager import Manager
    3940from webkitpy.layout_tests.models.test_run_results import INTERRUPTED_EXIT_STATUS
     
    7374        print >> stderr, str(e)
    7475        return EXCEPTIONAL_EXIT_STATUS
     76
     77    stack_trace_path = host.filesystem.join(port.results_directory(), 'python_stack_trace.txt')
     78    log_stack_trace_on_cntrl_c(output_file=stack_trace_path)
     79    log_stack_trace_on_term(output_file=stack_trace_path)
    7580
    7681    if options.print_expectations:
Note: See TracChangeset for help on using the changeset viewer.