Skip to content
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

When fscache is used, "Function not implemented" messages are shown after 2.20 #1989

Closed
shkit opened this issue Dec 18, 2018 · 23 comments
Closed
Assignees
Milestone

Comments

@shkit
Copy link

shkit commented Dec 18, 2018

  • [x ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.20.1.windows.1
cpu: x86_64
built from commit: 7c9fbc07db0e2939b36095df45864b8cda19b64f
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

The drive which stores repository data seems to be remote disk.
(I'm not Administrator and cannot know real hardware)

On other machine which have local disk, this issue seems not to show for me.
Therefore, this issue may depend what disk type is, I think.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

CMD

git status
  • What did you expect to occur after running these commands?

without error messages

  • What actually happened instead?

After 2.20, many "Function not implemented" messages are shown only under caffe2/operators directory in PyTorch repository.

> git status
Refresh index: 100% (5188/5188), done.
caffe2/operators/CMakeLists.txt: Function not implemented
caffe2/operators/abs_op.cc: Function not implemented
caffe2/operators/abs_op.cu: Function not implemented
...
caffe2/operators/zero_gradient_op.cc: Function not implemented
caffe2/operators/zero_gradient_op.h: Function not implemented
caffe2/operators/zero_gradient_op_gpu.cc: Function not implemented
warning: could not open directory 'caffe2/operators/': Function not implemented
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

If I disable fscahe, these messages are not shown.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

I found these repository and not found other repositories that this issue occurs.

@dscho
Copy link
Member

dscho commented Dec 18, 2018

Obviously, I cannot reproduce, otherwise I would not have released Git for Windows v2.20.1 in the current form. I cloned all 90+ megabytes of your MCVE (not very "minimal", I must say), and a git status does not show the problems you report:

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

It would be good if you could verify that a fresh clone of said repository reproduces the issue for you, and if it does not, work on making that MCVE complete.

@dscho dscho added the unclear label Dec 18, 2018
@shkit
Copy link
Author

shkit commented Dec 20, 2018

@dscho Yes, this was not "minimal" report. Sorry...
When I try a fresh clone, I cannot see any problems. I suppose my repository was corrupted.
Thanks for investigating!

@shkit shkit closed this as completed Dec 20, 2018
@dozius
Copy link

dozius commented Dec 20, 2018

I have the same or similar issue. It seems to only affect repositories on network drives. I was able to reproduce on any repo I copied from my local drive to a network drive. Even a simple, newly created repo with one file named test.txt had the same problem. Here is the output from that repo.

test.txt: Function not implemented
fatal: cannot use .git/info/exclude as an exclude file

Disabling the fscache, reverting to 2.19.1 or moving the repo to the local drive fixes the problem.

I see there were changes to the caching in 2.19.2 and 20.0.0. Even tough it was reverted to pre-release, I can try out 2.19.2 when I am back at work to try to narrow things down.

I am running git from cmd/powershell, not bash. Win7 x64. Servers are all under I.T. control, but I can try to find out what they are running. If there is anything else I can do to gather more info, just let me know and I will give it try.

@dozius
Copy link

dozius commented Dec 20, 2018

aaaaand this was closed as I was typing. If you want me to open a new issue, let me know and I will do so.

@shkit
Copy link
Author

shkit commented Dec 20, 2018

@dscho Sorry again. I forget disabling fscache.
I re-try to clone PyTorch repository with fscache, I see issue is still exists.
My verification is this. More "minimal" examples are not found at this time...

git clone https://github.com/pytorch/pytorch.git
cd pytorch
git status

@dozius thanks for comment.
Yes, this issue occrus on network drive in my environment too.
But this issue seems not to happen with Samba. I suppose some proprietry implementation not support some function and cause this issue.

@shkit shkit reopened this Dec 20, 2018
@dozius
Copy link

dozius commented Dec 20, 2018

Confirmed the issue is not present in 2.19.2. I would guess the change that broke things was part of #1937.

I had a quick peak and perhaps it has something to do with the handle being passed to NtQueryDirectoryFile being created with CreateFile instead of NtCreateFile as the documentation suggests.

I'm no expert on win internals, but I know the public API handles a lot of path ugliness for you before it's passed to the internals. I wouldn't be surprised if something special for UNC paths was missed.

@chrisrapson
Copy link

@dscho
Copy link
Member

dscho commented Jan 18, 2019

The obvious workaround is to set core.fscache = false. While not satisfying, it gets you unblocked.

The real fix(es) will have to wait until somebody with enough energy and knowledge will get the time to investigate this.

@dscho
Copy link
Member

dscho commented Jan 18, 2019

I would guess the change that broke things was part of #1937.

This is indeed the very culprit, and the fix would be to (partially) reinstate the previous version when the current version fails.

@dozius
Copy link

dozius commented Jan 19, 2019

Turning fscache off is way too slow in my case. I've reverted to the previous release to keep going, which is fine for now.

@benpeart, when you have some time could you look into this?

@benpeart
Copy link

Yes @dozius, I'll look into how to get fscache working better with network drives. Thanks for letting me know about the issue.

@dscho
Copy link
Member

dscho commented Jan 28, 2019

I cannot reproduce the issue, but then, it seems that all of the reporters run one form of Windows 7 or another, and I run Windows 10 (1809)...

@dscho
Copy link
Member

dscho commented Jan 28, 2019

My bad, this report is not actually about Windows 7 (I always get confused by the leading 6 in ver's output) but about Windows 8.1, Update 1...

@chrisrapson
Copy link

@dscho I'm not sure if your earlier confusion is resolved or not. Just in case, I thought I'd mention that I am running Windows 10, and can reproduce the issue.

$ cmd.exe \c ver
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.          

H:\test>exit
exit

$ git status
git status
.gitignore: Function not implemented
test1: Function not implemented
fatal: cannot use .git/info/exclude as an exclude file         

@dscho
Copy link
Member

dscho commented Jan 29, 2019

@chrisrapson in the meantime, we figured out a bit more: it appears that not only the client version, but also the server version plays a role. So if your H: drive is mapped to, say, a Windows 7 computer, then the same issue would arise.

Would you be able to test whether ad72b248f06d57e94bb1e6620544090a411fbcba fixes it for you, too?

@dscho
Copy link
Member

dscho commented Jan 29, 2019

Closed via #2044

@dscho dscho closed this as completed Jan 29, 2019
dscho added a commit to git-for-windows/build-extra that referenced this issue Jan 29, 2019
FSCache works again [on network
drives](git-for-windows/git#2022),
in particular [when Windows 8.1 or
older](git-for-windows/git#1989) are
involved.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho
Copy link
Member

dscho commented Jan 30, 2019

A new snapshot is available that should fix this issue. Could I ask y'all to please test?

@dozius
Copy link

dozius commented Jan 30, 2019

I will give this a shot tomorrow and report back. Thanks!

@chrisrapson
Copy link

I can confirm that the snapshot worked for me. Now git status gives the expected output. I checked with fscache set to true and false, for both network and local drives.

@dscho
Copy link
Member

dscho commented Jan 31, 2019

Thanks for testing!

@dozius
Copy link

dozius commented Feb 1, 2019 via email

@shkit
Copy link
Author

shkit commented Feb 5, 2019

I've tried on my repository with fscache is true and false, everthing works fine.
Thanks to all!

@chrisribe
Copy link

I can confirm the snapshot (https://wingit.blob.core.windows.net/files/index.html) fixes the issue for me.
(Windows Server 2008 R2 Standard, via map drive)

Note that the fix is not part of release 2.20.1, but is part of release v2.21.0-rc0.windows.1

Thanks for all your hard work !

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

No branches or pull requests

6 participants