Repository navigation
direct_io test: open the comparison fd without O_DIRECT (fixes the host suite on kernel 6.17) - #540
Closed
GustavBlack wants to merge 1 commit into
Closed
GustavBlack wants to merge 1 commit into
GustavBlack wants to merge 1 commit into
Conversation
File.open keeps O_DIRECT where the open succeeds, and since kernel 6.17 procfs accepts the flag at open, so on such hosts both fds in this test were O_DIRECT and only the struct flag was cleared: the unaligned comparison pread returned -EINVAL and the test failed (expected 1, found -1), the one failure of the host suite there. Open the comparison fd explicitly plain, so the test no longer depends on a kernel's procfs O_DIRECT behavior. Fixes ashhart#536
GustavBlack
force-pushed
the
directio-test-plain-fd
branch
from
October 9, 2026 05:22
57ad27c to
fcaee43
Compare
Contributor
|
Receipt from a DGX Spark (GB10, kernel |
Contributor
Owner
|
Thank you @GustavBlack. This is the same fix as @jschmied's #486, which landed in 1.0.3 first, so I'm closing this as superseded rather than merging a second copy. Your write-up in #536 helped confirm it, and you're thanked in the 1.0.3 notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-commit, test-only fix for #536 (includes the cause and the C repro there).
On kernel 6.17 hosts,
open("/proc/self/exe", O_DIRECT)succeeds (procfs tolerates the flag atopen), so both fds in this test were O_DIRECT; the test cleared only the struct flag, and the
unaligned comparison
preadreturned-EINVAL— the one failure ofzig build testthere(expected 1, found -1).
The change opens the comparison fd explicitly plain, so the test no longer depends on a kernel's
procfs
O_DIRECTbehavior. The engine is unaffected (checkpoints are real NVMe files; the fallbackcovers filesystems that refuse
O_DIRECTat open).Validated on a GB10 (aarch64, Ubuntu 24.04, kernel 6.17.0-1032-nvidia): with this change the full
host suite passes there (previously 75/76). (Developed with AI assistance on our 2×GB10 bring-up
testbed; authorship is mine.)