delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/03/18/01:57:58

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 05D37388451F
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=jSrOb7is3tzfW8yC7l9EHB7kc2TRUJ0IdRYNcUSPTwE=;
b=TPAEeobFsyqMOnO6QBeZkQJJA08dTotSJ1KPuuxssKWG9ick2Ei6StyJwyqebB3p+E
mCnTCulfcINuS+xqrg3G+nrbIiaRsg8vgMDSjpzwRco3/g0M2bNh2eUD/2rYCzHjXO7V
ZpAfrVknbXazSu6CmPW5a3cexUQpkxF2oVsaRU+XvcoYDmkB0tHiPKHGNcwt0TmvIr3c
1XfQNV2QlCEzHsc8vYx1XDU9dnhebeDbnZp164mZR2a9JMxUd1HEnhaQSHN1RPewOtO0
zzTH+6OdtZQSMlwNliWFnYofPo+5L64B/waoZK8wfxCsmJ+EBa7KBzZHV2tZBZiA4hy4
0HNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=jSrOb7is3tzfW8yC7l9EHB7kc2TRUJ0IdRYNcUSPTwE=;
b=OtHA5u23rPMK5V7xKPYgxgaig/FyUiStQU4WeeGz7KWQH8TTi5oPocPhqhG/R5YXhH
BWi8pxcp4Ls0tYWeaxLNGxx7Kn3l9C8tGDKrvf+rVV6CtSl1WlCGYCinnvh8YEezdXdj
R+UTwBxvLaI8QD1L3NwJsTc26bLzzLisKv5CNyFreKR+WUTtV++CAjvtqnYUGppCN2av
1T6PeXdYINSi7O8aHhT7v5/UdVMrGGQeT26OobUC/ZEt5Tc9/11dzxD2SooU4x918aih
lo9zZ9k72sJAw2qHG824X8Dy+mZ6suuwQ+OdSmIb0+dkjuv26pJve9u5BfSbbqva/Sm7
95ug==
X-Gm-Message-State: AOAM533VvTCISf7/GmmOaVVGav5oaFMXEr23dx9TZq4rgoqlwn70vw93
fGFumRawvVRbWrR0eGmCJxCqdFShpsBQUPXFeAA=
X-Google-Smtp-Source: ABdhPJw5Col6fCQmOceE4PltVvsJQ54vNlMhGjLaghRjg/XKs6XI/3hy4NhkLedP0qNV7W1Itk9hYJShV3GUOAiG7js=
X-Received: by 2002:a05:6602:2d82:b0:645:d4de:743d with SMTP id
k2-20020a0566022d8200b00645d4de743dmr3755928iow.123.1647583058141; Thu, 17
Mar 2022 22:57:38 -0700 (PDT)
MIME-Version: 1.0
References: <CAGHpTBKbqxWQ+WOc=UZH1a155gHhNc4ogVE0sP=rCw7q5xoNpQ AT mail DOT gmail DOT com>
<20220227235303 DOT 5d6239724ed83b145772134b AT nifty DOT ne DOT jp>
<20220302081259 DOT 2a7e522ef1a9e3e6da0aa259 AT nifty DOT ne DOT jp>
<CAGHpTBLc9waVzjKWb84C5KS+s9uKENrOMAxxfBBrvPR-zKKtPQ AT mail DOT gmail DOT com>
<20220303090208 DOT 4a04e35756b7868fe9b4701d AT nifty DOT ne DOT jp>
<CAGHpTBKU5XQJ6mjsvb94LnbJb5xj3uoRMtt3KgsMx1NjpM5hSg AT mail DOT gmail DOT com>
<20220312063625 DOT 9ca3d42d4e2e941a13fa7909 AT nifty DOT ne DOT jp>
<CAGHpTBLe0D9gQaK=4A91w5eravsygpWe001DhcB=hhrcLx6YWA AT mail DOT gmail DOT com>
<20220318132335 DOT d5635fe9fc782ed53bddf7bc AT nifty DOT ne DOT jp>
<20220318142243 DOT 1751c742ebaae47e8fba9b47 AT nifty DOT ne DOT jp>
In-Reply-To: <20220318142243.1751c742ebaae47e8fba9b47@nifty.ne.jp>
From: Orgad Shaneh <orgads AT gmail DOT com>
Date: Fri, 18 Mar 2022 07:57:27 +0200
Message-ID: <CAGHpTBLRzXpg77FjxT6OQPrC+12k1VYd-r-wNryEC0DZiYdQfw@mail.gmail.com>
Subject: Re: Typed characters are mis-ordered when CPU usage is high
To: Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp>
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Cc: cygwin AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Fri, Mar 18, 2022 at 7:22 AM Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> wrote:
>
> On Fri, 18 Mar 2022 13:23:35 +0900
> Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> wrote:
>
> > On Thu, 17 Mar 2022 20:40:15 +0200
> > Orgad Shaneh wrote:
> > > On Fri, Mar 11, 2022 at 11:36 PM Takashi Yano <takashi DOT yano AT nifty DOT ne DOT jp> 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 <takashi DOT yano AT nifty DOT ne DOT jp>
> > >
> > > Thank you very much. Looks better now.
> > >
> > > I'm sorry for nudging, but on msys2 I still get frequent mistypes when
> > > typing fast.
> > >
> > > I (still) don't have a consistent reproduction, but if I get it
> > > correctly, it looks like one or more characters I type right when the
> > > prompt appears show up before the buffered characters.
> > >
> > > For instance, I run git fetch, and while it is running I type git
> > > status, *sometimes* 1-2 characters "pop" to the left, so I get
> > > something like tgit satus.
> > >
> > > I wasn't able to reproduce it with cygwin, but on msys2 (with cygwin
> > > 3.3 branch merged in) it happens to me all the time :/
> >
> > Thansk for the report.
> >
> > I cloned the msys2-runtime repository from
> > https://github.com/msys2/msys2-runtime
> > and applied patches in cygwin-3_3-branch against msys2-3_3_4-release
> > branch. The patches applied are listed in cygwin-3_3-branch-merged.log
> > attached. A few patches, which are not actually in cygwin-3_3-branch,
> > are also applied just for avoiding conflict easily.
> >
> > However, I cannot reproduce your problem. Have you surely applied the
> > following patches especially important for this issue?
> >
> > Could you please also check if the code of cons_master_thread() in
> > fhandler_console.cc exactly matches with cons_master_thread.cc attached?
>
> I also tried merge-3.3 branch from
> https://github.com/orgads/msys2-runtime-1 (perhaps it's your repository),
> and confirmed it works without the issue. What is the difference?
>
> I tried the following steps.
>
> 1) Start cmd.exe (command prompt).
> 2) Run \msys64\usr\bin\bash -l
> 3) cd msys2-runtime
> 4) git fetch
> 5) Quickly type "git status" before the shell prompt is shown.
> 6) Repeat 4) and 5) many times.

I'm using the dll that was built here:
https://github.com/git-for-windows/msys2-runtime/actions/runs/2000018081
for my PR: https://github.com/git-for-windows/msys2-runtime/pull/43

I can reproduce in msys2-runtime repo, but it's quite hard. Try this:
1. git fetch
2. While it is running, write git and then very quickly type
ququququququququququququququququ until the prompt appears.

Sometimes you'll get q or u before git.

- Orgad

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019