Index: deps/v8/tools/testrunner/local/command.py
--- deps/v8/tools/testrunner/local/command.py.orig
+++ deps/v8/tools/testrunner/local/command.py
@@ -24,7 +24,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent.pare
 SEM_INVALID_VALUE = -1
 SEM_NOGPFAULTERRORBOX = 0x0002  # Microsoft Platform SDK WinBase.h
 
-
 def setup_testing():
   """For testing only: We use threading under the hood instead of
   multiprocessing to make coverage work. Signal handling is only supported
@@ -223,15 +222,19 @@ class PosixCommand(DesktopCommand):
         return "'%s'" % arg.replace("'", "'\"'\"'")
       return arg
     try:
+      popen_args = ' '.join(map(wrapped, self._get_popen_args()))
       return subprocess.Popen(
-        args=' '.join(map(wrapped, self._get_popen_args())),
+        args=popen_args,
         stdout=subprocess.PIPE,
         stderr=subprocess.PIPE,
         env=self._get_env(),
         shell=True,
         # Make the new shell create its own process group. This allows to kill
         # all spawned processes reliably (https://crbug.com/v8/8292).
-        preexec_fn=os.setsid,
+        # Use subprocess' native session setup instead of preexec_fn=os.setsid:
+        # on OpenBSD the worker was observed blocking in Popen before the test
+        # timeout could be armed.
+        start_new_session=True,
       )
     except Exception as e:
       sys.stderr.write('Error executing: %s\n' % self)
@@ -240,11 +243,17 @@ class PosixCommand(DesktopCommand):
   def _kill_process(self, process):
     # Kill the whole process group (PID == GPID after setsid).
     # First try a soft term to allow some feedback
-    os.killpg(process.pid, signal.SIGTERM)
+    try:
+      os.killpg(process.pid, signal.SIGTERM)
+    except ProcessLookupError:
+      return
     # Give the process some time to cleanly terminate.
     time.sleep(0.1)
     # Forcefully kill processes.
-    os.killpg(process.pid, signal.SIGKILL)
+    try:
+      os.killpg(process.pid, signal.SIGKILL)
+    except ProcessLookupError:
+      pass
 
 
 class IOSCommand(BaseCommand):
@@ -297,11 +306,17 @@ class IOSCommand(BaseCommand):
   def _kill_process(self, process):
     # Kill the whole process group (PID == GPID after setsid).
     # First try a soft term to allow some feedback
-    os.killpg(process.pid, signal.SIGTERM)
+    try:
+      os.killpg(process.pid, signal.SIGTERM)
+    except ProcessLookupError:
+      return
     # Give the process some time to cleanly terminate.
     time.sleep(0.1)
     # Forcefully kill processes.
-    os.killpg(process.pid, signal.SIGKILL)
+    try:
+      os.killpg(process.pid, signal.SIGKILL)
+    except ProcessLookupError:
+      pass
 
   def _to_args_list(self):
     return list(map(str, self.cmd_prefix + [self.shell]))
