Skip to content

Git installer hangs on non-Windows drive #815

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

Closed
1 task done
ArtificialTruth opened this issue Jul 11, 2016 · 36 comments
Closed
1 task done

Git installer hangs on non-Windows drive #815

ArtificialTruth opened this issue Jul 11, 2016 · 36 comments

Comments

@ArtificialTruth
Copy link

ArtificialTruth commented Jul 11, 2016

  • 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? 32-bit or 64-bit? Include the
    output of git version as well.

Git-2.9.0-64-bit

$ git --version
-
  • Which version of Windows are you running? 32-bit or 64-bit?

64 bit

  • What options did you set as part of the installation? Or did you choose the
    defaults?

    Defaults

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Windows 10 Pro

Details

  • What is the issue?

I tried to install Git on my HDD and the install hangs when it reached the end (progress bar was 100%).
No dialogs appared after it was done either. Just 1 icon visible in the task bar, and another git icon/window was also visible when browsing ALT + Tab.
Tried to uninstall and reboot a few times, same issue.

Then I finally gave in and tried to install it on the C drive (Windows installation drive) and it worked w/o issues.

@dscho
Copy link
Member

dscho commented Jul 11, 2016

Is there any chance to get a log file (by re-running the installation with /LOG=<filename>)?

@ArtificialTruth
Copy link
Author

Actually it wasn't 100% default config, I unchecked use explorer integration.
I reinstalled Git, here's the log: https://pastebin.com/Ldi6Hwha (same issue occurred)

@icokk
Copy link

icokk commented Jul 20, 2016

It happens to me as well (every time). I also have the explorer integration disabled.

Apparently, the installer runs the following command which hangs:

"C:\Program Files\Git\mingw64\bin\git.exe" config -f config http.sslCAInfo "C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt"

Then it waits indefinitely for it to finish.

@icokk
Copy link

icokk commented Jul 20, 2016

Additional information: the hang happened in Git for Windows 2.9.2 installer on Windows 10 (I also have TortoiseGit 2.2.0 if it matters). When I reinstalled Git 2.8.1 the installer didn't hang.

@fourpastmidnight
Copy link

@icokk: We could use an installation log file from you too, as installation on your machine is different from one done on @ArtificialTruth's machine; the cause may or may not be the same, especially if installation options and locations are different between the two of you.

@icokk
Copy link

icokk commented Jul 21, 2016

@fourpastmidnight I was looking for install log in the install temporary dir and it wasn't there. Can you please tell me where I can find it?

@fourpastmidnight
Copy link

@icokk , you must re-run the installation from the command line and pass the /LOG=<filename> switch when running the installer. Thanks.

@icokk
Copy link

icokk commented Jul 21, 2016

@fourpastmidnight
Copy link

@icokk: thanks for the log file. Did you experience the installer "hanging" at the end? I can't see anything obvious that went wrong (actually, I don't see any errors or failures of any kind at all) in the log file. I see that all files were successfully copied and at the end of the log, it says that installation was successful.

Also, when you did experience the hang, were other programs running while you were upgrading/installing Git for Windows, such as Visual Studio or even Tortoise Git? I have seen instances where a program that comes with Git is "in use" by another open program on your machine--and this can cause installation/upgrade issues (hence the general advice to shut down all running programs when installing any piece of software).

@icokk
Copy link

icokk commented Jul 22, 2016

I have TortoiseGit 2.2.0 installed. This time I killed TortoiseGitCache (I cannot kill the rest except by uninstalling it because it runs as explorer shell plugin). The installer hanged at the end after it started hanging subprocess

"C:\Program Files\Git\mingw64\bin\git.exe" config -f config core.fscache true

When I killed the subprocess the installer finished (previous time it remained hanging). Is this core.fscache setting something new in 2.9? (the 2.8.1 installer doesn't have this problem)

@fourpastmidnight
Copy link

@icokk: Thanks for the clarifications. The core.fscache setting has been around for a while but was introduced enabled by default since 2.7.4, IIRC. FWIW, you mentioned previously that the installer hanged on setting a different config setting: http.sslCAInfo; and now you say it hanged on setting core.fscache.

So one more question: Was the setting configured correctly in the configuration file after you terminated the sub-process to "let the installer finish"?

@fourpastmidnight
Copy link

@ArtificialTruth: Since you opened the issue, I wanted to bring it back to you. Your installation scenario is different from @icokk. I noticed you initially attempted to install to your B: volume. Also, are you running TortoiseGit? If so, what version? Were you running any other programs during installation/upgrade, such as Visual Studio?

@icokk
Copy link

icokk commented Jul 22, 2016

@fourpastmidnight The settings in global gitconfig are correct, but they might have been written by 2.8 installer.

Actually, I have noticed there might be a bigger problem: I have created "git unmerged" alias which runs the attached script to list the unmerged remote branches. But when I run it, it runs extremely slow (first I thought it hangs, but then I noticed it actually finishes in 5 minutes instead of a second or two as before). Could there be some problem in the mingw64 bundled with 2.9.2 that makes git bash subshells run so slow?

git-branch-list.zip

@dscho
Copy link
Member

dscho commented Jul 22, 2016

Actually, I have noticed there might be a bigger problem: I have created "git unmerged" alias which runs the attached script to list the unmerged remote branches

Could you run this after setting the environment variable GIT_TRACE=1?

@ArtificialTruth
Copy link
Author

@fourpastmidnight I don't have TortiseGit. I was definitely not running visual studio, though I may have it installed.

@fourpastmidnight
Copy link

@ArtificialTruth Thanks for the information. Only if VS was running during install would I expect a possible installation issue; so this can be ruled out. Thanks again.

@bwmeier
Copy link

bwmeier commented Jul 22, 2016

Install of git-2.9.2-64-bit.exe on Windows 10 Enterprise 1511 10586.494 hangs on post-install step. According to task manager / process explorer, the process is waiting on bash.exe, which is waiting on mkdir.exe. If I kill mkdir, it then runs another mkdir. I can continue with that until I get tired :-). If I kill the bash.exe, then the install completes, but obviously the post-install step did not run.

@dscho
Copy link
Member

dscho commented Jul 23, 2016

waiting on mkdir.exe

That is interesting. Would you have a chance to find out which directory it tries to create (using wmic or ProcMon)?

@ArtificialTruth
Copy link
Author

I'm curious, how to see what causes a process to hang? @bwmeier

@dscho
Copy link
Member

dscho commented Jul 23, 2016

how to see what causes a process to hang?

ProcMon.

@ghost
Copy link

ghost commented Jul 25, 2016

Same for me as bwmeier

@bwmeier
Copy link

bwmeier commented Jul 25, 2016

@dscho
Procmon doesn't show any command line options on the mkdir that's locking up. My best guess would be that it is related to the shm subdirectory since that is missing in the final install. The weirdest thing is that one mkdir runs successfully before this one.

As best I can figure, here's the sequence:

  1. install "completes"
  2. installer runs usr\bin\bash.exe --norc -c "export PATH=/usr/bin:$PATH; export SYSCONFDIR=/etc; for p in $(export LC_COLLATE=C; echo /etc/post-install/*.post); do test -e \"$p\" && . \"$p\"; done"
  3. bash runs a subshell for executing C:\Program Files\Git\etc\post-install\01-devices.post
  4. Processing that script, the /dev directory is searched for and created successfully via mkdir
  5. The /dev/shm directory is searched for and not found
  6. mkdir is called, but locks up, and the directory is not created.

@ghost
Copy link

ghost commented Aug 4, 2016

After installing the Windows 10 Anniversary Update, installation worked fine for me: https://support.microsoft.com/en-us/kb/3176929

@shiftkey
Copy link

shiftkey commented Dec 8, 2016

Re-ran the Git for Windows 2.11.0 installer on Windows 10 build 14393 on F: and the installer seems to complete without errors.

Log: https://gist.github.com/shiftkey/c8405f47a79783cc83302c5ceab89463

@dscho not sure if you want to dig into this further given it's been quiet for a few months - it's not clear what components are needed, and in what order or state, to trigger this. Reopen if you care.

@shiftkey shiftkey closed this as completed Dec 8, 2016
@robbyph
Copy link

robbyph commented Jun 23, 2017

I'm currently having this issue with version 2.13.1.2 Setup

@dscho
Copy link
Member

dscho commented Jun 26, 2017

I'm currently having this issue with version 2.13.1.2 Setup

Detailed logs, please. (Use the /LOG option.)

@Pckmule
Copy link

Pckmule commented Dec 19, 2017

Hi Guys,

I seem to be experiencing the same issue described by @ArtificialTruth and others, but with version 2.15.1.2-64-bit in my case. The installer UI becomes unresponsive, but appears to show that the install is essentially complete. It's been over 24 hours now and it's still stuck in this state.

capture

I'm running the setup (downloaded at https://github.com/git-for-windows/git/releases/download/v2.15.1.windows.2/Git-2.15.1.2-64-bit.exe) on a PC running a clean install of Windows 7 Ultimate 64-bit and I ran the installer alone without concurrently running any other applications. My HDD is labelled A:.

I don't recall exactly what settings/options I selected. Most were default, but I opted to choose some non-default options as well. For example, to use the SSL certificate verification/management component built into Windows.

The only related processes which seem to be running are seemingly consuming no CPU resources, and I don't see bash.exe or mkdir.exe running anywhere so it's probably not related to the scenario described by @bwmeier. It is odd that there are 2 instances of Git Setup and Setup/Uninstall processes...

capture 2

It's probably also worth noting that I had a similar (perhaps the same) problem when I tried to install Visual Studio 2017 Community edition with Git, about a month ago on the same PC.

Does anyone have any suggestions or fixes?

@dscho
Copy link
Member

dscho commented Dec 20, 2017

@Pckmule could I ask you to re-run the installation with Process Monitor running, to figure out what calls are made while it is hanging? To make things a bit easier to see, I would add a filter on the Path (it should start with C:\Program Files\Git).

@mcarpenterjr
Copy link

Was there a solution to this? I have an instance on WinX 32bit that is hanging at the end of the install. Both with the .exe and with choco

@BrendtW
Copy link

BrendtW commented Jun 25, 2018

Same Issue here, install hangs at 100% any updates on this?

----last parts of the log---------------

2018-06-25 20:58:41.951 -- Icon entry --
2018-06-25 20:58:41.951 Dest filename: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git\Git CMD.lnk
2018-06-25 20:58:41.951 Creating the icon.
2018-06-25 20:58:41.951 Successfully created the icon.
2018-06-25 20:58:42.139 Installation process succeeded.


install x64 on Windows 10.

@dscho
Copy link
Member

dscho commented Jun 29, 2018

any updates on this?

Yes. I asked for people experiencing these issues to perform a couple of diagnostics, and responses have yet to come in.

@WizardCM
Copy link

WizardCM commented Aug 19, 2018

@dscho I've run into this issue too, here's a CSV of a dump from Process Monitor, filtered by "git". It's 20mb so I couldn't just upload a gist. https://mega.nz/#!MhA3RazS!dG5-IkLpA2z9RH0EwCrwIAfqbsi6qaMv7XwA9BUEC_E

(Here's a 1 GB XML dump with tracebacks https://mega.nz/#!shYFzSYa!BPmrJExr7g9zwNchSc54s6gsdNG_QteRZVB9wrbE3dw )

And below is a dump of the contents of post-install.log which is still hooked by the process according to Process Explorer.

"running post-install"
'C:\WINDOWS\system32\drivers\etc\hosts' -> '/etc/hosts'
'C:\WINDOWS\system32\drivers\etc\protocol' -> '/etc/protocols'
'C:\WINDOWS\system32\drivers\etc\services' -> '/etc/services'
'C:\WINDOWS\system32\drivers\etc\networks' -> '/etc/networks'

@dscho
Copy link
Member

dscho commented Aug 25, 2018

Thank you for taking the time @WizardCM!

To be honest, I hoped that you would find some smoking gun in the dump from Process Monitor yourself, though, as I will most likely not have time to work on this in the foreseeable future.

@WizardCM
Copy link

@dscho nothing stood out, unfortunately. It just sits there, tried multiple different versions - even via Chocolatey. No such luck :(

@dscho
Copy link
Member

dscho commented Aug 27, 2018

nothing stood out, unfortunately

:-(

It did seem to me that that mkdir or that chmod in the post-install/ scripts was responsible for those hangs whenever they were reported and we got close to identifying the root cause.

The real funny thing is that these commands are totally pointless, as they try to make something writable in C:\Program Files which is not something you want to do. And Git seems to work fine without write access to those directories. So I guess that the real fix would be to delete those parts of /etc/post-install/01-devices.post...

@dscho
Copy link
Member

dscho commented Aug 27, 2018

Okay, people, I could really use your help here... I am too swamped with work leading up to Git for Windows v2.19.0, and I will be taking a much needed vacation even before that Git v2.19.0 is expected to be released (my colleagues will help me out here), so I really won't be able to take care of implementing this fix and testing it.

Hopefully somebody here has the time and the need to fix it!

This is how I suggest going about it:

Install Git for Windows' SDK

This is as easy as downloading the SDK installer and running it.

Note: it will download a few hundred megabytes and occupy a little more than a gigabyte on disk, IIRC. I have not found any way to make that less heavy.

Verify that you can build an installer

This is as easy as running sdk build git-and-installer in the Git SDK Bash

Patch the git-extra post-install script to remove /etc/post-install/01-devices.post

Git for Windows' SDK is a modified MSYS2. As MSYS2 lacks a couple of configuration knobs we really want to have, we make those changes by editing the files that MSYS2 overwrites with updates. Meaning: these changes have to be made every time we update Pacman packages, as MSYS2 might have undone some of our changes.

Therefore, these changes are made as part of installing our git-extra package. More precisely, these changes are made via shell-scripting in the post-install shell script function in git-extra.install, which we generate from git-extra-install.in.

So this is how to do it: first, change the working directory to the one of the git-extra project: sdk cd git-extra. Then,

  • add the line rm -f /etc/post-install/01-devices.post at the end of the post_install function in git-extra.install.in,
  • build the package with mingw-makepkg -s, and
  • install it with pacman -U <file> where <file> is the generated git-extra...tar.xz package.

After that, observe that the file /etc/post-install/01-devices.post is missing.

Then, build another installer using sdk build git-and-installer.

This might result in an error due to the missing file (in which case, the make-file-list.sh script in /usr/src/build-extra/ will need to sprout an exclusion for that file, look at the existing lines for examples to imitate).

Then, test the installer. Hopefully it will not hang!

Please help!

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