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 878BE388451F Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com 22I5MW2D009030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1647580952; bh=tc3Yjb62y1+HH2mWm1t0t8jsLBEYnINAgaq9gZ7F5bY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tmejWMeftXxPBAaI9ApUvZAJk5Ys41SkzXBjp778yJvkOf01s22bQN/VcceQv6qe+ DtQNzXhGjUcHZZ69fEV3Xk1NnP+ytpJ/HtlMmmARWOR9qHqPiuEGV4Yhtnz56uN3B0 TJfYuNq9Xj4gxCW3rsU2hfubGz1JBklSW+2eMX6b7O5DA6nTkIHxI4QCaWG/Kg2NL8 9aFiEpsP1kpwDSz0rgsJlsQSTAiEtIszCvpYDqFyOiAGepCYPCpi8ur3hxGdrL6E9n YotRqhnpJez8mSPy8ecl2RP0tHYhCyMu/2F5Dt57ExA9tOXG38M/DVXgkNS8/K0HiZ G6JuQwkbk3SpA== X-Nifty-SrcIP: [119.150.36.16] Date: Fri, 18 Mar 2022 14:22:43 +0900 From: Takashi Yano To: cygwin AT cygwin DOT com Subject: Re: Typed characters are mis-ordered when CPU usage is high Message-Id: <20220318142243.1751c742ebaae47e8fba9b47@nifty.ne.jp> In-Reply-To: <20220318132335.d5635fe9fc782ed53bddf7bc@nifty.ne.jp> References: <20220227235303 DOT 5d6239724ed83b145772134b AT nifty DOT ne DOT jp> <20220302081259 DOT 2a7e522ef1a9e3e6da0aa259 AT nifty DOT ne DOT jp> <20220303090208 DOT 4a04e35756b7868fe9b4701d AT nifty DOT ne DOT jp> <20220312063625 DOT 9ca3d42d4e2e941a13fa7909 AT nifty DOT ne DOT jp> <20220318132335 DOT d5635fe9fc782ed53bddf7bc AT nifty DOT ne DOT jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Orgad Shaneh Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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() > > > flushes the console input buffer unlike linux. > > > > > > I will propose a patch for this issue. > > > > > > -- > > > Takashi Yano > > > > 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. -- Takashi Yano -- 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