Title: [285627] trunk/Tools
- Revision
- 285627
- Author
- [email protected]
- Date
- 2021-11-11 06:55:29 -0800 (Thu, 11 Nov 2021)
Log Message
[Flatpak] http server is not properly tear down
https://bugs.webkit.org/show_bug.cgi?id=221554
Patch by Philippe Normand <[email protected]> on 2021-11-11
Reviewed by Adrian Perez de Castro.
In Linux when the layout tests are manually interrupted it might lead to Apache not being
cleanly stopped. On the next run it would then fail to start, usually failing to setup its
'scoreboard' with SHM. The proposed solution is to look for stale SHM segments, eg. segments
allocated but not attached to any process, and remove them, before starting the Apache
process.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd._remove_stale_shm_segments):
(LayoutTestApacheHttpd._spawn_process):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (285626 => 285627)
--- trunk/Tools/ChangeLog 2021-11-11 14:54:06 UTC (rev 285626)
+++ trunk/Tools/ChangeLog 2021-11-11 14:55:29 UTC (rev 285627)
@@ -1,5 +1,22 @@
2021-11-11 Philippe Normand <[email protected]>
+ [Flatpak] http server is not properly tear down
+ https://bugs.webkit.org/show_bug.cgi?id=221554
+
+ Reviewed by Adrian Perez de Castro.
+
+ In Linux when the layout tests are manually interrupted it might lead to Apache not being
+ cleanly stopped. On the next run it would then fail to start, usually failing to setup its
+ 'scoreboard' with SHM. The proposed solution is to look for stale SHM segments, eg. segments
+ allocated but not attached to any process, and remove them, before starting the Apache
+ process.
+
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+ (LayoutTestApacheHttpd._remove_stale_shm_segments):
+ (LayoutTestApacheHttpd._spawn_process):
+
+2021-11-11 Philippe Normand <[email protected]>
+
[GTK][WPE] webkit-flatpak-run-nightly infinite self-call loop
https://bugs.webkit.org/show_bug.cgi?id=230400
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py (285626 => 285627)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py 2021-11-11 14:54:06 UTC (rev 285626)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py 2021-11-11 14:55:29 UTC (rev 285627)
@@ -179,7 +179,26 @@
def platform(self):
return self._port_obj.host.platform
+ def _remove_stale_shm_segments(self):
+ stale_segments = []
+ process = self._executive.popen(['ipcs', '-m'], stdout=self._executive.PIPE)
+ process.wait()
+ for line in process.stdout.read().splitlines()[3:]:
+ parsed_line = [token for token in line.split(b' ') if token]
+ if not parsed_line:
+ continue
+ if int(parsed_line[5]) == 0:
+ stale_segments.append(parsed_line[1].decode('utf-8'))
+
+ if stale_segments:
+ ipcrm_cmd = ['ipcrm', '-m', ' '.join(stale_segments)]
+ process = self._executive.popen(ipcrm_cmd)
+ process.wait()
+
def _spawn_process(self):
+ if self.platform.is_linux():
+ self._remove_stale_shm_segments()
+
_log.debug('Starting %s server, cmd="%s"' % (self._name, str(self._start_cmd)))
retval, err = self._run(self._start_cmd)
if retval or len(err):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes