Skip to content

touch/cp: don't hang preserving timestamps on a FIFO#12758

Open
sylvestre wants to merge 3 commits into
uutils:mainfrom
sylvestre:fifo-utimensat-no-hang
Open

touch/cp: don't hang preserving timestamps on a FIFO#12758
sylvestre wants to merge 3 commits into
uutils:mainfrom
sylvestre:fifo-utimensat-no-hang

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

No description provided.

@sylvestre sylvestre force-pushed the fifo-utimensat-no-hang branch from 1a9781b to 9af2726 Compare June 10, 2026 17:40
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/resolution (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/cp/preserve-mode is no longer failing!
Congrats! The gnu test tests/misc/selinux is no longer failing!
Congrats! The gnu test tests/touch/empty-file is no longer failing!
Congrats! The gnu test tests/touch/fifo is no longer failing!
Congrats! The gnu test tests/touch/no-rights is no longer failing!
Congrats! The gnu test tests/rm/many-dir-entries-vs-OOM is now passing!

@codspeed-hq

codspeed-hq Bot commented Jun 10, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.9%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 3 regressed benchmarks
✅ 320 untouched benchmarks
⏩ 46 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory cp_recursive_deep_tree[(120, 4)] 562.5 KB 615.6 KB -8.62%
Simulation ls_recursive_balanced_tree[(6, 4, 15)] 49.6 ms 52.3 ms -5.2%
Simulation ls_recursive_wide_tree[(10000, 1000)] 33 ms 34.3 ms -3.81%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing sylvestre:fifo-utimensat-no-hang (a42d3f1) with main (542e7af)

Open in CodSpeed

Footnotes

  1. 46 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.

filetime::set_file_times opens the file before setting times, which blocks
forever on a FIFO with no writer. Add uucore::fs::set_file_times using a
path-based utimensat (like GNU), shared by cp and touch.
Use uucore::fs::set_file_times instead of filetime::set_file_times, which
opens the destination first and so blocks forever on a FIFO with no writer.

Should make test tests/cp/preserve-mode.sh pass
Use uucore::fs::set_file_times instead of filetime, which opens the target
first and so blocks forever on a FIFO with no writer.

Should make test tests/touch/fifo.sh pass
@sylvestre sylvestre force-pushed the fifo-utimensat-no-hang branch from 9af2726 to a42d3f1 Compare June 10, 2026 18:33
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.

1 participant