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

'git gc' hangs/crashes when working with geany #1068

Closed
1 task done
ascherer opened this issue Feb 21, 2017 · 5 comments
Closed
1 task done

'git gc' hangs/crashes when working with geany #1068

ascherer opened this issue Feb 21, 2017 · 5 comments
Assignees
Milestone

Comments

@ascherer
Copy link

  • 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.11.1.windows.1
built from commit: 1c1842bcba45569a84112ec64f72b08eb2d57c68
sizeof-long: 4
machine: x86_64
  • 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.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
  • 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

cat: /etc/install-options.txt: No such file or directory
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

In older versions of Git for Windows, it was possible to abort git gc with Ctrl-C.

Details

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

Bash

cd github/debbuild
[Edit some files of this project in Geany 1.29]
git gc
  • What did you expect to occur after running these commands?

I expected to see git gc run to completion and compactify .git/objects/.

  • What actually happened instead?

git gc hangs. When I quit Geany 1.29, I can Ctrl-C the running git gc. Trying git gc again results in the warning message

$ git gc
fatal: gc is already running on machine 'WKM-W040-80XA' pid 6892 (use --force if not)
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

The problem is reproducible with any local repository.

@dscho
Copy link
Member

dscho commented Feb 21, 2017

It may be possible that git gc wanted to print an error that some process is blocking some file or directory from being removed. A bug in v2.11.1 would prevent that error from actually be printed (the buggy code waits until more stuff accumulates to be printed, but that does not happen, of course).

Would you mind testing this hypothesis by installing, say, https://github.com/git-for-windows/git/releases/tag/v2.11.1.windows-prerelease.2?

@ascherer
Copy link
Author

git version 2.11.1.windows.prerelease.2
built from commit: 86d49ccac7afb39e03ba2632803c5ab67d4bb792
sizeof-long: 4
machine: x86_64

shows the same behavior as before. No error/warning message is printed.

@dscho
Copy link
Member

dscho commented Feb 22, 2017

86d49cc

Oh bummer, sorry, I forgot that this version already had the "buffered stderr" bug. I think the version to verify that there is a question hanging is v2.10.2. For testing, I would suggest the portable version: https://github.com/git-for-windows/git/releases/download/v2.10.2.windows.1/PortableGit-2.10.2-64-bit.7z.exe

@ascherer
Copy link
Author

git version 2.10.2.windows.1
sizeof-long: 4
machine: x86_64

correctly reports

$ git gc
Counting objects: 557, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (185/185), done.
Writing objects: 100% (557/557), done.
Total 557 (delta 368), reused 557 (delta 368)
Unlink of file '.git/objects/pack/pack-b9c6732d813db7d9882d43795c912415a84936fb.pack' failed. Should I try again? (y/n)

If I quit Geany and answer y, git gc runs to completion. (If I abort with Ctrl-C and rerun, I am requested to use option --force.)

@dscho
Copy link
Member

dscho commented Feb 23, 2017

Okay, good. It would appear that the bug fix we already have in master fixes this issue, too, then.

Even if it is not obvious from the descriptions, the same bug is the reason for #1062 and #1064.

@dscho dscho self-assigned this Feb 23, 2017
@dscho dscho added this to the v2.11.2 milestone Feb 23, 2017
@dscho dscho closed this as completed Feb 26, 2017
benpeart pushed a commit that referenced this issue Jan 18, 2018
Git for Windows v2.12.0

Changes since Git for Windows v2.11.1 (February 3rd 2017)

New Features

  • Comes with Git v2.12.0.
  • The builtin difftool is no longer opt-in, as it graduated to be
    officially adopted by the Git project.
  • Comes with v2.7.0 of the POSIX emulation layer based on the Cygwin
    runtime.
  • Includes cURL 7.53.1.
  • The Portable Git now defaults to using the included Git Credential
    Manager.

Bug Fixes

  • The stderr output is unbuffered again, i.e. errors are displayed
    immediately (this was reported on the Git mailing list as well as
    issues #1064, #1064, #1068).
  • Git can clone again from paths containing non-ASCII characters.
  • We no longer ship two different versions of curl.exe.
  • Hitting Ctrl+T in Git GUI even after all files have been (un)staged
    no longer throws an exception.
  • A couple of Git GUI bugs regarding the list of recent repositories
    have been fixed.
  • The git-bash.exe helper now waits again for the terminal to be
    closed before returning.
  • Git for Windows no longer attempts to send empty credentials to
    HTTP(S) servers that handle only Basic and/or Digest authentication
    .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants