Skip to content

work around linux not honoring write_at for O_APPEND files #143166

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

the8472
Copy link
Member

@the8472 the8472 commented Jun 28, 2025

the workaround only applies on kernels >= 6.9

fixes #140867

@rustbot
Copy link
Collaborator

rustbot commented Jun 28, 2025

r? @thomcc

rustbot has assigned @thomcc.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 28, 2025
@rust-log-analyzer

This comment has been minimized.

@the8472 the8472 force-pushed the fix-write-at-append branch from b6ebbf6 to 8b87324 Compare June 29, 2025 14:48
@rust-log-analyzer

This comment has been minimized.

@the8472
Copy link
Member Author

the8472 commented Jun 29, 2025

Weird, the kernel should be new enough.

@the8472 the8472 force-pushed the fix-write-at-append branch from 8b87324 to bd44b22 Compare June 30, 2025 21:59
@rust-log-analyzer

This comment has been minimized.

@the8472 the8472 force-pushed the fix-write-at-append branch from bd44b22 to 9e75dad Compare June 30, 2025 22:27
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 30, 2025
@rust-log-analyzer

This comment has been minimized.

@the8472 the8472 force-pushed the fix-write-at-append branch from 9e75dad to 0d89239 Compare June 30, 2025 23:05
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  CACHE_DOMAIN: ci-caches.rust-lang.org
  PR_CI_JOB: 1
  IMAGE: mingw-check-2
##[endgroup]
Linux fv-az1618-111 6.11.0-1015-azure #15~24.04.1-Ubuntu SMP Thu May  1 02:52:08 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
##[group]Run src/ci/scripts/collect-cpu-stats.sh
src/ci/scripts/collect-cpu-stats.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
DirectMap4k:      143296 kB
DirectMap2M:     7196672 kB
DirectMap1G:    11534336 kB
##[endgroup]
Executing ldd --version &&         python3 ../x.py test --stage 1 std -- write
+ ldd --version
ldd (Ubuntu GLIBC 2.35-0ubuntu3.10) 2.35
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ python3 ../x.py test --stage 1 std -- write
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.05s
##[endgroup]
downloading https://static.rust-lang.org/dist/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/2025-05-27/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt
---
failures:

---- fs::tests::file_test_append_write_at stdout ----

thread 'fs::tests::file_test_append_write_at' panicked at library/std/src/fs/tests.rs:507:5:
assertion `left == right` failed
  left: [105, 116, 39, 115, 32, 110, 111, 116, 32, 119, 111, 114, 107, 105, 110, 103, 33, 32, 32, 32]
 right: [105, 116, 39, 115, 32, 32, 32, 32, 32, 119, 111, 114, 107, 105, 110, 103, 33]
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- os::unix::fs::tests::write_vectored_at stdout ----

thread 'os::unix::fs::tests::write_vectored_at' panicked at library/std/src/os/unix/fs/tests.rs:57:5:
assertion `left == right` failed
  left: [112, 119, 114, 105, 116, 101, 118, 32, 105, 115, 32, 110, 111, 116, 32, 119, 111, 114, 107, 105, 110, 103, 33, 32, 32, 32, 32, 103, 114, 101, 97, 116, 32, 32]
 right: [112, 119, 114, 105, 116, 101, 118, 32, 105, 115, 32, 32, 32, 32, 32, 103, 114, 101, 97, 116, 32, 32, 33]


# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with write_all_at on GitHub Action
4 participants