-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Unable to write file: Function not implemented on ReFS file system since version 2.48.1 #5427
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
Comments
I use a DevDrive (which is ReFS, I believe) on Is there maybe any way you can build Git and see what exact function call reports |
I have the same issue with version 2.48.1 on Windows Server 2022 (10.0.20348.3091) when using an ReFS disk. |
@jensver so maybe you can build Git and single-step to find out which function call reports
If you want to be stuck with that version, that's a fine approach. |
I'm sorry, that's not really my area of expertise. |
@jensver sorry to hear that. |
I have a ReFS D drive on a Windows Server 2022 box and I'm observing the same:
If I downgrade git it works again:
I happen to be using Edit:
|
@dhirschfeld Is there maybe any way you can build Git and see what exact function call reports ENOSYS? |
I might be able to build it, but I'm not sure how I'd then go about seeing what function call reports ENOSYS. I'm mostly a Python dev and not really set up for any serious debugging in C 😰 |
@dhirschfeld unfortunately I cannot reproduce and am therefore unable to debug it. It's not that big of a deal to debug C, really. I tried my best to describe it in https://gitforwindows.org/debugging-git.html. The gist of it is:
After that, you can run Git's executables in GDB like so:
Now, it is useful to ask the debugger to pause the program when the code path is entered that outputs an error message. The functions in Git that output error messages are
before calling
This back trace shows which functions were called by which other functions. The inner-most code location is You can inspect the source code at the current code location using the You can navigate between the different stack frames using Importantly in this instance, you can go Please let us know how it goes! |
I've tried these steps and here's the output:
|
@fusumayuki thank you for rising to the challenge!
That is interesting. if (commit_lock_file(&lock) < 0) {
error_errno(_("could not write config file %s"), config_filename);
ret = CONFIG_NO_WRITE;
goto out_free;
} Contrary to what I had expected, the problem does not arise when the file is opened for writing, but when the temporary Let's follow that code. Here is the My guess is that the return value of @fusumayuki could I ask you to launch the command in If my theory is incorrect, that breakpoint would not be hit. In this case, I would like to ask you to set a breakpoint on the Another potential vector to figure this out would be to set a breakpoint on @fusumayuki thank you so much for assisting me in fixing this bug! |
@dscho thank you for your reply! The breakpoint at Here's the backtrace:
|
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Excellent! @fusumayuki could I ask you to try out the fix in #5515? |
It works now! Thank you so much for your help! |
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
On Windows Server 2022, Git v2.48.1 introduced a regression where it [failed to write files on ReFS drives](git-for-windows/git#5427), which was [fixed](git-for-windows/git#5515). Signed-off-by: gitforwindowshelper[bot] <[email protected]>
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
Thanks @dscho & @fusumayuki for getting to the bottom of this! ❤️ |
@dhirschfeld could you test the latest snapshot, please? |
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
ReFS is an alternative filesystem to NTFS. On Windows 2022, it seems not to support the rename operation using POSIX semantics that Git uses on Windows as of 391bcea (compat/mingw: support POSIX semantics for atomic renames, 2024-10-27). However, Windows 2022 reports `ERROR_NOT_SUPPORTED` in this instance. This is in contrast to `ERROR_INVALID_PARAMETER` (as previous Windows versions would report that do not support POSIX semantics in renames at all). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427 Signed-off-by: Johannes Schindelin <[email protected]>
Git on Windows 2022 fails to write config files on ReFS with the error message "Function not implemented". The reason is that `ERROR_NOT_SUPPORTED` is reported (not `ERROR_INVALID_PARAMETER`, as expected). Let's handle both errors the same: by falling back to the best-effort option, namely to rename without POSIX semantics. This fixes #5427
After I've updated my Git to
v2.48.1.windows.1
, the commandsgit init
,git gc
andgit add
(probably many more, I haven't tried) started failing in repositories that reside on ReFS formatted disks.This problem was not present in previous release
2.47.1(2)
.Example:
The same commands still work without problems on NTFS formatted disks. The same commands also work in previous
2.47.1(2)
Git version on the same ReFS disks.And no, disks are not damaged, I tried same commands on two different SSDs, and two different HDDs.
Additional info
OS version: Windows Server 2022
10.0.20348.3207
Some relevant .gitconfig entries:
The text was updated successfully, but these errors were encountered: