public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Resizing window while showing git log locks up Command Line
@ 2022-12-21 16:07 Gregory Mason
  2022-12-21 21:30 ` Adam Dinwoodie
  0 siblings, 1 reply; 4+ messages in thread
From: Gregory Mason @ 2022-12-21 16:07 UTC (permalink / raw)
  To: cygwin

Hello Cygwin volunteers,

I was asked to forward this bug report from the git-for-windows bug report: https://github.com/git-for-windows/git/issues/4060
Original bug report from garretwilson

> Find a Git repository with a long commit history.
> Enter `git log` 
> Git will show the log history and wait for you to page through the history or hit q to exit.
> Press Win+Left-Arrow to snap the window to the left side of the screen.
> The window is now hung. Nothing can be typed to get it un-hung. Typing q does nothing. Typing Ctrl+C does nothing. Typing <Enter> does nothing. > The only way out of this is to close the terminal window and start a new Command Prompt or PowerShell session.
>
> I've reproduced this with Command Line and with PowerShell 7.2.6.

I am also experiencing this issue with the following setup:
CYGWIN_NT-10.0-19044 version 3.4.3-1.x86_64 (runneradmin@fv-az479-541) (gcc version 11.3.0 (GCC) ) 2022-12-16 12:38 UTC

Windows 10
Version	21H2
Installed on	?7/?11/?2022
OS build	19044.2251
Experience	Windows Feature Experience Pack 120.2212.4180.0

If you need further information, please let me know.

Thank you

Gregory Mason


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Resizing window while showing git log locks up Command Line
  2022-12-21 16:07 Resizing window while showing git log locks up Command Line Gregory Mason
@ 2022-12-21 21:30 ` Adam Dinwoodie
  2022-12-22  9:17   ` Takashi Yano
  0 siblings, 1 reply; 4+ messages in thread
From: Adam Dinwoodie @ 2022-12-21 21:30 UTC (permalink / raw)
  To: cygwin

On Wed, 21 Dec 2022 at 16:08, Gregory Mason via Cygwin wrote:
>
> Hello Cygwin volunteers,
>
> I was asked to forward this bug report from the git-for-windows bug report: https://github.com/git-for-windows/git/issues/4060
> Original bug report from garretwilson
>
> > Find a Git repository with a long commit history.
> > Enter `git log`
> > Git will show the log history and wait for you to page through the history or hit q to exit.
> > Press Win+Left-Arrow to snap the window to the left side of the screen.
> > The window is now hung. Nothing can be typed to get it un-hung. Typing q does nothing. Typing Ctrl+C does nothing. Typing <Enter> does nothing. > The only way out of this is to close the terminal window and start a new Command Prompt or PowerShell session.
> >
> > I've reproduced this with Command Line and with PowerShell 7.2.6.
>
> I am also experiencing this issue with the following setup:
> CYGWIN_NT-10.0-19044 version 3.4.3-1.x86_64 (runneradmin@fv-az479-541) (gcc version 11.3.0 (GCC) ) 2022-12-16 12:38 UTC
>
> Windows 10
> Version 21H2
> Installed on    ?7/?11/?2022
> OS build        19044.2251
> Experience      Windows Feature Experience Pack 120.2212.4180.0
>
> If you need further information, please let me know.

This looks like it's an issue with less, which will be the pager that
Git is using. I've just verified I can reproduce it by running
`C:\cygwin64\bin\less.exe C:\cygwin64\var\log\setup.log` from within a
PowerShell terminal, then resizing the terminal; it doesn't need to be
a "snap" to trigger the behaviour.

Somewhat to my surprise, `more` and `vim` don't exhibit this behaviour.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Resizing window while showing git log locks up Command Line
  2022-12-21 21:30 ` Adam Dinwoodie
@ 2022-12-22  9:17   ` Takashi Yano
  2022-12-22 13:54     ` Takashi Yano
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Yano @ 2022-12-22  9:17 UTC (permalink / raw)
  To: cygwin; +Cc: Adam Dinwoodie

On Wed, 21 Dec 2022 21:30:35 +0000
Adam Dinwoodie wrote:
> On Wed, 21 Dec 2022 at 16:08, Gregory Mason via Cygwin wrote:
> >
> > Hello Cygwin volunteers,
> >
> > I was asked to forward this bug report from the git-for-windows bug report: https://github.com/git-for-windows/git/issues/4060
> > Original bug report from garretwilson
> >
> > > Find a Git repository with a long commit history.
> > > Enter `git log`
> > > Git will show the log history and wait for you to page through the history or hit q to exit.
> > > Press Win+Left-Arrow to snap the window to the left side of the screen.
> > > The window is now hung. Nothing can be typed to get it un-hung. Typing q does nothing. Typing Ctrl+C does nothing. Typing <Enter> does nothing. > The only way out of this is to close the terminal window and start a new Command Prompt or PowerShell session.
> > >
> > > I've reproduced this with Command Line and with PowerShell 7.2.6.
> >
> > I am also experiencing this issue with the following setup:
> > CYGWIN_NT-10.0-19044 version 3.4.3-1.x86_64 (runneradmin@fv-az479-541) (gcc version 11.3.0 (GCC) ) 2022-12-16 12:38 UTC
> >
> > Windows 10
> > Version 21H2
> > Installed on    ?7/?11/?2022
> > OS build        19044.2251
> > Experience      Windows Feature Experience Pack 120.2212.4180.0
> >
> > If you need further information, please let me know.
> 
> This looks like it's an issue with less, which will be the pager that
> Git is using. I've just verified I can reproduce it by running
> `C:\cygwin64\bin\less.exe C:\cygwin64\var\log\setup.log` from within a
> PowerShell terminal, then resizing the terminal; it doesn't need to be
> a "snap" to trigger the behaviour.
> 
> Somewhat to my surprise, `more` and `vim` don't exhibit this behaviour.

Thanks for the report. I looked into this problem, and found
the cause. less uses longjmp in signal handler, and if signal
handler is called while cygwin acquiring the mutex, the mutex
will not be released. This causes deadlock.

I will submit a patch for this issue shortly.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Resizing window while showing git log locks up Command Line
  2022-12-22  9:17   ` Takashi Yano
@ 2022-12-22 13:54     ` Takashi Yano
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Yano @ 2022-12-22 13:54 UTC (permalink / raw)
  To: cygwin

On Thu, 22 Dec 2022 18:17:28 +0900
Takashi Yano wrote:
> On Wed, 21 Dec 2022 21:30:35 +0000
> Adam Dinwoodie wrote:
> > On Wed, 21 Dec 2022 at 16:08, Gregory Mason via Cygwin wrote:
> > >
> > > Hello Cygwin volunteers,
> > >
> > > I was asked to forward this bug report from the git-for-windows bug report: https://github.com/git-for-windows/git/issues/4060
> > > Original bug report from garretwilson
> > >
> > > > Find a Git repository with a long commit history.
> > > > Enter `git log`
> > > > Git will show the log history and wait for you to page through the history or hit q to exit.
> > > > Press Win+Left-Arrow to snap the window to the left side of the screen.
> > > > The window is now hung. Nothing can be typed to get it un-hung. Typing q does nothing. Typing Ctrl+C does nothing. Typing <Enter> does nothing. > The only way out of this is to close the terminal window and start a new Command Prompt or PowerShell session.
> > > >
> > > > I've reproduced this with Command Line and with PowerShell 7.2.6.
> > >
> > > I am also experiencing this issue with the following setup:
> > > CYGWIN_NT-10.0-19044 version 3.4.3-1.x86_64 (runneradmin@fv-az479-541) (gcc version 11.3.0 (GCC) ) 2022-12-16 12:38 UTC
> > >
> > > Windows 10
> > > Version 21H2
> > > Installed on    ?7/?11/?2022
> > > OS build        19044.2251
> > > Experience      Windows Feature Experience Pack 120.2212.4180.0
> > >
> > > If you need further information, please let me know.
> > 
> > This looks like it's an issue with less, which will be the pager that
> > Git is using. I've just verified I can reproduce it by running
> > `C:\cygwin64\bin\less.exe C:\cygwin64\var\log\setup.log` from within a
> > PowerShell terminal, then resizing the terminal; it doesn't need to be
> > a "snap" to trigger the behaviour.
> > 
> > Somewhat to my surprise, `more` and `vim` don't exhibit this behaviour.
> 
> Thanks for the report. I looked into this problem, and found
> the cause. less uses longjmp in signal handler, and if signal
> handler is called while cygwin acquiring the mutex, the mutex
> will not be released. This causes deadlock.
> 
> I will submit a patch for this issue shortly.

Now test release with this patch is ready.
Please test cygwin 3.5.0-0.63.gf6e4e98d3071 (Test).

https://cygwin.com/faq.html#faq.setup.testrels

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-22 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21 16:07 Resizing window while showing git log locks up Command Line Gregory Mason
2022-12-21 21:30 ` Adam Dinwoodie
2022-12-22  9:17   ` Takashi Yano
2022-12-22 13:54     ` Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).