Stopping the WebSocket server on Linux always hits the timeout: > __GI___select (/usr/lib/libc-2.33.so:0) > _wait_for_action (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py:203) > _stop_running_server (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py:213) > _stop_running_server (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py:174) > stop (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py:140) > stop_websocket_server (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/port/base.py:978) > stop_servers (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:229) > run (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py:442) > run (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:488) > main (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:93) > <module> (/mnt/home-extra/gsnedders/Documents/other-projects/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:495) _wait_for_action sleep-loops until its action returns True; it is called with Lighttpd._check_and_kill as the action from its caller. This action essentially checks Executive.check_running_pid (which calls kill(pid, 0)) and then calls Executive.kill_process if that's True. However, despite the long delay, it appears that the first Executive.kill_process is killing it, turning it into a zombie. It appears that on Darwin, kill(pid, 0) returns non-zero when pid is a zombie, but on GNU/Linux the same returns 0 when pid is a zombie. We should really be calling os.wait (or, better, keeping the subprocess.Popen object around to call Popen.wait) while waiting for it to stop. This is somewhat painful on Py<3.3, given os.wait itself just busyloops until it succeeds, whereas we really want to have some timeout there.
<rdar://problem/77604119>
Created attachment 442825 [details] Patch
EWS failures (both Py2 and Py3) for webkitpy are: [660/2054] webkitpy.layout_tests.servers.http_server_unittest.TestHttpServer.test_win32_start_and_stop erred: Traceback (most recent call last): File "/Volumes/Data/worker/WebKitPy-Tests-EWS/build/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py", line 107, in test_win32_start_and_stop self.assertEqual(['taskkill.exe', '/f', '/t', '/pid', 42], host.executive.calls[1]) IndexError: list index out of range
Created attachment 442842 [details] Patch
Committed r285081 (243723@main): <https://commits.webkit.org/243723@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442842 [details].