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

paste: serial mode exhausts file descriptors by opening every input simultaneously

オープン 初心者向け
#15,903 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@binhvq がすでに取り組んでいます。

2026年10月27日 から。

  • #15906 @binhvq による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

src/uu/paste/src/paste.rsから始め、特に101–115行目の入力を開くループと、シリアル処理の分岐を確認してください。issueのBashコマンドでファイルディスクリプタ制限による失敗を再現し、その後、シリアルモードが入力を個別に処理することを確認してください。再現手順が期待される出力とステータスで成功し、issueの報告どおり既存のpaste統合テスト27件すべてが通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

U - paste

With paste -s, uutils opens every input file before processing any of them. This makes serial mode fail with "Too many open files" on batches that GNU paste processes successfully one file at a time.

Reproduced on Linux x86_64 at commit c1f172886c6643f61ffde5a1ce3db0aaf14e182b, in both debug and release builds. Compared with GNU coreutils 9.7 and the project-recommended GNU 9.12 reference package (Ubuntu 9.12-0ubuntu1~ppa1).

Reproducer

Run in Bash from the repository root:

cargo build --no-default-features --features paste

d=$(mktemp -d)
for i in {1..40}; do
  printf 'a\nb\n' > "$d/f$i"
done

(ulimit -n 32; LC_ALL=C target/debug/coreutils paste -s "$d"/f*)
echo "status: $?"

Actual: no stdout, status 1, and:

paste: Too many open files

Expected: 40 lines containing a<TAB>b, status 0. Replacing target/debug/coreutils paste with GNU paste gives that result under the same limit.

The limit change applies only to the subshell. The reproducer leaves its temporary input directory in place.

Validation and cause

The failure also occurs with 1,032 files under a 1,024-descriptor limit, with --serial, custom delimiters, and -z. Small batches succeed. Both GNU versions passed all 12 tested combinations; each uutils build failed the six combinations exceeding the descriptor limit. All 27 existing paste integration tests pass.

The input-opening loop in paste.rs, lines 101-115 retains every file handle before reaching the serial branch. Serial mode should open, process, and close each file individually.

Related reports

Searches of open/closed issues, PRs, and comments for paste plus "too many open", "file descriptors", "RLIMIT_NOFILE", "EMFILE", and "opens all" found no matching report. #15254 and #15642 concern missing-file errors; this reproducer uses only existing, readable files.

Investigation and report prepared with AI assistance.

主要言語
Rust
スター
24.3k
フォーク
2.1k
平均マージ
1日 21時間
マージ済み PR(30日)
357

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

uutils/coreutils のほかの issue

uutils/coreutils の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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