From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770122.outbound.protection.outlook.com [40.107.77.122]) by sourceware.org (Postfix) with ESMTPS id 52F3C385B835 for ; Sat, 18 Apr 2020 21:48:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 52F3C385B835 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jpHuq8dyu+3YSWYgITIZc2g82wkXxDdUEZRn8EDEPkImFR7BMtkYMda5ssV1k55Q7XHbKpkkeobHaLuf47yuYMxx8fhQAIHLqunblyGedZl+pNwGxFmV5wooAAnzJ6OXf+jK10b5JQrIgxjnCcVb5ZkDW5MQdjOWAaGNynD7Alc3IJRQDjKjg0KYMrWY6QQ3fQ7vrCQLxWfX+9+SOLi5+lS1I2YaAMzFixaUTtSJe/89RFdvAnRWahDN3N79UpQWfvgi25E2Ndvx+tvZs3c+34APc21Cz2bLIHCROvcsIxUdIRpDINzy1TYXUKpj2A3hoXp6ILL8sD5DYceD4xGsig== 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=Qljt3X3T3YImfTg6bRY4I0JQkD2C9j/OLRqyduyWULI=; b=d43m+CHVS8rjcelK0F+G9KXI3a3zagEgkVjeTTTC+UmWOz27kmSuuAnUdbnOXIz2NOuSSutPVtrv5ei7t7+JkWEWzhwiTFCt1o3y6mbbtwTNUqzegbSgQFZrG0K4GLnWxXz2w5y110x5LPd9Qj3lKQ+iB3hhGVAoQdcuF2J/I+7eerDo0hnDqxfTEVJ2OrGVRCPbG5TW30Dd+DDzYqRI7JAx4q4MWHIbrJH2p46LNXhQDW0ec7pILbOMM4nRtxW04wKzBlOl4CBx5LWsD7joXAk/jkR433YFBFZVeCibyvS6dp41M2/mvacNcuDNqEuAPzYV0tNXrkG6Kb8dB5wlcA== 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 DM6PR04MB4443.namprd04.prod.outlook.com (2603:10b6:5:a5::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.29; Sat, 18 Apr 2020 21:48:49 +0000 Received: from DM6PR04MB6075.namprd04.prod.outlook.com ([fe80::f48b:4e13:94d7:f7c4]) by DM6PR04MB6075.namprd04.prod.outlook.com ([fe80::f48b:4e13:94d7:f7c4%4]) with mapi id 15.20.2921.027; Sat, 18 Apr 2020 21:48:49 +0000 Subject: Re: open write descriptor on named pipe sometime results in ENOENT To: sten.kristian.ivarsson@gmail.com, cygwin@cygwin.com References: <005101d61595$741a0120$5c4e0360$@gmail.com> From: Ken Brown Message-ID: Date: Sat, 18 Apr 2020 17:48:48 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: <005101d61595$741a0120$5c4e0360$@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MN2PR16CA0050.namprd16.prod.outlook.com (2603:10b6:208:234::19) To DM6PR04MB6075.namprd04.prod.outlook.com (2603:10b6:5:127::31) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.17] (68.175.129.7) by MN2PR16CA0050.namprd16.prod.outlook.com (2603:10b6:208:234::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.25 via Frontend Transport; Sat, 18 Apr 2020 21:48:49 +0000 X-Originating-IP: [68.175.129.7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9bf553c-fcc7-441e-d40e-08d7e3e2475b X-MS-TrafficTypeDiagnostic: DM6PR04MB4443: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-Forefront-PRVS: 0377802854 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)(136003)(376002)(39860400002)(396003)(346002)(366004)(8676002)(16526019)(186003)(8936002)(75432002)(6486002)(66476007)(2906002)(5660300002)(66556008)(66946007)(81156014)(31686004)(478600001)(36756003)(31696002)(786003)(86362001)(316002)(26005)(53546011)(956004)(16576012)(52116002)(2616005); 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: Ck9LSHXJhwmUALkroWhuH9IGv4oOFor4LlyFkMetXai4E2yQUr3832r0/pntb5G/21mYCENKve+qWJc+UxgxYZPlBPBg5BX3uhU67qCK27Mi548Y8lUyGdapwegDgOsDgg/ldo8ebo1KcR+PNjT6j16Gc4Qa7Q7VG3l07CTYszfDtVV10xuwJWKY38eBTPrOjC+sFnjUvJorU+hNz1r4yU/ayUX5AGES7LjwjKbGnum+yIA0Sx7Jz9obB1mlQPaWvwr/uyf6RUbtPDQWKmqGb9gpwUKpdraCpb0PAezCGUfkfuNLFOw4yC5dSAJefR1nVvmrxfKuEtrdNcQXnKUbjrc//WX6xndmPNjH7/eM7ndfBRZS2m148XBodxJjsRZNhEMaRQdFoYAtXkswyLyjZUvnujTd9xbIhlC+cMaq1pcijfo1A2o6xwnsmuXVfcIl X-MS-Exchange-AntiSpam-MessageData: 11/Iqvl4SRmrp73ra1iVgGqlE8RbcacFpje+1/bh5QX5sKvq2aBYTF+dEi89HieHdGS6s1alCJCS98BJ/+CTPyx7nHrA+UauUhDg0vGZQ9BxdlxatiByHn20gvgoQXYbzj0wpftYnDoywLiDSEoykg== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: b9bf553c-fcc7-441e-d40e-08d7e3e2475b X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2020 21:48:49.7947 (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: JXZTA8m4PEumE9rNL+ai3MgJJXQGX52UcjHdhwysO3rzuqq4ldL0bttNFWwDxhDy4oJZYnx+qvY2oGMIKBOegA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4443 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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: Sat, 18 Apr 2020 21:48:53 -0000 On 4/18/2020 11:24 AM, sten.kristian.ivarsson@gmail.com wrote: > Hey all > > > We're trying to nail down some issues with using named pipes > > The issue we're getting is deterministic (ENXIO) but it is not this one, but > we think this issue is worth reporting anyway > > > We're using the branch topic/fifo > > > > The program explained in short is: > > > - One main (parent) pipe that lives through the whole execution > > - The main process forks 'children' child-processes that creates their own > (unique) named pipes > > - Each child forks 'children' grans-child-processes that just writes some > bogus messages back to the unique child pipe > > - Each child writes a bogus message back to the main process > > - Every process creates a write and a read descriptor, but the write > descriptor is just a dummy descriptor (to somehow keep the pipe alive > without being bombarded with signals) > > - This iterates a few times > > > Some of the constructs may be a bit confusing and maybe not relevant to this > issue, but I left them in the test-program anyway > > > > > Issue #1 sometimes occurs in line 35 (printed as 36) we get ENOENT (No such > file or directory) despite that the pipe was just created and the read > descriptor successfully was opened > > *wfd = open(name, O_WRONLY); > > > Issue #2 sometimes occurs in line 73 (printed as 74) we get EBUSY (Device or > resource busy) when attempting to open a non blocking descriptor > > const int wfd = open(name, O_WRONLY | O_NONBLOCK); > > > Issue #3 sometimes occurs somewhere unknown and the main process just get > stuck (I've failed to reproduced that with strace or so) and to not have any > more input so maybe this should be left out ? > > > > I hope this is well described and hopefully it's enough to reproduce the > issue(s) and hopefully is not due to a fault test case ;-) I'm just in the middle of fixing some bugs that are probably related. I hope to have some fixes in the next day or two, as well as better error codes. (The error codes are mostly translated from NTSTATUS codes and often don't reflect the real problem.) By the way, I really appreciate all your testing and bug reports. The FIFO code is fairly new and hasn't gotten any intense testing up to now, especially in the non-blocking case. Ken