[jdk21u-dev] RFR: 8325028: (ch) Pipe channels should lazily set socket to non-blocking mode on first use by virtual thread [v2]
Vladimir Petko
vpetko at openjdk.org
Sat Apr 20 08:30:57 UTC 2024
> Hi all,
>
> This pull request contains a backport of commit [d1099033](https://github.com/openjdk/jdk/commit/d1099033ac63b9dd0dd6e3a7341db929e9e0e56e) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.
>
> The commit being backported was authored by Alan Bateman on 8 Feb 2024 and was reviewed by Brian Burkhalter.
>
> This change fixes a bug in jruby[1] that broken pipeline functions of Open3[1][2].
> This change is high risk as there is no jtreg test *directly* testing the pipe behaviour.
> Patch applies cleanly to 21u.
> The patch was tested against JRuby test suite in Ubuntu. Without the patch the following tests[3] fail:
>
> 1) Failure:
> TestOpen3#test_pipeline_start [/tmp/autopkgtest.Dz4xQk/autopkgtest_tmp/test/mri/test_open3.rb:303]:
> Failed assertion, no message given.
>
> 2) Failure:
> TestOpen3#test_pipeline_w [/tmp/autopkgtest.Dz4xQk/autopkgtest_tmp/test/mri/test_open3.rb:288]:
> <true> expected but was
> <false>.
>
> 3) Failure:
> TestOpen3#test_capture3_flip [/tmp/autopkgtest.Dz4xQk/autopkgtest_tmp/test/mri/test_open3.rb:190]:
>
> With the patch, they pass. Also the reproducer
>
> require 'open3'
>
> RUBY = 'jruby'
> Open3.pipeline_r([RUBY, '-e', 'print "1"'],
> [RUBY, '-e', 'print STDIN.read + "2"']) {|o,ts|
> print(o.read)
> }
> ---
>
> outputs 12 as expected in multiple runs.
> There is no regression in tier1 and tier2 tests ran on Ubuntu.
>
>
> Thanks!
>
> [1] https://github.com/jruby/jruby/issues/8069
> [2] https://bugs.launchpad.net/ubuntu/+source/jruby/+bug/2054943
> [3] https://bugs.launchpad.net/ubuntu/+source/openjdk-21/+bug/2054943
Vladimir Petko has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
- Merge branch 'master' into backport-vpa1977-d1099033
- Backport d1099033ac63b9dd0dd6e3a7341db929e9e0e56e
-------------
Changes:
- all: https://git.openjdk.org/jdk21u-dev/pull/290/files
- new: https://git.openjdk.org/jdk21u-dev/pull/290/files/6ac72c28..086bc625
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=290&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=290&range=00-01
Stats: 27778 lines in 710 files changed: 14924 ins; 7079 del; 5775 mod
Patch: https://git.openjdk.org/jdk21u-dev/pull/290.diff
Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/290/head:pull/290
PR: https://git.openjdk.org/jdk21u-dev/pull/290
More information about the jdk-updates-dev
mailing list