uutils / uutils/coreutils

comm: "- -" deadlocks

Open
#14,219 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - comm
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

coreutils 0.10.0 (multi-call binary), latest commit

uutils comm hangs:

printf 'test' | ./comm - -

gnu comm behaves differently:

printf 'test' | gnucomm - -
test
gnucomm: -

gnu comm's behavior seems non-deterministic, with larger inputs it leaves stray leftovers and cuts lines based on glibc stdio buffer sizes.

Possible solutions would be to
a) replicate gnu comm's behavior or
b) reject "- -" as arguments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hang with printf 'test' | ./comm - -, then compare it with gnucomm - - and larger inputs. Read the comm command entry point and its handling of standard input and the - operands. Done means the behavior is intentionally matched to GNU comm or - - is rejected without deadlocking, with the chosen behavior covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.