[Webkit-unassigned] [Bug 225189] New: Stopping LayoutTest WebSocket Server turns it into a zombie

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 29 06:11:30 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=225189

            Bug ID: 225189
           Summary: Stopping LayoutTest WebSocket Server turns it into a
                    zombie
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gsnedders at apple.com
                CC: jbedard at apple.com

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210429/386cc41f/attachment-0001.htm>


More information about the webkit-unassigned mailing list