Skip to content

On Windows, cabal hangs indefinitely when fetching a git source-repository-package #8688

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

Closed
JakobBruenker opened this issue Jan 17, 2023 · 6 comments · Fixed by haskell/process#277

Comments

@JakobBruenker
Copy link

Describe the bug
On Windows, when cabal tries fetching a git repo, it hangs indefinitely, in waitForProcess:

exitcode <- Process.waitForProcess p

When run for the first time, it hangs while running "git.exe" "submodule" "deinit" "--force" "--all"; if cabal is killed, on subsequent runs it hangs on "git.exe" "fetch".

Running the git command manually in the corresponding working directory does not hang (and after doing so, cabal builds the package successfully).

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/JakobBruenker/cabal-hangs
$ cd cabal-hangs/
$ cabal v2-build -v3

The last line logged before cabal hangs should be "C:\Program Files\Git\cmd\git.exe" "submodule" "deinit" "--force" "--all", or the equivalent with a different path to git.exe.

Expected behavior
It should build the package successfully

System information

  • Windows 11
  • ghc 9.2.5
  • cabal 3.8.1.0, also tested on HEAD (96dea0f)
@Mikolaj
Copy link
Member

Mikolaj commented Jan 18, 2023

Thank you for the report. Could this be a process package bug? Is this reproduced with the newest process on Hackage?

Also, are we sure the same works fine on, say, Linux? Is there a test in CI for exactly this case (e.g., skipped on Windows, because we though it's a CI fluke)?

@JakobBruenker
Copy link
Author

@Mikolaj I was able to build the same package under WSL, so I believe it does work in Linux, though of course there could be some confounding variable.

Looks when I built from source, cabal used process 1.6.15.0, which is one version older than the newest version on hackage. I can check later today if a small program that just waits for a git process has the same issue on my machine.

@JakobBruenker
Copy link
Author

JakobBruenker commented Jan 18, 2023

@Mikolaj I can confirm that the same thing happens when just using waitForProcess with the same commands outside of cabal. I will create an issue in the process repo. (edit: haskell/process#273)

@Mikolaj
Copy link
Member

Mikolaj commented Jan 18, 2023

Well done. Thank you.

@jasagredo
Copy link
Collaborator

haskell/process#273 is closed by haskell/process#277. Can we close this one? @ulysses4ever pinging you as you reopened this ticket.

@ulysses4ever
Copy link
Collaborator

Sorry, this was my bad, probably

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants