Skip to content
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

Test failure System.IO.Tests.Directory_EnumFSE_str_str_so.PatternTests_DosQM(pattern: \"f???.txt\", sourceFiles: [\"f.txt\", \"foo.txt\", \"foob.txt\", \"fooba.txt\", \"foobar.txt\"], expected: [\"f.txt\", \"foo.txt\", \"foob.txt\"]) #54304

Closed
VincentBu opened this issue Jun 17, 2021 · 3 comments

Comments

@VincentBu
Copy link
Contributor

Run: runtime 20210616.88

Failed test:

net6.0-windows-Release-x86-CoreCLR_release-Windows.7.Amd64.Open

- System.IO.Tests.Directory_EnumFSE_str_str_so.PatternTests_DosQM(pattern: \"f???.txt\", sourceFiles: [\"f.txt\", \"foo.txt\", \"foob.txt\", \"fooba.txt\", \"foobar.txt\"], expected: [\"f.txt\", \"foo.txt\", \"foob.txt\"])

Error message:

System.IO.IOException : The handle is invalid. : 'C:\h\w\A7C2092A\t\Directory_EnumFSE_str_str_so_q4ywmcyq.ln3\PrepareDirectory_539_4ee05970\foob.txt'


Stack trace
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset, String path) in /_/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs:line 77
   at System.IO.Strategies.SyncWindowsFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/SyncWindowsFileStreamStrategy.cs:line 104
   at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs:line 792
   at System.IO.FileStream.Flush() in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs:line 350
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) in /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs:line 327
   at System.IO.StreamWriter.Dispose(Boolean disposing) in /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs:line 220
   at System.IO.File.WriteAllText(String path, String contents) in /_/src/libraries/System.Private.CoreLib/src/System/IO/File.cs:line 307
   at System.IO.Tests.Directory_GetFileSystemEntries_str_str.PrepareDirectory(String[] sourceFiles, Boolean useExtendedPaths) in /_/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs:line 539
   at System.IO.Tests.Directory_GetFileSystemEntries_str_str.PatternTests_DosQM(String pattern, String[] sourceFiles, String[] expected) in /_/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs:line 242
@ghost
Copy link

ghost commented Jun 17, 2021

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Run: runtime 20210616.88

Failed test:

net6.0-windows-Release-x86-CoreCLR_release-Windows.7.Amd64.Open

- System.IO.Tests.Directory_EnumFSE_str_str_so.PatternTests_DosQM(pattern: \"f???.txt\", sourceFiles: [\"f.txt\", \"foo.txt\", \"foob.txt\", \"fooba.txt\", \"foobar.txt\"], expected: [\"f.txt\", \"foo.txt\", \"foob.txt\"])

Error message:

System.IO.IOException : The handle is invalid. : 'C:\h\w\A7C2092A\t\Directory_EnumFSE_str_str_so_q4ywmcyq.ln3\PrepareDirectory_539_4ee05970\foob.txt'


Stack trace
   at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset, String path) in /_/src/libraries/System.Private.CoreLib/src/System/IO/RandomAccess.Windows.cs:line 77
   at System.IO.Strategies.SyncWindowsFileStreamStrategy.WriteSpan(ReadOnlySpan`1 source) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/SyncWindowsFileStreamStrategy.cs:line 104
   at System.IO.Strategies.BufferedFileStreamStrategy.Flush(Boolean flushToDisk) in /_/src/libraries/System.Private.CoreLib/src/System/IO/Strategies/BufferedFileStreamStrategy.cs:line 792
   at System.IO.FileStream.Flush() in /_/src/libraries/System.Private.CoreLib/src/System/IO/FileStream.cs:line 350
   at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) in /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs:line 327
   at System.IO.StreamWriter.Dispose(Boolean disposing) in /_/src/libraries/System.Private.CoreLib/src/System/IO/StreamWriter.cs:line 220
   at System.IO.File.WriteAllText(String path, String contents) in /_/src/libraries/System.Private.CoreLib/src/System/IO/File.cs:line 307
   at System.IO.Tests.Directory_GetFileSystemEntries_str_str.PrepareDirectory(String[] sourceFiles, Boolean useExtendedPaths) in /_/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs:line 539
   at System.IO.Tests.Directory_GetFileSystemEntries_str_str.PatternTests_DosQM(String pattern, String[] sourceFiles, String[] expected) in /_/src/libraries/System.IO.FileSystem/tests/Directory/GetFileSystemEntries_str_str.cs:line 242
Author: VincentBu
Assignees: -
Labels:

arch-x86, area-System.IO, os-windows

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jun 17, 2021
@danmoseley
Copy link
Member

@dotnet/area-system-io related to FileStream work?

@adamsitnik adamsitnik removed the untriaged New issue has not been triaged by the area owner label Jun 24, 2021
@adamsitnik
Copy link
Member

Fixed by @danmoseley in #54660 (this is the first time we see it on Windows btw)

@ghost ghost locked as resolved and limited conversation to collaborators Jul 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants