delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/04/18/21:47:57

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3FEE23858D33
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1587260831;
bh=kExzZ0Q+HYUbWSBsHJ+e2Oigv5GyT9jeBr66XIxdkOw=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=QLtP/iaeoGONI4f/ZSkgn7KQSbenlDE/swVvzIag4p+7F76JSJ9gqttwbt7tInT8D
bP8/FejoTNwmtiXniTDLbgXoy+qJydUqvHr30vaHvuq3eCVEaQHZCI4gEKOsGbekAR
IMAE44DHVTq+SYKEYCYMt64d5J/pwVgs25Zq/M+k=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 21F3C3858D31
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=IZEI5JAVQSoq4h+k34gaP5RyDDbAmwAGodj23ToK9Ad06y5DyCwOoNdKIqorbG25gWfDw9933e2kSNCbz2ArRa+FZbggP3WyuIcM1F7adAoK/3BM3P2LOq40RAMZlQ2caFU6GItEvZUI5vejmfMYcW6NBWsSWYScG06D1VwyXuq48Hw8nmAw9knfIp+cQQbyL5T1Y2D/WXp0y5cfwHifG+Q5ZlaaSwHQr0l/Je8b281Fq4tRdsUgdCWUqxY85mlT/sFWcKri7P/b14SFG4HaWwoIuPoIG1Yov58PJ9Hqzqa28sLvN+m916//hzc0fMnM8BPpeCZRauh3g+r4CllETw==
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=VdtgvAX58wZ3nEHYxz2wCZpqrcL26WYRJziW2WnyBrU=;
b=j1yL3Gfv/3sHnJtx919Tq1Zrk+YUEIedYRmEAPLkHplsFDO+AiOZzgIH3h71RPX9nkqtXj3dElLn/yK30ToiMp1aXai2eWSzq6JjzMJzceE72mpHUB5/a5Xa9SNLOG6gHVcrSAT3xdqQVVDGfoAUB2eaVO8PYsNWQSuD8xK49IldSWxv2JemTa2478SzltcvvjmJuXcX6+nrcmBG9/JHl2QtMJx2sKuh7mbSHPoj+8Vz7oU09X8yio6IjTOrpPhAZdtqnAc8C9Jobx2OxbpYTuqy+HBaxLesbrQRD0C2ydh3QIAON0pY2JBQMmdw5oy6pXYAGtnFcGuKUzSyhw7GWQ==
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
Subject: Re: open write descriptor on named pipe sometime results in ENOENT
To: cygwin AT cygwin DOT com
References: <005101d61595$741a0120$5c4e0360$@gmail.com>
<c0d5befb-2f8b-c9f7-8859-c5910e666071 AT cornell DOT edu>
Message-ID: <55a55714-b7b6-f9a8-edd9-8e9b61d13329@cornell.edu>
Date: Sat, 18 Apr 2020 21:46:58 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.7.0
In-Reply-To: <c0d5befb-2f8b-c9f7-8859-c5910e666071@cornell.edu>
X-ClientProxiedBy: MN2PR19CA0042.namprd19.prod.outlook.com
(2603:10b6:208:19b::19) To DM6PR04MB6075.namprd04.prod.outlook.com
(2603:10b6:5:127::31)
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-Originating-IP: [68.175.129.7]
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: ed7ea9eb-b432-4598-9bf5-08d7e4038d03
X-MS-TrafficTypeDiagnostic: DM6PR04MB4313:
X-Microsoft-Antispam-PRVS: <DM6PR04MB4313537A93645BD9A4DA5D70D8D70 AT DM6PR04MB4313 DOT namprd04 DOT prod DOT outlook DOT com>
X-MS-Oob-TLC-OOBClassifiers: OLM:6790;
X-Forefront-PRVS: 0378F1E47A
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)(366004)(396003)(346002)(39860400002)(136003)(376002)(316002)(16576012)(6486002)(786003)(6916009)(31686004)(2906002)(81156014)(75432002)(8676002)(8936002)(16526019)(186003)(52116002)(86362001)(26005)(478600001)(36756003)(31696002)(2616005)(956004)(5660300002)(66476007)(66556008)(53546011)(66946007);
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: SkWpoyFoM7X6UAwZSQpJX4tc69xKoHc7xHN+sXV55qqIdIGDeZ4NhhBBf31YEO1ABgJumoR+8V1SiaupUQ9yNxNCPqRmtC2LVQ6lrVDxqJW6J/zKnMwwNFYKAjUpcdUJ/p8uTnK5kVFJKmUZOcyf5yQC1tNYRoFv8jYFUQd1CVnp1E2ShKySVb/AYyCsIr2WiI6PESgsnnLCQ5TneH4udHSpKknROcS+epHSHz7e66mSiwngejUQlPqrqaGCxKSHM8znaWiYHzsm3jS2ntMoaSGk5zaTEWx5+UJq54b55h5a+f3FASQY9kEUrmZHBrpTdOvXMttLgbxuPnnQhjCCHvgQlH/QSDM+kRLqSyTOk7BV1Tyx/JOh9FXdj1vNrwqf88wtacmQJ2q6U3mMIVLANd6sNKTO4BXPiwXvsZK+OrFNV3C6UDuk5ccKOJFQVYkP
X-MS-Exchange-AntiSpam-MessageData: GxQBlPzzCmu/hxEMW/FUS+vB3V9vMqBeSHNT9SgcTRCdjUjxl+kwYXY5kq2b3xukILxIfBgcMdZzC7KNeiDOdryfTtR2o0sHho06Oez7g+Tlrl/RNS+HNw3eDjeBIzmb8TqgoHfvXtxYJc22s58gxQ==
X-OriginatorOrg: cornell.edu
X-MS-Exchange-CrossTenant-Network-Message-Id: ed7ea9eb-b432-4598-9bf5-08d7e4038d03
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2020 01:47:00.5848 (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: hjqsEiP34yDag+LwFJyzWEzbOVaJXBqOusqWQ2FM3NChdzySHisv/4TAjc48/Tbo2LKYstM2o5EArWsTnIEPjQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4313
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, DKIM_INVALID,
DKIM_SIGNED, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, MSGID_FROM_MTA_HEADER,
SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Ken Brown via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Ken Brown <kbrown AT cornell DOT edu>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 03J1lc6g014696

On 4/18/2020 5:48 PM, Ken Brown via Cygwin wrote:
> On 4/18/2020 11:24 AM, sten DOT kristian DOT ivarsson AT gmail DOT 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.

I've made some improvements in the opening of writers, which I will push soon 
(probably tomorrow).  I think that this will fix the errors you've been seeing 
when opening writers.  The issue is one of timing.  I hope I've built in a large 
enough timeout so that you won't see these errors anymore.  But if it does fail 
you should see ETIMEDOUT instead of EBUSY or ENOENT.

But there's a separate issue: Your program has two processes trying to read from 
/tmp/pipe_parent at the same time.  My implementation of support for multiple 
readers is not yet finished, so this can't work yet.  I hope to have at least a 
first cut of this done within a few days.

Ken
--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019