Repository navigation
[release/10.0] Fix operator precedence bug in SystemNative_FSync causing silent fsync errors - #135261
Open
adamsitnik with Copilot wants to merge 1 commit into
Open
adamsitnik with Copilot wants to merge 1 commit into
adamsitnik with Copilot wants to merge 1 commit into
Conversation
Co-authored-by: adamsitnik <6011991+adamsitnik@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
adamsitnik
October 6, 2026 08:29
View session
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @agocke |
adamsitnik
marked this pull request as ready for review
October 6, 2026 08:44
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-io |
This was referenced Oct 6, 2026
Member
jkotas
approved these changes
Oct 6, 2026
Member
|
Hi, the code complete date for 10.0.14 (the November 2026 release) is Monday 12 October. Make sure to merge this PR on that date at the latest, or it won't make it into that release. As a reminder, if this is a product change, you also need Tactics approval before merging this PR (test-only or infra-only changes don't require Tactics approval). Happy to help with the merge if needed! |
Member
|
@rbhanda the PR got approved via email, could you please apply the label? |
This branch has not been deployed
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.

backports #124725 (merged into main in February 2026) to release/10.0
Description
Coperator precedence bug inSystemNative_FSync(pal_io.c) causedfcntl(fd, F_FULLFSYNC)errors to be silently swallowed on Unix, leading to corrupt/truncated files on SMB network shares.Customer Impact
On Unix,
FileStream.Flush(flushToDisk: true)could silently ignorefsyncfailures, including storage errors such asENOSPCorEIO, risking silent data loss. The fix ensures these errors propagate as exceptions.Asked for backport by customer in #135201
Regression
This is a backport of a fix for a long-standing regression originating in .NET 6.
Testing
./build.sh clr+libs -rc releasepassed with 0 warnings and 0 errors.System.IO.FileSystem.Testspassed: 8,760 total, 0 failures, 54 skipped.FileStream.Flush(true)throwsIOExceptionwhenstraceinjectsEIOintofsyncon the rebuilt runtime.Risk
Low. The change corrects the syscall-result assignment to preserve the actual return value and maintains the existing
EINTRretry behavior. The macOS fallback is included from the main PR. No managed API surface changes.fixes #135201