Skip to content

uucore: catch closed stdio by rustix::io - #16929

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:rawiobadf
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:rawiobadf

Conversation

@oech3

@oech3 oech3 commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

uucore::io::signals::std*_was_closed() reports EBADF "before" actual read/write which is not compatible with GNU.
Catch them as actual read/write errors.

Split #16299 .
The pipe based solution to avoid crashing std is pending.

@codspeed

codspeed Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by ×2

3 warnings, 1 note

⚠️ 128 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 4 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚠️ 2 benchmarks with a significant change ran in a different software environment

Their base and head results were measured with a different OS or toolchain, such as compiler, runtime or library versions, so the changes might come from this difference rather than from the code. Open an affected benchmark to see what changed.

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

⚡ 4 improved benchmarks
✅ 419 untouched benchmarks
⏩ 78 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Memory socket_addrs_direct[100000] 68 KB 8.6 KB ×7.9
⚡ Memory hostname_ip_lookup[100000] 160.3 KB 100.9 KB +58.88%
⚡ CPU Simulation socket_addrs_direct[100000] 132.2 µs 105.3 µs +25.52%
⚡ CPU Simulation hostname_ip_lookup[100000] 574.9 µs 545.1 µs +5.47%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing oech3:rawiobadf (f812a92) with main (4e94937)

Open in CodSpeed

Footnotes

  1. 78 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@xtqqczze

This comment was marked as resolved.

Comment thread src/uucore/src/lib/features/signals.rs Resolved
Comment thread src/uucore/src/lib/features/signals.rs Resolved
Comment thread src/uucore/src/lib/features/signals.rs Resolved
@oech3
oech3 force-pushed the rawiobadf branch 4 times, most recently from ffba4c2 to 69e41e6 Compare December 1, 2026 09:46
Comment thread src/uucore/src/lib/features/signals.rs Resolved
@oech3

oech3 commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

@sylvestre is this OK to merge?

Comment thread src/uucore/src/lib/features/signals.rs Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants