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

grep which shipped with git crashes when i use options F and i together #2434

Closed
1 task done
NTMan opened this issue Dec 16, 2019 · 4 comments
Closed
1 task done

grep which shipped with git crashes when i use options F and i together #2434

NTMan opened this issue Dec 16, 2019 · 4 comments

Comments

@NTMan
Copy link

NTMan commented Dec 16, 2019

  • 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? Is it 32-bit or 64-bit?
C:\git\crm.test\core>git --version --build-options
git version 2.24.1.windows.2
cpu: x86_64
built from commit: 992f0773022527b1b0cb1e0c13aec97dd5248053
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
C:\git\crm.test\core>cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
C:\git\crm.test\core>type "C:\Program Files\Git\etc\install-options.txt"
Editor Option: Notepad++
Custom Editor Path:
Path Option: CmdTools
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled

C:\git\crm.test\core>cat /etc/install-options.txt
Editor Option: Notepad++
Custom Editor Path:
Path Option: CmdTools
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: ConHost
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled

Details

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

CMD

C:\git\crm.test\core>"C:\Program Files\Git\usr\bin\grep.exe" -Fi -- leadsDetailsCausesComplete
      0 [main] grep 1995 cygwin_exception::open_stackdumpfile: Dumping stack trace to grep.exe.stackdump
  • What did you expect to occur after running these commands?

grep result

  • What actually happened instead?

grep is crashes

grep.exe.stackdump.zip

image

@dscho
Copy link
Member

dscho commented Dec 16, 2019

We do not actually custom-build grep, we use the grep package from the MSYS2 project. Maybe report it there (i.e. at https://github.com/msys2/MSYS2-packages/issues/new)?

@dscho
Copy link
Member

dscho commented Dec 16, 2019

Oh, I think I know what it is. MSYS2's executables are not meant to be called from CMD, they are meant to be called from MSYS2's Bash, more specifically: after /etc/profile had a chance to run.

So it is no wonder that in your use case, LC_ALL is not set, and it would appear that this triggers a code path that crashes.

You can easily fix this on your side by calling set LC_ALL=C.UTF-8 first.

@dscho
Copy link
Member

dscho commented Dec 17, 2019

Since

  1. you have a work-around,
  2. you now know which bug tracker would be more appropriate for this bug, and
  3. you don't answer me,

I will close this ticket.

@dscho dscho closed this as completed Dec 17, 2019
@NTMan
Copy link
Author

NTMan commented Dec 19, 2019

you have a work-around,

Unfortunately work-around not worked. Yes, it solves the issue with crashes but for now grep.exe hangs when I apply set LC_ALL=C.UTF-8 to CMD or launch from bash.

image
In this window with grep.exe running, nothing has been happening for a day.

The previous version didn't have this issue.

Anyway thanks for respond.

PhilipOakley added a commit to PhilipOakley/git that referenced this issue Oct 21, 2021
Test whether the Git CI system allows, or fails, when LLP64 systems
need variable type coercion from size_t back to unsigned long.

All the *nix systems should pass, but compile checks for LLP64 systems
may fail. This is a crucial information spike for Git files > 4Gb,
i.e. Issues: git-lfs git-for-windows#2434, GfW git-for-windows#2179, git-for-windows#1848, git-for-windows#3306.

Signed-off-by: Philip Oakley <[email protected]>
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

2 participants