Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Takashi Yano
On Fri, 18 Mar 2022 15:04:31 +0200 Orgad Shaneh wrote: > On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano wrote: > > Thanks. I can reproduce the issue. I think I found the cause. > > The two unexpected things happen. > > > > (1) wVirtualKeyCode and wVirtualScanCode of readback key event may > > be

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Orgad Shaneh
On Fri, Mar 18, 2022 at 2:15 PM Takashi Yano wrote: > > On Fri, 18 Mar 2022 13:21:00 +0200 > Orgad Shaneh wrote: > > > Git for Windows > > > > Were you able to reproduce? > > > > I found an easier way to reproduce, which works almost every time. > > > > It still happens only on Git Bash, and not o

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Takashi Yano
On Fri, 18 Mar 2022 13:21:00 +0200 Orgad Shaneh wrote: > > Git for Windows > > Were you able to reproduce? > > I found an easier way to reproduce, which works almost every time. > > It still happens only on Git Bash, and not on MSYS2 MINGW64, although > I use the same dll in both. I have no idea

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-18 Thread Orgad Shaneh
On Fri, Mar 18, 2022 at 8:32 AM Orgad Shaneh wrote: > > On Fri, Mar 18, 2022, 8:31 AM Takashi Yano wrote: >> >> On Fri, 18 Mar 2022 07:57:27 +0200 >> Orgad Shaneh wrote: >> > I'm using the dll that was built here: >> > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 >> >

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Orgad Shaneh
On Fri, Mar 18, 2022, 8:31 AM Takashi Yano wrote: > On Fri, 18 Mar 2022 07:57:27 +0200 > Orgad Shaneh wrote: > > I'm using the dll that was built here: > > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 > > for my PR: https://github.com/git-for-windows/msys2-runtime/pull

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Takashi Yano
On Fri, 18 Mar 2022 07:57:27 +0200 Orgad Shaneh wrote: > I'm using the dll that was built here: > https://github.com/git-for-windows/msys2-runtime/actions/runs/218081 > for my PR: https://github.com/git-for-windows/msys2-runtime/pull/43 > > I can reproduce in msys2-runtime repo, but it's quite

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread n952162
On 3/17/22 19:40, Orgad Shaneh wrote: On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano wrote: I looked into this problem and found the cause. This seems to be due to a bug of fsync(). Cygwin's fsync() flushes the console input buffer unlike linux. I will propose a patch for this issue. -- Takash

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Orgad Shaneh
On Fri, Mar 18, 2022 at 7:22 AM Takashi Yano wrote: > > On Fri, 18 Mar 2022 13:23:35 +0900 > Takashi Yano wrote: > > > On Thu, 17 Mar 2022 20:40:15 +0200 > > Orgad Shaneh wrote: > > > On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano > > > wrote: > > > > I looked into this problem and found the cau

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Takashi Yano
On Fri, 18 Mar 2022 13:23:35 +0900 Takashi Yano wrote: > On Thu, 17 Mar 2022 20:40:15 +0200 > Orgad Shaneh wrote: > > On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano > > wrote: > > > I looked into this problem and found the cause. > > > This seems to be due to a bug of fsync(). Cygwin's fsync() >

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Takashi Yano
On Thu, 17 Mar 2022 20:40:15 +0200 Orgad Shaneh wrote: > On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano > wrote: > > I looked into this problem and found the cause. > > This seems to be due to a bug of fsync(). Cygwin's fsync() > > flushes the console input buffer unlike linux. > > > > I will prop

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-17 Thread Orgad Shaneh
On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano wrote: > I looked into this problem and found the cause. > This seems to be due to a bug of fsync(). Cygwin's fsync() > flushes the console input buffer unlike linux. > > I will propose a patch for this issue. > > -- > Takashi Yano Thank you very muc

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-11 Thread Takashi Yano
On Thu, 10 Mar 2022 15:17:03 +0200 Orgad Shaneh wrote: > After using it on more scenarios (3.3 branch), I see have strange problems. > > For example, if I run git log -1 and immediately type, my input is > lost until the prompt appears again. > > It doesn't happen with other commands like git sta

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-10 Thread Orgad Shaneh
On Thu, Mar 3, 2022 at 2:02 AM Takashi Yano wrote: > > On Wed, 2 Mar 2022 22:13:30 +0200 > Orgad Shaneh wrote: > > On Wed, Mar 2, 2022 at 1:13 AM Takashi Yano > > wrote: > > > > > > Hi Orgad, > > > > > > On Sun, 27 Feb 2022 23:53:03 +0900 > > > Takashi Yano wrote: > > > > On Sun, 27 Feb 2022 16:

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-02 Thread Orgad Shaneh
On Thu, Mar 3, 2022, 2:02 AM Takashi Yano wrote: > On Wed, 2 Mar 2022 22:13:30 +0200 > Orgad Shaneh wrote: > > On Wed, Mar 2, 2022 at 1:13 AM Takashi Yano > wrote: > > > > > > > Now, new developer snapshot is ready: https://cygwin.com/snapshots/ > > > Please try. > > > > Tested. Looks much bette

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-02 Thread Takashi Yano
On Wed, 02 Mar 2022 12:28:47 -0800 "Kaz Kylheku wrote: > On 2022-02-27 06:53, Takashi Yano wrote: > > I think this is due to a bug which I recently fixed. > > https://cygwin.com/pipermail/cygwin-patches/2022q1/011791.html > > Was that upstreamed? Sorry to be a pain, but something in the > log mess

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-02 Thread Takashi Yano
On Wed, 2 Mar 2022 22:13:30 +0200 Orgad Shaneh wrote: > On Wed, Mar 2, 2022 at 1:13 AM Takashi Yano wrote: > > > > Hi Orgad, > > > > On Sun, 27 Feb 2022 23:53:03 +0900 > > Takashi Yano wrote: > > > On Sun, 27 Feb 2022 16:39:24 +0200 > > > Orgad Shaneh wrote: > > > > Hi, > > > > > > > > I'm using c

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-02 Thread Kaz Kylheku (Cygwin)
On 2022-02-27 06:53, Takashi Yano wrote: I think this is due to a bug which I recently fixed. https://cygwin.com/pipermail/cygwin-patches/2022q1/011791.html Was that upstreamed? Sorry to be a pain, but something in the log message about the cause and the fix (not just the manifested issue being

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-02 Thread Orgad Shaneh
On Wed, Mar 2, 2022 at 1:13 AM Takashi Yano wrote: > > Hi Orgad, > > On Sun, 27 Feb 2022 23:53:03 +0900 > Takashi Yano wrote: > > On Sun, 27 Feb 2022 16:39:24 +0200 > > Orgad Shaneh wrote: > > > Hi, > > > > > > I'm using cygwin runtime 3.3.4-2. > > > > > > When a foreground job is running, and the

Re: Typed characters are mis-ordered when CPU usage is high

2022-03-01 Thread Takashi Yano
Hi Orgad, On Sun, 27 Feb 2022 23:53:03 +0900 Takashi Yano wrote: > On Sun, 27 Feb 2022 16:39:24 +0200 > Orgad Shaneh wrote: > > Hi, > > > > I'm using cygwin runtime 3.3.4-2. > > > > When a foreground job is running, and the general CPU usage of the > > machine is high, characters are mis-ordered

Re: Typed characters are mis-ordered when CPU usage is high

2022-02-27 Thread Takashi Yano
On Sun, 27 Feb 2022 16:39:24 +0200 Orgad Shaneh wrote: > Hi, > > I'm using cygwin runtime 3.3.4-2. > > When a foreground job is running, and the general CPU usage of the > machine is high, characters are mis-ordered. > > To reproduce, I use this script to produce load: > #!/bin/sh > > for i in

Typed characters are mis-ordered when CPU usage is high

2022-02-27 Thread Orgad Shaneh
Hi, I'm using cygwin runtime 3.3.4-2. When a foreground job is running, and the general CPU usage of the machine is high, characters are mis-ordered. To reproduce, I use this script to produce load: #!/bin/sh for i in $(seq $(nproc)); do while true; do :; done & done wait Run it in the backg