-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/6.0] for non-seekable file handles, the OVERLAPPED offset must be set to 0 #60931
[release/6.0] for non-seekable file handles, the OVERLAPPED offset must be set to 0 #60931
Conversation
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsCustomer ImpactFixes a bug reported by customer via email, where an async read operation performed on a It turns out that
And
TestingWe already had a test for that, but it's part of Outerloop and that is why the regression was missed:
The test was used to ensure that it's passing now. RiskVery low.
|
When did it regress? Does this mean we have a gap in our outerloop story? I'd have expected to have an issue opened by now about it, unless the regression was super recent. |
On 1st of August (RC2): e176fdf#diff-6a552da0cf26a4ac2ec6b2c4b314249db089d46519e1af7efc21940a2acce450
Before we started the rewrite, we basically had 0 tests that were testing async file IO for non-seekable files opened for async IO. We have added some, the work and other gaps are tracked here: #54495 One of the reasons why it's hard to test is the lack of ability to easily copy
Until #54676 it was impossible to open such files using |
Thanks, but what I'm trying to understand is, you said: This PR isn't adding or enabling any tests, which suggests we're expecting existing tests to cover this, but we were unaware of any failures in such tests. |
Thanks for the explanation and apologies for the confusion. The test tries to find a device that we can access for reading, but if there are no such devices, it does nothing: runtime/src/libraries/System.IO.FileSystem/tests/FileStream/FileStreamConformanceTests.Windows.cs Lines 192 to 195 in a7a9448
So most likely our CI machines have no such devices available and we need better test(s). |
Good point, I'll am going to add a test for async pipes tomorrow. |
Should we also offer a PR to the ReadFile doc?
|
There was an email thread about this PR. We will close this PR, submit a fix for this issue in main, and consider porting this fix to release/6.0 in a servicing release. Before committing this into release/6.0 though, we need successful test evidence off main, including current and new coverage. |
@PriyaPurkayastha this is a known issue in 6.0.0 that we expect to fix in 6.0.1. Do we document such things? |
Yes, we should document it as a Known issue and https://github.com/dotnet/core/blob/main/release-notes/6.0/known-issues.md is the location that @rbhanda uses. |
@jeffhandley this came up in tactics and was approved for 6.0.1. So up to you guys whether you reuse this PR (+test) or create another. I know you want to try it in main first, and the 6.0.1. submit window isn't open for at least a week anyway. |
Customer Impact
Fixes a bug reported by customer via email, where an async read operation performed on a
FileStream
opened for non-seekable device file was throwing anSystem.IO.IOException
: "The parameter is incorrect".It turns out that
ReadFile
doc was wrong:And
OVERLAPPED
doc was right:Testing
We already had a test for that, but it's part of Outerloop and that is why the regression was missed:
The test was used to ensure that it's passing now.
Risk
Very low.