microsoft / microsoft/CopyOnWrite
BSOD caused when copying to an alternative data stream
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 153
- Forks
- 9
- Avg merge
- 10d 21h
- Merged PRs (30d)
- 2
Description
When attempting to copy onto an alternative data stream, a BSOD is caused.
Simple reproduction (F:\ is a Dev Drive):
File.WriteAllText($@"F:\New Text Document.txt", "a");
File.WriteAllText($@"F:\New Text Document 2.txt", "b");
File.WriteAllText($@"F:\New Text Document 2.txt:x", "c");
Microsoft.CopyOnWrite.CopyOnWriteFilesystemFactory.GetInstance().CloneFile($@"F:\New Text Document.txt", $@"F:\New Text Document 2.txt:x");
I discovered this while trying to implement https://github.com/dotnet/runtime/issues/86681, can you please raise this internally so we can try to get it quickly fixed in Windows, after verifying it on your end. For now, I will add a workaround to skip for ADS and revert all of my testing changes on my local machine, so I can hopefully get a PR in a workable state soon.
Note, that my local version doesn't have the issue where it may get confused about which volume it's on by a path like this, it should definitely know it's on F:\ as it uses Windows APIs to correctly determine the volume. I'm happy to triple check this if you'd like, but a BSOD should obviously not be caused regardless.
Windows version:
Edition: Windows 11 Pro Insider Preview
Version: 22H2
OS build: 23481.1000
Experience: Windows Feature Experience Pack 1000.23481.1000.0
Image of BSOD if you want it for some reason (which I have because it's in a VM):
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the C# reproduction using CopyOnWriteFilesystemFactory.GetInstance().CloneFile on the Dev Drive path ending in an alternative data stream. Inspect the CloneFile entry point and verify whether the failure can be reproduced; completion would require identifying a safe outcome for ADS copies without triggering a Windows BSOD, but the issue does not name a repository test or implementation file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100