cmderdev/cmder

[Bug] Cmder sometimes hangs when doing `git push` or `git pull`

paunovic opened this issue · 5 comments

Version Information

Cmder version: 1.3.25
Operating system: Windows 11 x64

Cmder Edition

Cmder Mini

Description of the issue

Hi everyone, sometimes Cmder hangs while doing git operations, and while underyling git operation succeeds, I see something like this in output and then it hangs. I'm not able to continue the terminal session or Ctrl+C out of it, have to close window completely and open a new one. Any ideas what might be wrong? I'm running with GIT_TRACE=1 and GIT_CURL_VERBOSE=1 env vars set to see the full output:

marko@x1carbon /d/projects/caprx/code.capitalrx.com/dev.capitalrx.com/vm/box/virtualbox (master)
$ git pull
15:35:29.724270 exec-cmd.c:243          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
15:35:29.728296 git.c:465               trace: built-in: git pull
15:35:29.738296 run-command.c:657       trace: run_command: git fetch --update-head-ok
15:35:29.746248 exec-cmd.c:243          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:35:29.749167 git.c:465               trace: built-in: git fetch --update-head-ok
15:35:29.760650 run-command.c:657       trace: run_command: unset GIT_PREFIX; GIT_PROTOCOL=version=2 ssh -o SendEnv=GIT_PROTOCOL git@github.com 'git-upload-pack '\''capitalrx/code.capitalrx.com.git'\'''
remote: Enumerating objects: 626, done.
remote: Compressing objects: 100% (165/165), done.
15:35:32.961756 run-command.c:657       trace: run_command: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 12024 on x1carbon' --pack_header=2,626
15:35:32.977231 exec-cmd.c:243          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:35:32.986860 git.c:465               trace: built-in: git index-pack --stdin -v --fix-thin '--keep=fetch-pack 12024 on x1carbon' --pack_header=2,626
Resolving deltas:  98% (445/454)Resolving deltas:  63% (287/454)

ConEmu64_MT7yUMy8xD

How to reproduce

No response

Additional context

No response

Checklist

  • I have read the documentation.
  • I have searched for similar issues and found none that describe my issue.
  • I have reproduced the issue on the latest version of Cmder.
  • I am certain my issues are not related to ConEmu, Clink, or other third-party tools that Cmder uses.

It's probably the known issue in ConEmu.

#2902 (comment)

If this is indeed the race condition caused by ConEmu, the issue is tracked here: Maximus5/ConEmu#2520

However, as Maximus5 (the developer of ConEmu) has been inactive for years now, either disable the ConEmuHK injection,

or alternatively, switch to using Windows Terminal + Cmder instead of the default ConEmu with Cmder.

Unfortunately disabling injection didnt fix my issue, I just noticed today that problem still persists:

marko@x1carbon /d/projects/caprx/code.capitalrx.com/dev.capitalrx.com/vm/box/virtualbox ()
$ git push
10:10:56.712347 exec-cmd.c:243          trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
10:10:56.716300 git.c:465               trace: built-in: git push
10:10:56.729518 run-command.c:657       trace: run_command: unset GIT_PREFIX; ssh git@github.com 'git-receive-pack '\''capitalrx/code.capitalrx.com.git'\'''
10:10:59.294498 run-command.c:657       trace: run_command: git pack-objects --all-progress-implied --revs --stdout --thin --delta-base-offset --progress
10:10:59.306261 exec-cmd.c:243          trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
10:10:59.313078 git.c:465               trace: built-in: git pack-objects --all-progress-implied --revs --stdout --thin --delta-base-offset --progress
Compressing objects:  87% (54/62)Compressing objects:  62% (39/62)

Whatever the problem is, it's either in git or in ConEmu. It's not a Cmder issue.

You could try David's suggestion of using Cmder with Windows Terminal instead of the default ConEmu with Cmder.

Thanks, will switch to native terminal integration and hopefully that resolves the issue.