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 2.5.1 (x64) Installer freezes at end of installation #351

Closed
docrinehart opened this issue Sep 3, 2015 · 17 comments
Closed

Git 2.5.1 (x64) Installer freezes at end of installation #351

docrinehart opened this issue Sep 3, 2015 · 17 comments

Comments

@docrinehart
Copy link

The installer seems to work fine until the end of the installation process. It simply stops doing anything. It isn't marked as "Not-Responding" by task manager, and shows nothing but a non-changing memory usage. I'm attempting to install from 2.4.6 RC5 on a Windows 10 VM in Parallels. My system is a MacBook Pro Retina running Yosemite 10.10.5.

screenshot

screenshot

@dscho
Copy link
Member

dscho commented Sep 3, 2015

Do you have a C:\Program Files\Git\usr\bin\git.exe perchance?

@dscho
Copy link
Member

dscho commented Sep 3, 2015

Oh, and could you run Sysinternals' Process Monitor to find out which executable is waiting?

@docrinehart
Copy link
Author

I don't have a git.exe at that path... And I'll give it a shot later if I get a chance to look at that process monitor. After a force quit, it seems to work fine from the command line and source tree. Source Tree also sees it as the proper version.

@dscho
Copy link
Member

dscho commented Sep 3, 2015

Still, the installation did not finish, so I would not be surprised if a subset of the functionality does not work. Now that it is force-quit, it is hard to do a live analysis anyway, so can you reinstall and see whether it hangs again?

@docrinehart
Copy link
Author

I'll try as soon as I have a chance.

@dscho
Copy link
Member

dscho commented Sep 6, 2015

No dice yet, eh?

@cbo100
Copy link

cbo100 commented Sep 8, 2015

I just had this problem.

Poked around in procmon for a while with the hung install running.

Observations:

  • Two Git-2.5.1-*.ex running
  • Two Git-2.5.1-*.tmp running
  • ssh-agent running
  • ssh-add running
  • No events from any of these processes were being generated in procmon.
  • Killed ssh-agent did nothing
  • Killed ssh-add caused the installer to continue, giving me the "finish" screen.

I seem to be left with a working installation. But not a git.exe in C:\Program Files\Git\usr\bin\

Some info:

  • Previous install was a 1.9 in Program Files (x86)\Git
  • This install was 2.5.1 64 bit in Program Files\Git
  • There is a git.exe in C:\Program Files\Git\bin\

More observations:

  • While writing this up I tried reinstalling 2.5.1 again
  • Hung again
  • This time, I see the last event related to the installer is ssh-add reading/closing my .ssh/id_rsa
  • Then nothing. Again kill ssh-add and installer "finishes"

Hunch

  • My existing id_rsa is passphrase protected. Could it be prompting me for my passphrase on some hidden console?

@cbo100
Copy link

cbo100 commented Sep 8, 2015

I think I confirmed my hunch.

Just tried another reinstall after moving my id_rsa, finished without a hitch.

My .bashrc has a line which sources a load-ssh-agent script that runs my ssh-adds. I guess that's it.

The old (1.x) installer never hung on this though.

I guess this PR is the change:

git-for-windows/build-extra#52

Is a quick flash of a tty that bad if it would prevent this (assuming the tty that flashed up would be interactive and accept my passphrase).

@dscho
Copy link
Member

dscho commented Sep 8, 2015

Ah, the crucial bit is probably a custom $HOME/.bash_profile or $HOME/.profile that calls ssh-agent?

@cbo100
Copy link

cbo100 commented Sep 8, 2015

Yeah, that seems to be it, combined with the ssh key being passphrase protected.

Maybe these post install scripts could run on first run of the Git Bash prompt rather than during the installer?

@dscho
Copy link
Member

dscho commented Sep 9, 2015

Maybe these post install scripts could run on first run of the Git Bash prompt rather than during the installer?

No, that was exactly the problem we tried to solve.

I guess we will have to try to redirect stdin when running the initial Bash session.

@cbo100 I would really appreciate if you could test the following (I am really busy juggling three other bugs right now):

  1. download and install the Git for Windows SDK
  2. make an installer
  3. edit this line by inserting a </dev/null after the -c exit
  4. make another installer
  5. test that installer

That would really be helpful.

@docrinehart
Copy link
Author

Sorry for the delay. I was out of town this weekend, and been playing catch-up for a couple days. I'll give that a shot as well this afternoon.

@docrinehart
Copy link
Author

Forgive my unfamiliarity with the scripting language, but that should be part of the arguments like so, right?

if not Exec(Cmd, '--login -c exit </dev/null', AppDir, SW_HIDE, ewWaitUntilTerminated, i) then begin

It builds and runs, but hangs at the same place. I can try again if I inserted that incorrectly.

@dscho
Copy link
Member

dscho commented Sep 9, 2015

@docrinehart yep, that was the change I thought might help. Pity it does not... :-(

@dscho dscho added enhancement and removed unclear labels Sep 9, 2015
@dscho
Copy link
Member

dscho commented Sep 10, 2015

Maybe these post install scripts could run on first run of the Git Bash prompt rather than during the installer?

No, that was exactly the problem we tried to solve.

To be precise: the first run by the Bash needs to execute certain post-install steps. One of those steps is to create special "device" files (they are specific to MSys2, i.e. they cannot be (un)packed by the installer). Of course, these files have to be written with administrator privileges. So this step needs to be done as part of the installer, delaying it to the first time the user starts a Git Bash will not work, like, at all.

@docrinehart
Copy link
Author

You know... I ran it as an Admin user, but I did NOT "Run as Admin". I wonder if that has anything to do with it? (Will try today)

@dscho
Copy link
Member

dscho commented Sep 10, 2015

You know... I ran it as an Admin user, but I did NOT "Run as Admin". I wonder if that has anything to do with it? (Will try today)

No. What I was saying is that your suggestion to wait with running the initial Bash session until the user starts a Git Bash won't work.

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

3 participants