<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>57356</bug_id>
          
          <creation_ts>2011-03-29 10:21:55 -0700</creation_ts>
          <short_desc>test_runner2.py can crash due to undefined variable</short_desc>
          <delta_ts>2011-03-29 15:00:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Barth">abarth</reporter>
          <assigned_to name="Adam Barth">abarth</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>dpranke</cc>
    
    <cc>eric</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>375470</commentid>
    <comment_count>0</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-29 10:21:55 -0700</bug_when>
    <thetext>test_runner2.py can crash due to undefined variable</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375473</commentid>
    <comment_count>1</comment_count>
      <attachid>87356</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-29 10:23:27 -0700</bug_when>
    <thetext>Created attachment 87356
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375474</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-03-29 10:24:10 -0700</bug_when>
    <thetext>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 &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 439, in &lt;module&gt;
    sys.exit(main())
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 434, in main
    return run(port_obj, options, args)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 120, in run
    num_unexpected_results = runner.run(result_summary)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py&quot;, line 664, in run
    self._run_tests(self._test_files_list, result_summary))
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py&quot;, line 164, in _run_tests
    manager_connection.run_message_loop(delay_secs=1.0)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py&quot;, line 192, in run_message_loop
    self._broker.run_message_loop(self._run_topic, self._client, delay_secs)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py&quot;, line 128, in run_message_loop
    self._run_loop(topic_name, client, block=True, delay_secs=delay_secs)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py&quot;, line 142, in _run_loop
    self._dispatch_message(msg, client)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/message_broker2.py&quot;, line 151, in _dispatch_message
    message_handler(message.src, *optargs)
  File &quot;/mnt/data/build/slave/Webkit_Linux/build/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py&quot;, line 227, in handle_finished_test
    _log.error(&quot;%s unwedged&quot;, w.name)
NameError: global name &apos;w&apos; is not defined</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375563</commentid>
    <comment_count>3</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-03-29 11:19:37 -0700</bug_when>
    <thetext>The patch looks good; I guess it&apos;s a testament to the improvements in the threading code that we hadn&apos;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&apos;ll see if I can write a test for it just to get the coverage.

Thanks for fixing this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375782</commentid>
    <comment_count>4</comment_count>
      <attachid>87356</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-29 15:00:48 -0700</bug_when>
    <thetext>Comment on attachment 87356
Patch

Clearing flags on attachment: 87356

Committed r82329: &lt;http://trac.webkit.org/changeset/82329&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>375784</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2011-03-29 15:00:53 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>87356</attachid>
            <date>2011-03-29 10:23:27 -0700</date>
            <delta_ts>2011-03-29 15:00:48 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-57356-20110329102324.patch</filename>
            <type>text/plain</type>
            <size>1415</size>
            <attacher name="Adam Barth">abarth</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDgyMjcyKQorKysgVG9vbHMvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMg
KzEsMTUgQEAKKzIwMTEtMDMtMjkgIEFkYW0gQmFydGggIDxhYmFydGhAd2Via2l0Lm9yZz4KKwor
ICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICB0ZXN0X3J1bm5l
cjIucHkgY2FuIGNyYXNoIGR1ZSB0byB1bmRlZmluZWQgdmFyaWFibGUKKyAgICAgICAgaHR0cHM6
Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTU3MzU2CisKKyAgICAgICAgUmVwbGFj
ZSByZWZlcmVuY2UgdG8gdW5kZWZpbmVkIHZhcmlhYmxlIHdpdGggYSB2YXJpYWJsZSB0aGF0J3Mg
YWN0dWFsbHkKKyAgICAgICAgZGVmaW5lZC4gIEFGQUlDVCwgdGhlcmUncyBubyB3YXkgdG8gdGVz
dCB0aGlzIGNvZGUuCisKKyAgICAgICAgKiBTY3JpcHRzL3dlYmtpdHB5L2xheW91dF90ZXN0cy9s
YXlvdXRfcGFja2FnZS90ZXN0X3J1bm5lcjIucHk6CisKIDIwMTEtMDMtMjkgIFBoaWxpcHBlIE5v
cm1hbmQgIDxwbm9ybWFuZEBpZ2FsaWEuY29tPgogCiAgICAgICAgIFJ1YmJlci1zdGFtcGVkIGJ5
IEd1c3Rhdm8gTm9yb25oYSBTaWx2YS4KSW5kZXg6IFRvb2xzL1NjcmlwdHMvd2Via2l0cHkvbGF5
b3V0X3Rlc3RzL2xheW91dF9wYWNrYWdlL3Rlc3RfcnVubmVyMi5weQo9PT09PT09PT09PT09PT09
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