git-lfs crashing on MacOS Ventura · Issue #1995 · hbons/SparkleShare · GitHub
Skip to content

git-lfs crashing on MacOS Ventura #1995

Open

Description

@OllyMason

Hi,

SparkeShare v3.28.0 (installed with Homebrew)
MacOS Ventura 13.0.1

What happened:

git push to remote fails, whatever the remote - git-lfs crashes.

What I expected to happen:

Sync as normal

This happens when:

  1. An update is read from the disk
  2. git push happens, pre-push hook calling a (bundled?) git-lfs is invoked

Session log snippet showing the first instance:

21:42:10 Git | dotfiles | No remote changes, local+remote: 255b1aa076f7b573aacb37a8e8d18c489273daf8
21:45:39 Cmd | dotfiles | git status --porcelain
21:45:39 Local | dotfiles | Activity detected, waiting for it to settle...
21:45:41 Local | dotfiles | Activity has settled
21:45:41 Cmd | dotfiles | git status --porcelain
21:45:41 SyncUp | dotfiles | Initiated
21:45:41 Cmd | dotfiles | git add --all
21:45:41 Cmd | dotfiles | git status --porcelain
21:45:41 Cmd | dotfiles | git config user.name "Oliver Mason"
21:45:41 Cmd | dotfiles | git config user.email "ollymason@gmail.com"
21:45:42 Cmd | dotfiles | git commit --all --file="/Users/omason/SparkleShare/github.com/dotfiles/.git/info/commit_message" --author="Oliver Mason <ollymason@gmail.com>"
21:45:42 Cmd | chmod 700 /Users/omason/SparkleShare/github.com/dotfiles/.git/hooks/pre-push
21:45:42 Cmd | dotfiles | git push --all --progress origin
21:45:43 Git | .git/hooks/pre-push: line 2: 39591 Killed: 9               env GIT_SSH_COMMAND='ssh -i /Users/omason/.config/org.sparkleshare.SparkleShare/ssh/2020-04-13_11h12.key -o UserKnownHostsFile=/Users/omason/.config/org.sparkleshare.SparkleShare/ssh/known_hosts -o IdentitiesOnly=yes -o PasswordAuthentication=no -F /dev/null' /Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs pre-push "$@"
21:45:43 Git | error: failed to push some refs to 'ssh://git@gitrepo/path/dotfiles.git'
21:45:43 SyncUp | dotfiles | Error
21:45:43 SyncDown | dotfiles | Initiated
21:45:43 Cmd | dotfiles | git rev-parse HEAD
21:45:43 Cmd | dotfiles | git fetch --progress origin main
21:45:44 Git | From ssh://github.com/OllyMason/dotfiles
21:45:44 Git |  * branch            main       -> FETCH_HEAD
21:45:45 Cmd | dotfiles | git status --porcelain
21:45:45 Cmd | dotfiles | git config core.ignorecase true
21:45:45 Cmd | dotfiles | git merge FETCH_HEAD
21:45:45 Cmd | dotfiles | git config core.ignorecase false
21:45:45 Cmd | dotfiles | git --no-pager log --since=1.month --name-status --date=iso --find-renames --no-merges --no-color
21:45:45 Cmd | dotfiles | git rev-parse HEAD
21:45:45 SyncDown | dotfiles | Done
21:45:45 Cmd | dotfiles | git add --all
21:45:45 Cmd | dotfiles | git status --porcelain
21:45:45 Cmd | chmod 700 /Users/omason/SparkleShare/github.com/dotfiles/.git/hooks/pre-push
21:45:45 Cmd | dotfiles | git push --all --progress origin
21:45:46 Git | .git/hooks/pre-push: line 2: 39611 Killed: 9               env GIT_SSH_COMMAND='ssh -i /Users/omason/.config/org.sparkleshare.SparkleShare/ssh/2020-04-13_11h12.key -o UserKnownHostsFile=/Users/omason/.config/org.sparkleshare.SparkleShare/ssh/known_hosts -o IdentitiesOnly=yes -o PasswordAuthentication=no -F /dev/null' /Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs pre-push "$@"
21:45:46 Git | error: failed to push some refs to 'ssh://git@gitrepo/path/dotfiles.git'
21:45:47 Cmd | dotfiles | git status --porcelain
21:45:49 Cmd | dotfiles | git status --porcelain

If I manually try to push from the working directory, I see the same error:

.git/hooks/pre-push: line 2:  6884 Killed: 9               env GIT_SSH_COMMAND='ssh -i /Users/omason/.config/org.sparkleshare.SparkleShare/ssh/2020-04-13_11h12.key -o UserKnownHostsFile=/Users/omason/.config/org.sparkleshare.SparkleShare/ssh/known_hosts -o IdentitiesOnly=yes -o PasswordAuthentication=no -F /dev/null' /Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs pre-push "$@"
error: failed to push some refs to 'ssh://git@gitrepo/path/dotfiles.git'

Changing the git hook to another git-lfs or removing it allows for manual push. However I can't simply leave the git hook amended, as it gets reverted. For completeness:

  • syncing with a different remote doesn't make any difference.
  • there are no objects in this repo > 100MB, even in history (purged).

It appears to be a bundled git-lfs:

$ md5 $(which git-lfs)
MD5 (/usr/local/bin/git-lfs) = 13e618b0f93e32376a54448bd1ae757f
$ md5 /Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs
MD5 (/Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs) = f81a1a065a26a4123193e8fd96c561ad

Running git-lfs from that path on its own even to see version also crashes.

$ /usr/local/bin/git-lfs --version
git-lfs/3.3.0 (GitHub; darwin amd64; go 1.19.3)
$ /Users/omason/.config/org.sparkleshare.SparkleShare/bin/git-lfs --version
Killed: 9

There is no addon security software active that might be killing git-lfs, but there does appear to be some system security guarding against inappropriate resource usage by this executable. System crash log attached (not of that same instance, that appears to have aged out), but it's a bit beyond me to diagnose.
git-lfs-2022-12-11-012103.txt

Happy to test a 3.38 binary build.

Regards,

Olly

Activity

  1. dabrahams commented on Dec 24, 2022

    @dabrahams

    This is happening to me, too, on an intel macOS 13.1. Interestingly, my ARM64 macOS 13.0.1 computer (which I'm about to upgrade) is not having the same problem. Let me know if there's anything I can do to help diagnose the problem. Attaching full log, FWIW.
    log_2022-12-23.1.txt

  2. sdondley commented on Dec 28, 2022

    @sdondley

    Same issue. Intel macos running Ventura 13.1

    UPDATE: I managed to get version 3.38 of SparkleShare installed but I'm having the same problem.

  3. sdondley commented on Dec 28, 2022

    @sdondley

    OK, fixed by updating the git-lfs binary in ~/.config/org.sparkleshare.SparkleShare by doing the following:

    brew install git-lfs # download latest version of binary
    cd ~/.config/org.sparkleshare.SparkleShare
    mv git-lfs git-lfs~ # move old binary out of way
    ln -s /usr/local/bin/git-lfs # symlink to binary

  4. andibraeu commented on Mar 4, 2023

    @andibraeu

    I had to replace the binary in /Applications/SparkleShare.app/Contents/Resources/git/libexec/git-core/, cause SparkleShare tries to replace git-lfs in ~/.config/org.sparkleshare.SparkleShare/bin. That leeds to this error:

    [ERROR] FATAL UNHANDLED EXCEPTION: System.UnauthorizedAccessException: Access to the path "/Applications/SparkleShare.app/Contents/Resources/git/libexec/git-core/git-lfs" or "/Users/funkyusername/.config/org.sparkleshare.SparkleShare/bin/git-lfs" is denied.

  5. hbons commented on Aug 14, 2023

    @hbons
    Owner

    Is this on M1? It could be that Git LFS isn't compiled for the platform...

  6. andibraeu commented on Sep 11, 2023

    @andibraeu

    nope, in my case it's Intel. It happens since the update to Ventura

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions