threads / discuss / 41322

git 2.7.0 crashes when top-down memory allocation preference is set

Subject: git 2.7.0 crashes when top-down memory allocation preference is set

## tl;dr

7 messages between Feb 3, 2016 and Feb 11, 2016.

replies: 6people: 2as markdown or json

Klinger, Xia· Feb 3, 2016, 19:08 UTC · lore
When the memory allocation preference is set to be Top-down on Windows and there are more than 4GB memory available, git will crash. The symptom is "Segmentation Fault".
How to reproduce
1. Install latest Git package on Windows 7 x64
2. Enable top-down memory allocation preference
3. Open Git bash
4. Type git -version
5. You will see the error message
6. Disable the top-down memory allocation preference
7. Run the same experience
8. You will see all works as expected.

How to enable top-down memory allocation preference Add key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management\AllocationPreference Value : DWORD 0x00100000

Johannes Schindelin· Feb 4, 2016, 07:46 UTC · re: Klinger, Xia · lore

Re: git 2.7.0 crashes when top-down memory allocation preference is set

Hi,
On Wed, 3 Feb 2016, Klinger, Xia wrote:
> When the memory allocation preference is set to be Top-down on Windows
> and there are more than 4GB memory available, git will crash. The
> symptom is "Segmentation Fault".
This might be related to https://github.com/git-for-windows/git/issues/627

Do you have access to the Fast Track releases? If so, Windows 10 build 14257 was released to it and purportedly fixes these issues.

Ciao, Johannes

Klinger, Xia· Feb 4, 2016, 13:22 UTC · re: Johannes Schindelin · lore

RE: git 2.7.0 crashes when top-down memory allocation preference is set

Hi Johannes,
I am not sure the Fast Track release means. Do you refer to Windows 10 builds (updates)? I am running Windows 7 x64 and haven't gone to Windows 10.
Default memory allocation in Windows is bottom-up, which means the lowest addresses are consumed the first. This is all fine until the address is over 4GB on x64 OS with more than 4GB physical memories. Many applications don't handle it properly and will crash. Windows provides a registry key to force OS allocating memory from the highest address available first and going down the chain as a way to test application's memory management. That's what I did on my host to test our own software. And it affected Git 2.7.0.2 (latest build for Windows from 2/2/2016). 
I had to rollback to Git 1.8.4 to work around this problem. 1.8.4 is a 32-bit build not 64-bit build. That's why it worked so far.
Thanks
Xia
-----Original Message-----
From: Johannes Schindelin [mailto:Johannes.Schindelin@gmx.de] 
Sent: Thursday, February 04, 2016 2:46 AM
To: Klinger, Xia
Cc: git@vger.kernel.org
Subject: Re: git 2.7.0 crashes when top-down memory allocation preference is set
Hi,
On Wed, 3 Feb 2016, Klinger, Xia wrote:
> When the memory allocation preference is set to be Top-down on Windows 
> and there are more than 4GB memory available, git will crash. The 
> symptom is "Segmentation Fault".
This might be related to https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_git-2Dfor-2Dwindows_git_issues_627&d=CwIBAg&c=VCWpAYkS3z1bOCIxc-BPGZarCq9MRCAVxZJE051VqH8&r=67DEVp3lXDRlQoHC5xXHqK4qsTItx9yvwX98R_Hn9tg&m=jBFYZYDLdCLg-WMJPpbvl9rXn4syBv9RAGsbi106m3Y&s=MaQ04pu8kp8pdAOjVSd1PCqEwsYMpxpsFiqZ100gkrk&e= 

Do you have access to the Fast Track releases? If so, Windows 10 build 14257 was released to it and purportedly fixes these issues.

Ciao, Johannes

Johannes Schindelin· Feb 4, 2016, 15:29 UTC · re: Klinger, Xia · lore

RE: git 2.7.0 crashes when top-down memory allocation preference is set

Hi,
On Thu, 4 Feb 2016, Klinger, Xia wrote:
> I am not sure the Fast Track release means. Do you refer to Windows 10
> builds (updates)? I am running Windows 7 x64 and haven't gone to Windows
> 10.

The Fast Track release to which I referred is indeed Windows 10. In the meantime, I verified that the problem you described still exists on Windows 10, but has nothing to do with the issue 627 in Git for Windows' bug tracker.

Ciao, Johannes

Klinger, Xia· Feb 4, 2016, 16:27 UTC · re: Johannes Schindelin · lore

RE: git 2.7.0 crashes when top-down memory allocation preference is set

Thanks for confirming it. I hope a fix is available soon. I am using a very old version of Git at the moment to work around this issue, which doesn't comply to the requirement of our Stash Git Server from Atlassian.
Best regards,
Xia
-----Original Message-----
From: Johannes Schindelin [mailto:Johannes.Schindelin@gmx.de] 
Sent: Thursday, February 04, 2016 10:29 AM
To: Klinger, Xia
Cc: git@vger.kernel.org
Subject: RE: git 2.7.0 crashes when top-down memory allocation preference is set
Hi,
On Thu, 4 Feb 2016, Klinger, Xia wrote:
> I am not sure the Fast Track release means. Do you refer to Windows 10 
> builds (updates)? I am running Windows 7 x64 and haven't gone to 
> Windows 10.

The Fast Track release to which I referred is indeed Windows 10. In the meantime, I verified that the problem you described still exists on Windows 10, but has nothing to do with the issue 627 in Git for Windows' bug tracker.

Ciao, Johannes

Johannes Schindelin· Feb 4, 2016, 23:49 UTC · re: Klinger, Xia · lore

RE: git 2.7.0 crashes when top-down memory allocation preference is set

Hi,
On Thu, 4 Feb 2016, Klinger, Xia wrote:
> Thanks for confirming it. I hope a fix is available soon. I am using a
> very old version of Git at the moment to work around this issue, which
> doesn't comply to the requirement of our Stash Git Server from
> Atlassian.

If you would please stop top-posting? And yes, I worked on a fix for part of the day.

Ciao, Johannes

Johannes Schindelin· Feb 11, 2016, 13:30 UTC · re: Johannes Schindelin · lore

RE: git 2.7.0 crashes when top-down memory allocation preference is set

Hi,
On Fri, 5 Feb 2016, Johannes Schindelin wrote:
Show 8 quoted lines
> On Thu, 4 Feb 2016, Klinger, Xia wrote:
> 
> > Thanks for confirming it. I hope a fix is available soon. I am using a
> > very old version of Git at the moment to work around this issue, which
> > doesn't comply to the requirement of our Stash Git Server from
> > Atlassian.
> 
> [...] I worked on a fix for part of the day.

Judging from our past interaction, I would guess that you missed that 2.7.1 fixes this. Just wanted to let you know.

Ciao, Johannes

← back to recent threads