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 bash opens invisible window owned by system that blocks all foreground windows on Windows 11 multi-session. #4945

Open
1 task
bwhitley76 opened this issue May 10, 2024 · 6 comments

Comments

@bwhitley76
Copy link

  • 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?
$ git --version --build-options

** git version 2.45.0.windows.1
cpu: x86_64
built from commit: b5d0511969ccd9ab86395c37e5a7619d8b4e7c32
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.22631.3447] -- Multi-session **
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
> type "$env:USERPROFILE\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

** Editor Option: VIM
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: Merge
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?

** This bug only reproduces on Windows Multi-session images in Azure **

Details

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

** Bash **

** "C:\Program Files\Git\git-bash.exe" --cd-to-home **
  • What did you expect to occur after running these commands?

** Expected bash to work properly without invisible conhost.exe window from preventing the use of bash **

  • What actually happened instead?

** conhost.exe process launches with bash.exe as an invisible window and prevents users from interacting with bash window **

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

** insert URL here **

@bwhitley76
Copy link
Author

I have the outputs of a user mode debug of this issue. Conhost.exe is the foregroud app with keyboard/mouse hooks but has no active/focused window. Conhost.exe was launched by cygwin-console-helper which is no longer running.

// Git-Bash uses MinTTY, which in turn invokes Cygwin-Console-Helper, responsible for initiating the conhost process.

// Please note that Cygwin-Console-Helper has already terminated and has no active threads.

// This indicates that there is no process waiting for conhost.exe to terminate. However, we lack insight into how they invoked conhost without access to the source code of that process.

@dscho
Copy link
Member

dscho commented May 10, 2024

** This bug only reproduces on Windows Multi-session images in Azure **

Could you provide a clear and concise set of steps how to reproduce?

@bwhitley76
Copy link
Author

** This bug only reproduces on Windows Multi-session images in Azure **

Could you provide a clear and concise set of steps how to reproduce?

  1. Deploy Windows 11 Enterprise multi-session, version 23H2 - Gen2 image in Azure
  2. Download Git-2.25.0-64-bit from https://gitforwindows.org
  3. Install git for windows with all default settings.
  4. Launch Git Bash by running "C:\Program Files\Git\git-bash.exe" --cd-to-home
  5. Try to type or use the bash console window. The bash console window is unusable due to an invisible conhost.exe window that is covering the bash console window.
  6. Use Process Explorer to see the conhost.exe process that was called.
  7. Kill conhost.exe to clear the problem state and the bash window is now usable.

@dscho
Copy link
Member

dscho commented May 10, 2024

@bwhitley76 thank you!

Does this also reproduce with a regular MSYS2, or even with a MinTTY of a regular Cygwin installation?

@bwhitley76
Copy link
Author

Thanks @dscho , I have not tried MSYS2 or Cygwin installs. I'll see if it reproduces via these install methods early next week.

@coderextreme
Copy link

When I type "Git For Windows" from the Windows 10 Search (lower left corner) a window launches then quickly disappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants