Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Process.spawn with IO.pipe output fails on Java 21 + warbler

オープン
#569 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java, rails, ruby
領域
cli

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jruby/warbler のほかの issue

jruby/warbler の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。