Bug 57356 - test_runner2.py can crash due to undefined variable
Summary: test_runner2.py can crash due to undefined variable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-29 10:21 PDT by Adam Barth
Modified: 2011-03-29 15:00 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2011-03-29 10:23 PDT, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-03-29 10:21:55 PDT
test_runner2.py can crash due to undefined variable
Comment 1 Adam Barth 2011-03-29 10:23:27 PDT
Created attachment 87356 [details]
Patch
Comment 2 Adam Barth 2011-03-29 10:24:10 PDT
Stack from http://build.chromium.org/p/chromium.webkit/builders/Webkit%20Linux/builds/5027/steps/webkit_tests/logs/stdio :

2011-03-29 10:12:30,431 2611 test_runner2.py:189 INFO Exception raised, exiting
Traceback (most recent call last):
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 439, in <module>
    sys.exit(main())
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 434, in main
    return run(port_obj, options, args)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 120, in run
    num_unexpected_results = runner.run(result_summary)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py", line 664, in run
    self._run_tests(self._test_files_list, result_summary))
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py", line 164, in _run_tests
    manager_connection.run_message_loop(delay_secs=1.0)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py", line 192, in run_message_loop
    self._broker.run_message_loop(self._run_topic, self._client, delay_secs)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py", line 128, in run_message_loop
    self._run_loop(topic_name, client, block=True, delay_secs=delay_secs)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py", line 142, in _run_loop
    self._dispatch_message(msg, client)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py", line 151, in _dispatch_message
    message_handler(message.src, *optargs)
  File "/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py", line 227, in handle_finished_test
    _log.error("%s unwedged", w.name)
NameError: global name 'w' is not defined
Comment 3 Dirk Pranke 2011-03-29 11:19:37 PDT
The patch looks good; I guess it's a testament to the improvements in the threading code that we hadn't triggered this before. 

It is actually possible to test this through some careful manipulation of the thread scheduling; there are some tests in manager_worker_broker_unittest that are close to what you would need. I'll see if I can write a test for it just to get the coverage.

Thanks for fixing this!
Comment 4 WebKit Commit Bot 2011-03-29 15:00:48 PDT
Comment on attachment 87356 [details]
Patch

Clearing flags on attachment: 87356

Committed r82329: <http://trac.webkit.org/changeset/82329>
Comment 5 WebKit Commit Bot 2011-03-29 15:00:53 PDT
All reviewed patches have been landed.  Closing bug.