msys2-autobuild icon indicating copy to clipboard operation
msys2-autobuild copied to clipboard

arm64 runner stuck in git clean

Open lazka opened this issue 9 months ago • 7 comments

https://github.com/msys2-arm/msys2-autobuild/actions/runs/14338197836/job/40190666280

  git clean/reset failed, sleeping for 0 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument
  git clean/reset failed, sleeping for 1 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument
  git clean/reset failed, sleeping for 2 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument
  git clean/reset failed, sleeping for 3 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument
  git clean/reset failed, sleeping for 4 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument
  git clean/reset failed, sleeping for 5 seconds
  warning: failed to remove B/src/build-CLANGARM64/NUL: Invalid argument

fyi @jeremyd2019

lazka avatar Apr 08 '25 16:04 lazka

How the heck did somebody create a file or directory called NUL? anyway, @dscho, more git clean brokenness

jeremyd2019 avatar Apr 08 '25 17:04 jeremyd2019

There was a 0-byte file called NUL in there. rmdir /s from cmd couldn't remove it, but rm -rf from MSYS2 could.

jeremyd2019 avatar Apr 08 '25 17:04 jeremyd2019

I guess you could remove those using the (unintuitive) core.longPaths=true setting (if you use Git for Windows)... but I guess these files were created using /usr/bin/git.exe?

dscho avatar Apr 08 '25 17:04 dscho

No, I think they were created by some build process (these are untracked files trying to be removed in git clean). Do you recommend I enable core.longPaths=true in my Git for Windows config for the self-hosted runners?

jeremyd2019 avatar Apr 08 '25 17:04 jeremyd2019

Do you recommend I enable core.longPaths=true in my Git for Windows config for the self-hosted runners?

In theory we should already do that: https://github.com/msys2/msys2-autobuild/blob/23845c53e0279e34f51a1317a0df619db47f1837/msys2_autobuild/build.py#L195

The error occurred after building https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-xavs/PKGBUILD - so no cygwin git involved.

lazka avatar Apr 08 '25 17:04 lazka

Sure enough, it's in the .git/config of that repository.

jeremyd2019 avatar Apr 08 '25 18:04 jeremyd2019

Hmm. I guess there is code to skip the \\?\ dance when the path is short enough..

dscho avatar Apr 09 '25 04:04 dscho