Skip to content

Crash with GHCRTS=--io-manager=native (version: git HEAD) #5851

Description

@ruifengx

Note: the latest version (2.7.5) of stack on Windows was compiled using GHC 8.10.4, which did not have the new native WinIO manager. This error is produced with manually compiled stack, using the source from this GitHub repo, at commit 13ba67a (yesterday). I followed the procedure in the GitHub CI file to compile the executable, namely a release.hs check followed by release.hs build.

General summary/comments (optional)

Steps to reproduce

  1. Install above-mentioned manually compiled stack.
  2. cd into any stack project.
  3. Set environment variable GHCRTS=--io-manager=native.
  4. Run command stack build.
  5. stack reports the following error:
    Encountered error while migrating Pantry database:
        \\.\NUL: hDuplicateTo: illegal operation (handles are incompatible)
    Please report this on https://github.com/commercialhaskell/stack/issues
    As a workaround you may delete Pantry database in C:\sr\pantry\pantry.sqlite3 triggering its recreation.
    
    where C:\sr is my STACK_ROOT.
  6. Remove $STACK_ROOT/pantry/pantry.sqlite3 as instructed, and rerun stack build.
  7. Same error reported.

Note: No error if we unset the GHCRTS environment variable.

Expected

No error.

Actual

Error reported, and the build process did not start.

If you suspect that a Stack command misbehaved, please include the output of
that command in --verbose mode:

Version manual-build, Git revision 13ba67aee29189338b9e6c07cfaeb58fd12ff2d9 RELEASE-CANDIDATE x86_64 hpack-0.35.0
2022-09-04 13:53:02.806765: [debug] Checking for project config at: path\to\stack.yaml
2022-09-04 13:53:02.806765: [debug] Loading project config file stack.yaml
2022-09-04 13:53:02.806765: [error] Encountered error while migrating Pantry database:
    \\.\NUL: hDuplicateTo: illegal operation (handles are incompatible)
Please report this on https://github.com/commercialhaskell/stack/issues
As a workaround you may delete Pantry database in C:\sr\pantry\pantry.sqlite3 triggering its recreation.

Stack version

As explained above, a manual build. Work tree unchanged (therefore using almost the same environment as CI builds).

stack --version
Version manual-build, Git revision 13ba67aee29189338b9e6c07cfaeb58fd12ff2d9 RELEASE-CANDIDATE x86_64 hpack-0.35.0

Method of installation

Other: manual build as explained above. I can provide the executable if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions