Process.spawn with IO.pipe output fails on Java 21 + warbler
まだ誰も着手していません。
評価
調査の方向性
The failure is an EBADF raised from spawn when Warbler packages a JRuby app and runs on Java 21, so the trigger lies in JRuby's process and file-descriptor handling rather than in Warbler's own Ruby files. Reproduce with the minimal IO.pipe and spawn('ls', out: out_w) snippet from the body under java21 with and without a Warbler war. Done means the spawn succeeds inside the war and the captured output matches the non-war run.
索引モデルが issue の本文から書いたものです。
説明
Using Open3.capture3 fails when running with java21 from a warbler jar with
ERROR: org.jruby.embed.EvalFailedException: (EBADF) Bad file descriptor - ls
This works correctly with java 11 and warbler, or with java 21 and no warbler. This is tested on jruby 9.4.12 and warbler 2.0.5.
I simplified the Open3 code down to this repro:
out_r, out_w = IO.pipe
pid = spawn('ls', out: out_w)
wait_thr = Process.detach(pid)
out_w.close
begin
out_reader = Thread.new { out_r.read }
output = out_reader.value
puts output
ensure
out_r.close
wait_thr.join
end
When running this, it will fail at spawn. Spawning without an output pipe works fine in the java21+warbler configuration.
- 主要言語
- Ruby
- スター
- 901
- フォーク
- 206
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jruby/warbler のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
難易度 4/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
glossarist/glossarist-ruby#247 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
🐛 bug 🧑💼 conseillers
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
betagouv/conseillers-entreprises#4768 ·
メンテナーはふだん 1 日以内に返信
-
`github-events` aborts the repository scan when a closed pull's API payload has a null `head`対応中かも @renyamamoto2026-cmyk が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zerocracy/judges-action#2823 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信