Bug 230513 - Broken pipes when writing to stdin of the server process on iOS simulator causing layout tests marked as crash
Summary: Broken pipes when writing to stdin of the server process on iOS simulator cau...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
: 230060 230099 230325 230418 (view as bug list)
Depends on:
Blocks: 226658
  Show dependency treegraph
Reported: 2021-09-20 14:46 PDT by ayumi_kojima
Modified: 2021-09-29 08:47 PDT (History)
6 users (show)

See Also:

test lists (90.77 KB, text/plain)
2021-09-21 18:07 PDT, ayumi_kojima
no flags Details
Revert Patch (7.73 KB, patch)
2021-09-23 13:54 PDT, ayumi_kojima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ayumi_kojima 2021-09-20 14:46:40 PDT

Is flaky crashing on iOS.

History: https://results.webkit.org/?suite=layout-tests&test=fast%2Fviewport%2Fscroll-delegates-switch-on-page-with-no-composition-mode-asserts.html

Crash log:

No crash log found for WebKitTestRunnerApp:39389.
Comment 1 Radar WebKit Bug Importer 2021-09-20 14:46:57 PDT
Comment 2 ayumi_kojima 2021-09-20 14:51:58 PDT
Marked test expectations: https://trac.webkit.org/changeset/282786/webkit
Comment 3 Alexey Proskuryakov 2021-09-21 13:55:49 PDT
13:33:36.641 57433 worker/4 fast/url/user-visible/rf.html passed
13:33:36.760 57433 worker/4 fast/url/user-visible/srb.html passed
13:33:36.760 57433 worker/4 finished test group
13:33:36.887 57433 worker/4 killed pid 60933
13:33:36.888 57433 worker/4 This test marked as a crash because of a broken pipe when writing to stdin of the server process.
13:34:16.905 57433 worker/4 worker/4 fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html crashed, (no stderr)
13:34:16.906 57433 worker/4 killing driver
13:34:16.918 57433 worker/4 fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html failed:
13:34:16.918 57433 worker/4 WebKitTestRunnerApp crashed [pid=60933]
Comment 4 ayumi_kojima 2021-09-21 18:06:52 PDT
Though, it might not be able to reproduce the issue locally, tried it to make sure.

First, I tried to reproduce it by running all tests with multiple workers (run-webkit-tests --force --exit-after-n-crashes-or-timeouts 1000 --exit-after-n-failures 1000 --no-build --no-show-results --no-new-test-results --clobber-old-results --ios-simulator --debug --child-processes 8), but got (most likely) unrelated error, "OSError: [Errno 9] Bad file descriptor (from worker/6)", and it stopped running tests.

Next, tried with test lists (See attached list) with a single worker. Got the same error (OSError: [Errno 9] Bad file descriptor).

Next, tried with test lists with multiple workers. Tests ran successfully, but the test in question (fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html) didn't "crash".
Comment 5 ayumi_kojima 2021-09-21 18:07:18 PDT
Created attachment 438898 [details]
test lists
Comment 6 ayumi_kojima 2021-09-22 09:50:56 PDT
Another tests that "crashed" with broken pipes in worker/3,4,5:


Comment 7 ayumi_kojima 2021-09-22 09:51:19 PDT
Another one:



Comment 8 ayumi_kojima 2021-09-22 11:10:57 PDT
*** Bug 230099 has been marked as a duplicate of this bug. ***
Comment 9 ayumi_kojima 2021-09-22 11:12:27 PDT
*** Bug 230060 has been marked as a duplicate of this bug. ***
Comment 10 ayumi_kojima 2021-09-22 11:14:20 PDT
*** Bug 230418 has been marked as a duplicate of this bug. ***
Comment 11 ayumi_kojima 2021-09-22 11:14:33 PDT
*** Bug 230325 has been marked as a duplicate of this bug. ***
Comment 12 ayumi_kojima 2021-09-22 11:14:43 PDT
Pasting comments from Bug 230060

Alexey Proskuryakov 2021-09-12 13:55:30 PDT
Broken pipe is weird, but also not sure why it took 40 seconds between "This test marked as a crash because of a broken pipe" and "crashed".

Simon Fraser (smfr) 2021-09-22 10:24:58 PDT
Seems like some kinds of process unresponsiveness/lack of output result in us calling something a "crash" when it's not. Would be nice to fix this.
Comment 13 ayumi_kojima 2021-09-23 13:53:26 PDT
I was able to reproduce the bug by the following steps:

1. Apply the attached patch locally that reverts all of the protection placed for the OSError exception. 

2. Run all tests using Python2 (python OpenSource/Tools/Scripts/run-webkit-tests --exit-after-n-crashes-or-timeouts 1000 --exit-after-n-failures 1000 --no-build --no-show-results --no-new-test-results --clobber-old-results --ios-simulator --debug --debug-rwt-logging --child-processes 8 ;sudo sysdiagnose -l)

3. Test run stops at around fast/css-intrinsic-dimensions. Observe many timed-out tests.

4. Run tests again using run-webkit-tests <same build> --ios-simulator fast

5. Receives stdout:

[1/12583] fast/check-layout-error-no-attributes.html failed unexpectedly (test timed out, no output from test)
[2/12583] fast/js-promise-from-detached-iframe.html failed unexpectedly (test timed out, no output from test)
[3/12583] fast/animation/animation-display-style-adjustment.html failed unexpectedly (test timed out)

OSError raised: [Errno 9] Bad file descriptor

Comment 14 ayumi_kojima 2021-09-23 13:54:53 PDT
Created attachment 439088 [details]
Revert Patch