From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by sourceware.org (Postfix) with ESMTPS id 15FDB39450CE for ; Thu, 14 Jan 2021 09:35:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 15FDB39450CE Received: from Express5800-S70 (x067108.dynamic.ppp.asahi-net.or.jp [122.249.67.108]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 10E9Yd81022349; Thu, 14 Jan 2021 18:34:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 10E9Yd81022349 X-Nifty-SrcIP: [122.249.67.108] Date: Thu, 14 Jan 2021 18:34:40 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: program will hang when dup and close fd opend by posix_openpt Message-Id: <20210114183440.ac0068e5ed64675efe1e3294@nifty.ne.jp> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 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 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-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2021 09:35:11 -0000 On Thu, 14 Jan 2021 13:48:25 +0800 Peiyuan Song via Cygwin-developers wrote: > dup will clone all info from `fhandler_pty_master` except pty master > control thread and pty master forwarding thread, when close that fd > the `fhandler_pty_master` heap will be reclaimed, but the thread run > on `fhandler_pty_master` object will not stop. when close duped fd, > those threads will access the reclaimed space and cause this issue. Thanks for the report. Let me consider. -- Takashi Yano