[git v2.39.1] Strange behavior with fsmonitor on MacOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I work on the developer productivity team at Snap Inc and we
discovered a strange behavior with fsmonitor in git v2.39.1, which
consistently happens in one of our repos. We are unable to reproduce
this issue in any other internal or public repos, but the issue also
doesn’t seem to be reproducible when using the microsoft/git fork
(v2.39.1.vfs.0.0 - we use it for our largest repos). As a result, we
are unsure if we are running into a bug in git or an issue specific to
our repo (or both?). We appreciate any pointers in advance!

What did you do before the bug happened? (Steps to reproduce your issue)
- clone the repo via git clone (all default settings)
- git config core.fsmonitor true
- git status
- git diff-index HEAD

What did you expect to happen? (Expected behavior)
- 'git diff-index HEAD' is expected to return nothing

What happened instead? (Actual behavior)
- 'git diff-index HEAD' around ~44k files, which are all marked as deleted
- Example: ':100755 000000 fdc71572fe4e3ceb9305a8990d9d950e7bac6aa5
0000000000000000000000000000000000000000 D
src/adl/talkcorev3/generate_protos.sh'
- 44k files is amount 60% of the entire repo, there is no clear
pattern in the list of file paths (or attributes)

What's different between what you expected and what actually happened?
- Since the repo was just cloned, there are no changed files, so the
output of git diff-index should be empty.

Anything else you want to add:
- As I mentioned above, if we try using microsoft-git fork
(v2.39.1.vfs.0.0), the issue is no longer reproducible. No re-cloning
is necessary, simply installing v2.39.1.vfs.0.0 and running `git
diff-index HEAD` will return the correct result. Reverting back to
regular git, the issue is reproducible again.
- If you turn off fsmonitor, the issue is no longer reproducible.
- The issue is still reproducible if you switch from built-in MacOS
fsmonitor to watchman.
- A few notes about the repo:
  - it uses git lfs
  - it has around 23 submodules
  - Server-side we use GitHub Enterprise Server 3.5.7
- A few things we have checked, but without any luck:
  - various known problems around file permissions
  - various known problems around line endings

Please review the rest of the bug report below.
You can delete any lines you don't wish to share.


[System Info]
git version:
git version 2.39.1
cpu: arm64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51
PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000 arm64
compiler info: clang: 14.0.0 (clang-1400.0.29.202)
libc info: no libc information available
$SHELL (typically, interactive shell): /bin/bash




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux