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

Crash on Windows when built without CMake and run on a ReFS filesystem. #11996

Closed
AustinWise opened this issue Jun 17, 2020 · 4 comments
Closed
Assignees
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)

Comments

@AustinWise
Copy link

Describe the bug
Crash on Windows when built without CMake and run on a ReFS filesystem. It does work when built with CMake.

Environment

  • OS: x64 Windows 10.0.19041.329
  • Compiler: Visual Studio 2019 16.6.2
  • VCPkg version: 121f3d5

To Reproduce
Steps to reproduce the behavior:

  1. bootstrap-vcpkg.bat
  2. ./vcpkg install poco:x64-windows-static
  3. See error in "Failure logs" section below

Expected behavior
Does not crash.

Failure logs

C:\src\EC\ToolChain\Poco>build.cmd
Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
Computing installation plan...
The following packages will be built and installed:
  * expat[core]:x86-windows-static
  * libpng[core]:x86-windows-static
  * libpq[core,openssl,zlib]:x86-windows-static
  * openssl[core]:x86-windows-static
  * openssl-windows[core]:x86-windows-static
  * pcre[core]:x86-windows-static
    poco[core]:x86-windows-static
  * sqlite3[core]:x86-windows-static
  * zlib[core]:x86-windows-static
Additional packages (*) will be modified to complete this operation.
A suitable version of powershell-core was not found (required v6.2.1). Downloading portable powershell-core v6.2.1...
Downloading powershell-core...
  https://github.com/PowerShell/PowerShell/releases/download/v6.2.1/PowerShell-6.2.1-win-x86.zip -> C:\src\EC\ToolChain\Poco\vcpkg\downloads\PowerShell-6.2.1-win-x86.zip
Extracting powershell-core...
A suitable version of 7zip was not found (required v18.1.0). Downloading portable 7zip v18.1.0...
Downloading 7zip...
  https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 -> C:\src\EC\ToolChain\Poco\vcpkg\downloads\7-zip.commandline.18.1.0.nupkg
Extracting 7zip...
Starting package 1/9: expat:x86-windows-static
Building package expat[core]:x86-windows-static...
vcpkg.exe has crashed.
Please send an email to:
    [email protected]
containing a brief summary of what you were trying to do and the following data blob:

Version=2020.02.04-nohash
EXCEPTION='copy(p1, p2, options): invalid arguments: operation not permitted'
CMD=
vcpkg\vcpkg.exe|
install|
poco:x86-windows-static|

Additional context

It appears the when built using Visual Studio (as bootstrap-vcpkg.bat does), the VCPKG_USE_STD_FILESYSTEM define is not set. This causes the experimental C++ FS library to be used. When vcpkg runs, it downloads and extracts Powershell Core. After extracting the files, vcpkg attempts to copy pwsh.exe to Powershell.exe. This fails on a ReFS filesystem, because the method the experimental FS library uses to determine if a file exists does not check for FILE_ATTRIBUTE_INTEGRITY_STREAM.

When built using CMake, vcpkg works correctly. This is because CMake detects the C++17 support for std::filesystem and defines VCPKG_USE_STD_FILESYSTEM. The non-experimental FS library works correctly with the ReFS filesystem.

@PhoebeHui PhoebeHui added the category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) label Jun 18, 2020
@BillyONeal
Copy link
Member

Is this fixed now that we always deploy a copy that uses std::filesystem?

@PhoebeHui
Copy link
Contributor

@AustinWise, could you help confirm if this issue has been fixed in vcpkg latest source?

@AustinWise
Copy link
Author

I see that in #15474 the entire vcpkg tool was extracted to the separate https://github.com/microsoft/vcpkg-tool repository. That makes my reproduction steps in the original issue no longer relevant. It also means that contributing to the ports in this repo no longer requires building vcpkjg.exe, which is a nice improvement. So I think this issue has been resolved to my satisfaction. Thanks!

@BillyONeal
Copy link
Member

Thanks for letting us know! Glad to see the binary release helping more folks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`)
Projects
None yet
Development

No branches or pull requests

4 participants