Bug 194816 - test262-runner ends with SIGPIPE signal
Summary: test262-runner ends with SIGPIPE signal
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-02-19 05:31 PST by Diego Pino
Modified: 2019-11-28 08:55 PST (History)
10 users (show)

See Also:

Patch (1.19 KB, patch)
2019-02-19 05:41 PST, Diego Pino
no flags Details | Formatted Diff | Diff
Patch (1.14 KB, patch)
2019-11-28 00:44 PST, Diego Pino
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2019-02-19 05:31:34 PST
In certain environments when running `test262-runner` the program ends abruptly with a SIGPIPE signal. Example:

$ Tools/Scripts/test262-runner --release

Test262 Dir: JSTests/test262
JSC: WebKitBuild/Release/bin/jsc
Child Processes: 256
DYLD_FRAMEWORK_PATH: /home/slave/webkitgtk/gtk-linux-64-release/build/WebKitBuild/Release/bin
Config file: JSTests/test262/config.yaml
Expectations file: JSTests/test262/expectations.yaml

$ echo $?

This is inconvenient because `test262-runner` ends without printing out tests summary results.

By certain environments I mean the issue always happens in one specific host, while I have no issues in a different host.
Comment 1 Diego Pino 2019-02-19 05:41:03 PST
Created attachment 362382 [details]
Comment 2 Diego Pino 2019-02-19 05:54:01 PST
Explanation of the patch.

I debugged the issue using 'Carp::Trace'. I captured SIGPIPE signals and printed out a trace. I got the following output:

Test262::Runner::main [3]
        scalar - new stash
        /home/slave/webkitgtk/gtk-linux-64-release/build/Tools/Scripts/test262/Runner.pm line 122
Test262::Runner::(eval) [2]
        scalar - no new stash
        /home/slave/webkitgtk/gtk-linux-64-release/build/Tools/Scripts/test262/Runner.pm line 416
Test262::Runner::__ANON__ [1]
        scalar - new stash
        /home/slave/webkitgtk/gtk-linux-64-release/build/Tools/Scripts/test262/Runner.pm line 416

This pattern occurred several times in the output.

IIRC, a SIGPIPE happens when attempting to write on a closed pipe. In the case of the suspecting line (416), I think what is happening if that child is trying to write on a closed socket (the parent was closed right before that loop). In any case, it seems to me this block of code is redundant, so I removed it.

After applying the patch, `test262-runner --release` runs just fine (exit status is 0).
Comment 3 Diego Pino 2019-11-28 00:44:56 PST
Created attachment 384441 [details]
Comment 4 Diego Pino 2019-11-28 03:27:00 PST
Comment on attachment 384441 [details]

Carlos López reviewed the patch and granted r+ on private conversation.
Comment 5 EWS 2019-11-28 03:27:30 PST
Comment on attachment 384441 [details]

Rejecting attachment 384441 [details] from review queue.

dpino@igalia.com does not have reviewer permissions according to https://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/contributors.json.

- If you do not have reviewer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.

- If you have reviewer rights please correct the error in Tools/Scripts/webkitpy/common/config/contributors.json by adding yourself to the file (no review needed).  The commit-queue restarts itself every 2 hours.  After restart the commit-queue will correctly respect your reviewer rights.
Comment 6 WebKit Commit Bot 2019-11-28 08:54:20 PST
Comment on attachment 384441 [details]

Clearing flags on attachment: 384441

Committed r252930: <https://trac.webkit.org/changeset/252930>
Comment 7 WebKit Commit Bot 2019-11-28 08:54:21 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2019-11-28 08:55:16 PST