From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2137.outbound.protection.outlook.com [40.107.237.137]) by sourceware.org (Postfix) with ESMTPS id 3683B39450F2 for ; Wed, 8 Apr 2020 12:54:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3683B39450F2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lqimy787zDu+bu3h5VEe5BKlH5YEJjPm9j++QD2VSbIv74x4/tG9t3Yn877MnAuF64ewjEvK9Har0/ZSA+3oY3GqoTa4xhEKi0WiKMPUQyQzwvn3DkOSWxZNLCCUlYFKF7jjIZs5/fUbUW1ym7T5bycbEi+hZONDqXVdrteuEuOy9b4n0ZmGsOuLuIWLRMIsehOl+yl7PIW9dPDn6mpar6P/BTIvQnwWc48kW9JCMDIfnRrvkxGOOpTeLQAB8sS5NkRZ3lJz4oYV1iIOBWJi2UNaZUCo4cCTU8kY9wHegKuC3GLIb3PjYQQj266xvtT9k6ls7k1NLiU6cslusmRfHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Yq7aKN28Liv7JqjvfpnL2R6ark96iwvVs0FymoRZOXc=; b=U7AUqgsStD5XmY7X3jVF4vc+vymnRCrxHTNxbWcnNzs+trYHskOWI4Y2IiHNH4fdfUvrO4JST+AVqC9C8wSuTynkHPWA6Ss55aUd1V6VMSPgtKepUvY4h2M1jWRd3E7wtcIpneRnn6Igh/xnQvjcwZL02E97reKu5O357+nyApOkzUQLCLCs5WEoHlxWrmzv6PRvIYyE1PW5/wJZVZvf1AocXdgEJpQn9FsrXJ5/N5obPA77jStqsc5ZQ560YBOiODZkmBCcXv8GBDIsPQF+KgeZtlv5HBCMenQnTiWXomiwZaeWDkWwfjO2nbjGsHJESbQOITXzDGyEVbIsKXKg2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Received: from DM6PR04MB6075.namprd04.prod.outlook.com (2603:10b6:5:127::31) by DM6PR04MB4716.namprd04.prod.outlook.com (2603:10b6:5:1f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Wed, 8 Apr 2020 12:54:00 +0000 Received: from DM6PR04MB6075.namprd04.prod.outlook.com ([fe80::e806:ecfb:c187:4e5a]) by DM6PR04MB6075.namprd04.prod.outlook.com ([fe80::e806:ecfb:c187:4e5a%4]) with mapi id 15.20.2878.016; Wed, 8 Apr 2020 12:54:00 +0000 Subject: Re: Sv: Sv: open descriptor to named pipes sometimes fail To: sten.kristian.ivarsson@gmail.com References: <000701d60cee$ab67e1b0$0237a510$@gmail.com> <8c868142-2a9b-3644-0760-444125d2143f@cornell.edu> <001301d60d0b$c9064140$5b12c3c0$@gmail.com> <345452a5-3c38-4aa6-85ed-78939412c047@cornell.edu> <003c01d60d83$07aa3380$16fe9a80$@gmail.com> Cc: cygwin From: Ken Brown Message-ID: <15d63164-7ca5-77e4-c409-5bda9ab4afbd@cornell.edu> Date: Wed, 8 Apr 2020 08:53:58 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 In-Reply-To: <003c01d60d83$07aa3380$16fe9a80$@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH2PR19CA0027.namprd19.prod.outlook.com (2603:10b6:610:4d::37) To DM6PR04MB6075.namprd04.prod.outlook.com (2603:10b6:5:127::31) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2604:6000:b407:7f00:c0b6:f8fd:7b2:b8a] (2604:6000:b407:7f00:c0b6:f8fd:7b2:b8a) by CH2PR19CA0027.namprd19.prod.outlook.com (2603:10b6:610:4d::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.15 via Frontend Transport; Wed, 8 Apr 2020 12:53:59 +0000 X-Originating-IP: [2604:6000:b407:7f00:c0b6:f8fd:7b2:b8a] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 57a372d4-0b10-49f3-2dd2-08d7dbbbe87f X-MS-TrafficTypeDiagnostic: DM6PR04MB4716: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-Forefront-PRVS: 0367A50BB1 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6075.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10019020)(4636009)(376002)(39850400004)(136003)(396003)(366004)(346002)(6916009)(6486002)(4326008)(75432002)(2616005)(31696002)(66946007)(66476007)(16526019)(53546011)(66556008)(31686004)(8936002)(8676002)(81156014)(52116002)(478600001)(36756003)(786003)(316002)(86362001)(81166007)(5660300002)(186003)(2906002); DIR:OUT; SFP:1102; Received-SPF: None (protection.outlook.com: cornell.edu does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g+fLwh/EG669WTKKSl2RaJQmU2URQwLtXbIZNfkuFWNinkDxWV8UKRyrGk62WVhdWFXCC0fNRmJn7jjmfZtMWg5cVqPcxtKHAz29SDYuUenSAcPVAoJr70Ko+6ZA3UtBGE4frhgjIeCTeCoKKxw+UyUNnx3M8t5WwUWGf9W7E7ZVLIRm9e04g0Z94eqXNagxFa9R2s7N1Mdo1xtnd4ySqVPTFAczU9c30IbuLnsvhX87+3Ed/ccqSMyvs+xJAs5udFUUkxYxDFAlyh37MoQHuCQ8dI+UPDRSbKKo+VBUiW5LScBumuhmNy/6A54WT4fVuD9RJQQDJ24QPv922WGAxbv7UZqBCCLCJhtTjccjANBvSpBoXZGnjijwTY2DBcgdnEcT31sUCVD9Qf7PqHwiIPT+rfQGEtSlT5l0KewlSxEmaHKmH+yJb9V/0TVHgwtI X-MS-Exchange-AntiSpam-MessageData: qX4M5xPKc6a2TfX33RaJcMHx26uW6gArVqmLB/MCGjJXNpQUoX/ByrEv5g1hr/4MY02ymbLUYu2B8NV+sYPLT1u76fXQBZoAD/6g6+Xe59hCReXYRm7z0Xu4zOl3+NbFq9ExJgF1vNF+DpbyRnuAF5BEfD5YqdQgZmmhulNf8LShTLX6vfvD19coihUQvzOA6AeZ/4/FQtUFg0zcj3Jv5A== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 57a372d4-0b10-49f3-2dd2-08d7dbbbe87f X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2020 12:54:00.5748 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: T1Uj57c4Z2sggCvyRgEmyLngi0NYJ+AbcEgOmsqtW1ve8Ps0jWWiQb5+0aYdIHXyw2BTrE8rze17270c6YdPgw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4716 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, GIT_PATCH_3, JMQ_SPF_NEUTRAL, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, 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@cygwin.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: , X-List-Received-Date: Wed, 08 Apr 2020 12:54:03 -0000 On 4/8/2020 4:52 AM, sten.kristian.ivarsson@gmail.com wrote: >> On 4/7/2020 2:38 PM, sten.kristian.ivarsson@gmail.com wrote: >>>> On 4/7/2020 11:10 AM, Kristian Ivarsson via Cygwin wrote: >>>>> Opening a (second) descriptor for (blocking) write sometimes fail >>>>> >>>>> The provided test case sometimes succeed, but quite often fail with >>>>> ENOENT (in various indexes) >>>>> >>>>> I haven't dug deeper to find the underlaying cause yet >>>>> >>>>> Have anyone experienced this before ? >>>> >>>> I can't reproduce this on my system. I changed 1000 to 10000 and >>>> then ran your test case 10 times, and it never failed. I tested both >>>> cygwin-3.1.4 and the HEAD of the topic/fifo branch (which I recently >>>> force-pushed in case you want to try it). >>>> >>>> Can you run your test under strace and see if that provides a clue? >>> >>> I'm running things on a few year old laptop, perhaps with less muscles >>> ;-) >>> >>> With strace it was harder to reproduce, but I could reproduce it (and >>> it happen to be the first iteration this time) >> >> Does this help? >> >> --- a/winsup/cygwin/fhandler_fifo.cc >> +++ b/winsup/cygwin/fhandler_fifo.cc >> @@ -624,7 +624,8 @@ fhandler_fifo::open (int flags, mode_t) >> else >> goto success; >> } >> - else if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status)) >> + else if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status) >> + | status == STATUS_OBJECT_NAME_NOT_FOUND) >> continue; >> else >> { > > Did you mean to use the bit-or-operator or the or-operator ? The or-operator. Thanks for catching that. > I did > ... > else if (STATUS_PIPE_NO_INSTANCE_AVAILABLE (status) || status == > STATUS_OBJECT_NAME_NOT_FOUND) > ... > and with that change I cannot reproduce the error in the test-program Great. I'll push it to the topic/fifo branch. For the record, that patch was motivated by your strace output, which showed NtOpenFile failing with status 0xC0000034, which is STATUS_OBJECT_NAME_NOT_FOUND. > We (with the open-source-application) do bump into some other issues later > in the chanin, but I haven't investigated what the issues are yet (lack of > time) > > > I'm a little confused why this "issue"/"report" didn't end up in the > cygwin-mailing list and why it became us having a private conversation ? That was unintentional. I've added the list back to the Cc. > We're grateful that you're taking your time to look into this. Do you have > any clue of what the chances are to get these fixes (topic/fifo) into the > master branch and finally into an official release (or at least a snap-shot) > ? It shouldn't be too much longer. I'll regret making this prediction, but I'd guess that the branch will be ready for wider testing within a few weeks. Ken