This is related to communication between ImageDiff and webkitpy, as killing ImageDiff causes tests to continue running.
<rdar://problem/48388734>
Created attachment 366941 [details] Patch
Comment on attachment 366941 [details] Patch This is a speculative change, I'm testing it now.
Comment on attachment 366941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366941&action=review > Tools/ChangeLog:10 > + (main): Only flush stdout after writing to it. This doesn't sound like it should make a difference.
Created attachment 366974 [details] Patch
The problem here looks to be a deadlock filling up buffers when reading/writing from and to ImageDiff. I have a few ideas, not sure if the fix should be in ImageDiff or webkitpy.
Created attachment 366990 [details] Patch
Comment on attachment 366990 [details] Patch This patch seems to stop the problem, but also defeats the point of using ImageDiff as a server process. I think the right way to fix this will basically be 'check if there is stdout available, if there is, stop ImageDiff, otherwise, use the existing process'
Created attachment 367002 [details] Patch
Comment on attachment 367002 [details] Patch Verified that this approach solves the problem. It's probably worth investigating how ImageDiff can get into this state, but once it is in this state, we should throw away the process.
Comment on attachment 367002 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367002&action=review rs=me > Tools/Scripts/webkitpy/port/image_diff.py:50 > + if tolerance != self._tolerance or self._process and self._process.has_available_stdout(): Can we use parenthesis here to make the code more readable?
Committed r244080: <https://trac.webkit.org/changeset/244080>
(In reply to Jonathan Bedard from comment #12) > Committed r244080: <https://trac.webkit.org/changeset/244080> Not done with this bug yet, but at least change patch will stop the bleeding.
It seems like it's possible for ImageDiff to dump twice? That's probably where the root cause of this bug is.