RESOLVED FIXED 225818
[WebKitTestRunner] Forward WebContent termination reason
https://bugs.webkit.org/show_bug.cgi?id=225818
Summary [WebKitTestRunner] Forward WebContent termination reason
Jonathan Bedard
Reported 2021-05-14 12:05:38 PDT
We should print the reason a WebContent process was terminated to aid in debugging.
Attachments
Patch (6.01 KB, patch)
2021-05-14 12:09 PDT, Jonathan Bedard
ews-feeder: commit-queue-
Patch (5.77 KB, patch)
2021-05-14 13:51 PDT, Jonathan Bedard
no flags
Patch (6.62 KB, patch)
2021-05-14 17:01 PDT, Jonathan Bedard
no flags
Radar WebKit Bug Importer
Comment 1 2021-05-14 12:05:56 PDT
Jonathan Bedard
Comment 2 2021-05-14 12:09:18 PDT
Chris Dumez
Comment 3 2021-05-14 13:26:44 PDT
Comment on attachment 428645 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428645&action=review > Tools/WebKitTestRunner/TestController.cpp:2163 > + fprintf(stderr, "Terminating %s (pid %ld) ", webProcessName(), static_cast<long>(pid)); Isn't this going to look confusing? """ Terminating WebProcess (pid: 123) because the process crashed #CRASHED - WebProcess (pid: 123) """ Why are we saying we are terminating a process when the process actually crashed? Maybe it should be something like: fprintf(stderr, "%s terminated (pid %ld) ", webProcessName(), static_cast<long>(pid)); > Tools/WebKitTestRunner/TestController.cpp:2182 > + return; Note that you are not calling fflush() in this early return case even though you printed something. > Tools/WebKitTestRunner/TestController.cpp:2185 > fflush(stderr); Note the call to fflush() here.
Jonathan Bedard
Comment 4 2021-05-14 13:42:23 PDT
Comment on attachment 428645 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428645&action=review >> Tools/WebKitTestRunner/TestController.cpp:2163 >> + fprintf(stderr, "Terminating %s (pid %ld) ", webProcessName(), static_cast<long>(pid)); > > Isn't this going to look confusing? > """ > Terminating WebProcess (pid: 123) because the process crashed > #CRASHED - WebProcess (pid: 123) > """ > > Why are we saying we are terminating a process when the process actually crashed? > > Maybe it should be something like: > fprintf(stderr, "%s terminated (pid %ld) ", webProcessName(), static_cast<long>(pid)); The #CRASHED string will not show up in run-webkit-test's output, that's a control statement that triggers some logic in webkitpy about collecting crashes. I was trying to match the name of the API I'm good with your phrasing, though, indicating the termination has already occurred. >> Tools/WebKitTestRunner/TestController.cpp:2182 >> + return; > > Note that you are not calling fflush() in this early return case even though you printed something. My rationale here is that the processDidCrash callback was not triggered in the case originally, and the whole reason we call flush is because we may call exit at the end of this function. That being said, I suppose flush can't do any harm in the early return case.
Jonathan Bedard
Comment 5 2021-05-14 13:51:45 PDT
Chris Dumez
Comment 6 2021-05-14 13:53:00 PDT
Comment on attachment 428654 [details] Patch r=me
Jonathan Bedard
Comment 7 2021-05-14 17:01:14 PDT
EWS
Comment 8 2021-05-14 22:02:14 PDT
Committed r277533 (237761@main): <https://commits.webkit.org/237761@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428687 [details].
Note You need to log in before you can comment on or make changes to this bug.