Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Intermittent "cannot find the file specified" on Windows #36

Closed
Bodigrim opened this issue Feb 10, 2021 · 6 comments
Closed

Intermittent "cannot find the file specified" on Windows #36

Bodigrim opened this issue Feb 10, 2021 · 6 comments

Comments

@Bodigrim
Copy link

I thought I saw this reported, but cannot find a ticket, so sorry if it is a duplicate.

After the latest update every other Windows build (cabal + GHC 9.0) fails with

C:\Users\RUNNER~1\AppData\Local\Temp\ghcB4EF.o.tmp: renameFile:renamePath:MoveFileEx "\\\\?\\C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\ghcB4EF.o.tmp" Just "\\\\?\\C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\ghcB4EF.o": does not exist (The system cannot find the file specified.)

https://github.com/haskell/bytestring/runs/1874357129?check_suite_focus=true#step:6:195
https://github.com/haskell/bytestring/blob/master/.github/workflows/ci.yml#L56

Rerunning usually helps, so it is not a blocker, just a nuisance.

@Bodigrim
Copy link
Author

@jared-w any suggestions about this? It plagues roughly half of our Windows builds, e. g., https://github.com/haskell/bytestring/runs/2624677212#step:6:67, and I honestly lost count of rerunning CI over and over again. This did not use to happen with GHC 8.10.

@tfausak
Copy link

tfausak commented Oct 17, 2021

This frequently happens to me as well. Here's the latest example: https://github.com/tfausak/argo/runs/3921022504?check_suite_focus=true#step:11:42

As you said, re-running the build normally fixes it.

@tfausak
Copy link

tfausak commented Oct 22, 2021

I think this issue describes the same problem: actions/runner-images#712

There is a proposed solution in that thread (manually setting the TEMP environment variable), but I can't yet confirm if it works or not.

tfausak added a commit to tfausak/argo that referenced this issue Oct 22, 2021
@hazelweakly
Copy link
Collaborator

hazelweakly commented Nov 11, 2021

I investigated this some more and ran into https://gitlab.haskell.org/ghc/ghc/-/issues/16450, only to find out that @Bodigrim was quite ahead of me and replied there a few days ago :)

Unfortunately, I haven't the slightest idea what's wrong here.


@tfausak, it did occur to me that your TEMP fix only overwrote TEMP and not both TEMP and TMP.

- run: |
    echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV
    echo "TMP=$env:USERPROFILE\AppData\Local\Temp" >> $env:GITHUB_ENV

Does adding both env variables before using haskell/actions/setup resolve the issue? GHC 9.2.1 is also available on Windows now if you feel up for giving that a go.

Edit: looks like you tried out 9.2.1 already

@tfausak
Copy link

tfausak commented Nov 11, 2021

I haven't seen a random Windows build failure in a while. I'm not sure what changed.

@hazelweakly
Copy link
Collaborator

huh, neat. Glad I could fix it 😛

I'm going to go ahead and close this issue then, because it's not something I can fix.

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

No branches or pull requests

3 participants