Bug 227114

Summary: [Win] Exception running layout tests
Product: WebKit Reporter: Per Arne Vollan <pvollan>
Component: Tools / TestsAssignee: Per Arne Vollan <pvollan>
Status: RESOLVED FIXED    
Severity: Normal CC: jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Per Arne Vollan 2021-06-17 02:13:30 PDT
From https://ews-build.webkit.org/#/builders/10/builds/96013:

OSError raised: [Errno 3] No such process
Traceback (most recent call last):
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 92, in main
    run_details = run(port, options, args, stderr)
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 487, in run
    run_details = manager.run(args)
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 408, in run
    temp_initial_results, temp_retry_results, temp_enabled_pixel_tests_in_retry = self._run_test_subset(test_inputs, device_type=device_type)
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 482, in _run_test_subset
    initial_results = self._run_tests(test_inputs, self._options.repeat_each, self._options.iterations, int(self._options.child_processes), retrying=False, device_type=device_type)
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py", line 561, in _run_tests
    return self._runner.run_tests(self._expectations[device_type], new_test_inputs, num_workers, retrying, device_type)
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py", line 179, in run_tests
    pool.wait()
  File "/home/buildbot/worker/Windows-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py", line 462, in __exit__
    os.kill(worker.pid, signal.SIGKILL)
OSError: [Errno 3] No such process
Comment 1 Per Arne Vollan 2021-06-17 02:21:30 PDT
Created attachment 431640 [details]
Patch
Comment 2 Jonathan Bedard 2021-06-17 09:01:18 PDT
Comment on attachment 431640 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=431640&action=review

> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:464
> +                    except Exception:

I think we should catch an OSError explicitly (in Python, Exception rather annoyingly includes things like syntax errors since it's an interpreted language), and probably log the PID of worker, since we have multiple workers.
Comment 3 Per Arne Vollan 2021-06-17 09:21:55 PDT
Created attachment 431681 [details]
Patch
Comment 4 Per Arne Vollan 2021-06-17 09:22:26 PDT
(In reply to Jonathan Bedard from comment #2)
> Comment on attachment 431640 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=431640&action=review
> 
> > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/task_pool.py:464
> > +                    except Exception:
> 
> I think we should catch an OSError explicitly (in Python, Exception rather
> annoyingly includes things like syntax errors since it's an interpreted
> language), and probably log the PID of worker, since we have multiple
> workers.

Done!

Thanks for reviewing!
Comment 5 EWS 2021-06-17 11:25:00 PDT
Committed r278998 (238923@main): <https://commits.webkit.org/238923@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431681 [details].
Comment 6 Radar WebKit Bug Importer 2021-06-17 11:25:21 PDT
<rdar://problem/79461864>