X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 02CAvUxx025541
X-Nifty-SrcIP: [125.0.205.54]
Date: Thu, 12 Mar 2020 19:57:31 +0900
To: cygwin@cygwin.com
Subject: Re: cygwin-3.1.0 and mintty from desktop shortcut
Message-Id: <20200312195731.2f8723a73ae0ae4d48fa9dbd@nifty.ne.jp>
In-Reply-To: <20200311195142.GH4042@calimero.vinschen.de>
References: <announce.20191216201131.494767-1-corinna-cygwin@cygwin.com>
 <87pngmx26z.fsf@Rainer.invalid>
 <20191218090415.GG10310@calimero.vinschen.de>
 <87a77pbn5j.fsf@Rainer.invalid> <87blp2lr6p.fsf@Rainer.invalid>
 <20200311195142.GH4042@calimero.vinschen.de>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
Content-Type: multipart/mixed;
 boundary="Multipart=_Thu__12_Mar_2020_19_57_31_+0900_nos9s8iv8Owe6U7G"
X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, GIT_PATCH_3,
 RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,
 SPF_PASS autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Cygwin mailing list <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin@cygwin.com>
Reply-To: Takashi Yano <takashi.yano@nifty.ne.jp>
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

This is a multi-part message in MIME format.

--Multipart=_Thu__12_Mar_2020_19_57_31_+0900_nos9s8iv8Owe6U7G
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Wed, 11 Mar 2020 20:51:42 +0100
Corinna Vinschen wrote:
> Hi Takashi,
> 
> would you mind to take a look?  The mutex is only used in
> fhandler_pty_master::pty_master_fwd_thread if the pseudo console is
> used.  Unfortunately I don't see the faintest hint in the starce why
> this occurs.  It happens pretty early at startup.

I looked the second log, but I found nothing suspicious regarding
mutex. All 'acquire' are paired with 'release' correctly.

However, I wonder why mintty did nothing for more than 60msec
after select() returned.

Achim, can you build mintty locally? If so, could you please
apply attahed patch to mintty 3.1.4 and report the output
in mintty window?

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

--Multipart=_Thu__12_Mar_2020_19_57_31_+0900_nos9s8iv8Owe6U7G
Content-Type: text/plain;
 name="mintty-for-achim.diff"
Content-Disposition: attachment;
 filename="mintty-for-achim.diff"
Content-Transfer-Encoding: 7bit

--- src/child.c.orig	2020-02-14 06:27:15.000000000 +0900
+++ src/child.c	2020-03-12 19:49:12.566807600 +0900
@@ -513,7 +513,11 @@
           }
           prevtime = now;
 
+          term_write("Call read()\r\n", 13);
           int ret = read(pty_fd, buf, 1);
+          char m[32];
+          sprintf(m, "Read %d bytes\r\n", ret);
+          term_write(m, strlen(m));
           if (ret > 0)
             len = ret;
         }
@@ -522,7 +526,11 @@
         do {
           //if (kb_trace) printf("[%lu] <read\n", mtime());
 
+          term_write("Call read()\r\n", 13);
           int ret = read(pty_fd, buf + len, sizeof buf - len);
+          char m[32];
+          sprintf(m, "Read %d bytes\r\n", ret);
+          term_write(m, strlen(m));
           if (ret > 0)
             len += ret;
           else

--Multipart=_Thu__12_Mar_2020_19_57_31_+0900_nos9s8iv8Owe6U7G
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--Multipart=_Thu__12_Mar_2020_19_57_31_+0900_nos9s8iv8Owe6U7G--
