bug(timeout): failure to exit on `strace` when due to `SIGTTIN` interactions with child process
Open
Nobody has claimed this yet.
U - timeout
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutil mainteners
as we confirmed when clock_nanosleep syscall returns -4 it just hangs and wait forever regardless of the time, whiches a deadlock
relunsec@relunsec:~/software/coreutils/target/debug$ strace -e inject=clock_nanosleep:retval=-4 -o /dev/null ./timeout 1s gnucat
strace: Inadvertent injection of error 4 is possible for retval=18446744073709551612
while the gnu one
relunsec@relunsec:~/software/coreutils/target/debug$ strace -e inject=clock_nanosleep:retval=-4 -o /dev/null gnutimeout 1s gnucat
strace: Inadvertent injection of error 4 is possible for retval=18446744073709551612
when the syscalls return -4, it does not hang
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied strace injection against the uutils timeout command and compare it with GNU timeout. Inspect timeout's handling of clock_nanosleep errors, child-process state, and the SIGTTIN interaction described in the title. Done means the command exits instead of hanging when clock_nanosleep returns -4, while preserving the expected timeout behavior.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100