Skip to content

Cygwin doesn't work with Git Bash but does with Windows Shell #3728

Closed
@embcla

Description

@embcla
  • I was not able to find an open or closed issue matching what I'm seeing

I am installing a new Win11 laptop, and what I see is that I can't get Git Bash to cooperate with Cygwin.
I installed both as 64bit versions.

Cygwin commands (in this bug exemplified by Python3.9) run fine in windows shell, but cause a heap mismatch in Git Bash.
See attached screenshot.
image

I really tried everything I could before opening this, but can't really figure this one out.
Previously I used Cygwin32, but it doesn't seem to be available anymore.
Disabled ASLR but made no difference.
Made sure there is only 1 cygwin1.dll on path.
Reinstalled multiple times but still have the same issue.
I think it's Git Bash because everything else works from Windows, so I believe that Git Bash is mangling some linker code and causing this issue.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.35.1.windows.2
cpu: x86_64
built from commit: 5437f0fd368c7faf1a0b5e1fef048232c1f2a3e6
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
  • 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 10.0.22000.556]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
> type "C:\Program Files\Git\etc\install-options.txt"

Editor Option: VisualStudioCode
Custom Editor Path:
Default Branch Option:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Rebase
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
Enable FSMonitor: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Not sure

Details

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

Git Bash

python3.9
  • What did you expect to occur after running these commands?

That I'd get into the python interpreter

  • What actually happened instead?

Segfault

$ python3.9
      0 [main] python3.9 (22568) C:\cygwin64\bin\python3.9.exe: *** fatal error - cygheap base mismatch detected - 0x180349408/0x180346408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions