Bug 43329 - WebSocket server should start with SO_REUSEADDR
Summary: WebSocket server should start with SO_REUSEADDR
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-02 01:15 PDT by Fumitoshi Ukai
Modified: 2010-08-02 03:13 PDT (History)
0 users

See Also:


Attachments
Patch (1.73 KB, patch)
2010-08-02 01:20 PDT, Fumitoshi Ukai
tkent: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fumitoshi Ukai 2010-08-02 01:15:26 PDT
DumpRenderTee buildbots for Windows and Mac sometimes has a failure on websocket_server startup. 
Probably, WebSocket server should start with SO_REUSEADDR.

Example:
Mac build 950: http://build.webkit.org/builders/Chromium%20Mac%20Release%20(Tests)/builds/950/steps/layout-test/logs/stdio
100728 03:10:07 websocket_server.py:179  DEBUG Using handler_map_file: /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/LayoutTests/websocket/tests/handler_map.txt
100728 03:10:07 websocket_server.py:194  DEBUG Starting PyWebSocket server on 8880.
100728 03:10:07 websocket_server.py:195  DEBUG cmdline: /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/thirdparty/autoinstalled/pywebsocket/mod_pywebsocket/standalone.py --server-host 127.0.0.1 --port 8880 --document-root /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/LayoutTests --scan-dir /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/LayoutTests/websocket/tests --cgi-paths /websocket/tests --log-file /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKit/chromium/webkit/Release/layout-test-results/pywebsocket.ws.log-28Jul2010-031007-err.txt --websock-handlers-map-file /Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/LayoutTests/websocket/tests/handler_map.txt
Traceback (most recent call last):
  File "./WebKitTools/Scripts/new-run-webkit-tests", line 38, in <module>
    sys.exit(run_webkit_tests.main())
  File "/Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 1677, in main
    return run(port_obj, options, args)
  File "/Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 1441, in run
    num_unexpected_results = test_runner.run(result_summary)
  File "/Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 754, in run
    self._port.start_websocket_server()
  File "/Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py", line 467, in start_websocket_server
    self._websocket_server.start()
  File "/Users/cltbld/Desktop/BuildSlaveData/WebKit-BuildSlave2/chromium-mac-release-tests/build/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py", line 219, in start
    (self._server_name, self._port))
webkitpy.layout_tests.port.websocket_server.PyWebSocketNotStarted: Failed to start PyWebSocket server on port 8880.

Mac build 949 had no problem on websocket_server shtudown. http://build.webkit.org/builders/Chromium%20Mac%20Release%20(Tests)/builds/949/steps/layout-test/logs/stdio
100728 02:37:41 websocket_server.py:244  DEBUG Shutting down PyWebSocket server 73855.
Comment 1 Fumitoshi Ukai 2010-08-02 01:20:59 PDT
Created attachment 63184 [details]
Patch
Comment 2 Kent Tamura 2010-08-02 01:21:49 PDT
Comment on attachment 63184 [details]
Patch

ok
Comment 3 Fumitoshi Ukai 2010-08-02 03:13:53 PDT
Committed r64453: <http://trac.webkit.org/changeset/64453>