Bug 49924

Summary: [NRWT] Opening png sometimes fails on Windows
Product: WebKit Reporter: Hayato Ito <hayato>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dpranke, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
retry-opening
none
retry-opening-increase-retry_num-use-errno none

Description Hayato Ito 2010-11-22 10:34:49 PST
On WebKit-Win build bot, new-run-webkit-tests sometimes fails.

http://build.chromium.org/p/chromium/builders/Webkit%20Win/builds/1912/steps/webkit_tests/logs/stdio

Traceback (most recent call last):
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\new-run-webkit-tests", line 38, in <module>
    sys.exit(run_webkit_tests.main())
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\run_webkit_tests.py", line 1647, in main
    return run(port_obj, options, args)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\run_webkit_tests.py", line 1346, in run
    num_unexpected_results = test_runner.run(result_summary)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\run_webkit_tests.py", line 732, in run
    self._run_tests(self._test_files_list, result_summary))
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\run_webkit_tests.py", line 612, in _run_tests
    result_summary)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\layout_package\dump_render_tree_thread.py", line 347, in _covered_run
    self._run(test_runner=None, result_summary=None)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\layout_package\dump_render_tree_thread.py", line 439, in _run
    result = self._run_test_in_this_thread(test_input)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\layout_package\dump_render_tree_thread.py", line 535, in _run_test_in_this_thread
    self._driver, self._name)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\layout_package\dump_render_tree_thread.py", line 162, in _run_single_test
    test_output = driver.run_test(uri, test_input.timeout, image_hash_to_driver)
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\port\chromium.py", line 509, in run_test
    ''.join(output), self._output_image(), actual_checksum,
  File "e:\b\build\slave\Webkit_Win\build\src\third_party\WebKit\WebKitTools\Scripts\webkitpy\layout_tests\port\chromium.py", line 452, in _output_image
    with open(png_path, 'rb') as image_file:
IOError: [Errno 13] Permission denied: 'e:\\b\\build\\slave\\Webkit_Win\\build\\src\\webkit\\Release\\..\\../../layout-test-results\\png_result2.png'
No handlers could be found for logger "webkitpy.common.system"
program finished with exit code 1
elapsedTime=469.283000
Comment 1 Hayato Ito 2010-11-22 10:38:53 PST
Created attachment 74572 [details]
retry-opening
Comment 2 Tony Chang 2010-11-22 10:47:57 PST
Comment on attachment 74572 [details]
retry-opening

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

> WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py:464
> +            except IOError:

Can we catch the exact IO error using errno?

> WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py:466
> +                time.sleep(timeout_seconds / retry_num)
> +                continue

I would probably try more frequently than every 500ms, maybe increase retry_num to 50?
Comment 3 Hayato Ito 2010-11-22 11:41:00 PST
Created attachment 74578 [details]
retry-opening-increase-retry_num-use-errno
Comment 4 Hayato Ito 2010-11-22 11:43:34 PST
Thank you for the review.
I addressed your comments.

(In reply to comment #2)
> (From update of attachment 74572 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=74572&action=review
> 
> > WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py:464
> > +            except IOError:
> 
> Can we catch the exact IO error using errno?

Nice point. Done.

> 
> > WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py:466
> > +                time.sleep(timeout_seconds / retry_num)
> > +                continue
> 
> I would probably try more frequently than every 500ms, maybe increase retry_num to 50?

Done.
Comment 5 Tony Chang 2010-11-22 11:44:06 PST
Comment on attachment 74578 [details]
retry-opening-increase-retry_num-use-errno

Thanks!
Comment 6 Dirk Pranke 2010-11-22 11:53:10 PST
change LGTM as well.
Comment 7 Hayato Ito 2010-11-22 11:58:41 PST
Comment on attachment 74578 [details]
retry-opening-increase-retry_num-use-errno

Clearing flags on attachment: 74578

Committed r72547: <http://trac.webkit.org/changeset/72547>
Comment 8 Hayato Ito 2010-11-22 11:58:50 PST
All reviewed patches have been landed.  Closing bug.