kill-old-processes: Remove stale Apache shm segments
Created attachment 407742 [details] Patch
This issue was happening in several EWS workers running in the UAT. For instance: https://ews-build.webkit-uat.org/#/builders/34/builds/4926/steps/10/logs/stdio Apache2 doesn't start because it believes there's already an Apache2 instance running, when actually what's happening is that there's an orphan shm segment which pid matches the pid of the new Apache2 instance. In that case layout-test-results/error-log shows an error like this: [Sat Aug 29 20:02:16.013912 2020] [core:crit] [pid 26] (17)File exists: AH00001: unable to create or access scoreboard "/tmp/WebKit/httpd.scoreboard" (name-based shared memory failure) And here's a post with the description of the problem and solution: https://makandracards.com/fabio-silva/49967-apache-unable-to-create-scoreboard-shared-memory-failure
Created attachment 407744 [details] Patch
Comment on attachment 407744 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=407744&action=review > Tools/BuildSlaveSupport/kill-old-processes:27 > +import subprocess as sp Why rename the module? WebKit coding style is to avoid abbreviations.
Created attachment 407812 [details] Patch
(In reply to Alexey Proskuryakov from comment #4) > Comment on attachment 407744 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=407744&action=review > > > Tools/BuildSlaveSupport/kill-old-processes:27 > > +import subprocess as sp > > Why rename the module? WebKit coding style is to avoid abbreviations. Sorry, I didn't know about this code convention. I pushed a new patch undoing the renaming.
Committed r266507: <https://trac.webkit.org/changeset/266507> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407812 [details].
<rdar://problem/68262415>
It looks like the changes in https://trac.webkit.org/changeset/266507/webkit broke our JSC EWS bot: https://ews-build.webkit.org/#/builders/38/builds/1408 We will need to roll this out unless it can be fixed very quickly. Traceback (most recent call last): File "Tools/BuildSlaveSupport/kill-old-processes", line 192, in <module> sys.exit(main(user)) File "Tools/BuildSlaveSupport/kill-old-processes", line 184, in main removeOrphanShmSegmentsOf("apache2") File "Tools/BuildSlaveSupport/kill-old-processes", line 39, in removeOrphanShmSegmentsOf pid = futurePidOf(task) File "Tools/BuildSlaveSupport/kill-old-processes", line 56, in futurePidOf ps = subprocess.Popen(task, stderr=subprocess.STDOUT, stdout=devnull) File "/usr/lib/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory
Re-opened since this is blocked by bug 216135
Created attachment 407941 [details] Patch
Created attachment 408266 [details] Refactored patch.
ChangeLog entry in Tools/ChangeLog is not at the top of the file.
Created attachment 408309 [details] Patch for landing
Committed r266775: <https://trac.webkit.org/changeset/266775> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408309 [details].