X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=NhSGN/ptBKmvN4s2 u6fo48aV7C1wayuBMD/G1ZBe4DIb/+nB4qsxjS/9/jo0wOU8XsBuHAUbTtT+cFMi dw19OYhihpPnFPHBEgc4N9FgUk1gCzeAU+CEh8rgGPE2n8FCQlno0ge8xeUI1ebO zCJG66osFDhHIiEUUbHQwGe6JO0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=/ia097Ur8X803n3Oi/wzut 9gW7U=; b=HJs3AXxWTHHaip0aCQeAETyaMc910lK1QaQY3o7QEAKzWOzjVdknGV KfXXWn59VZafFbLgEdAnHpQt7/kHyNlMSJJfLZoIA0Fda8zkK5EbXenGe5z24Hi3 2WG/6koGGlLR6HLZvPFEHzF9p0E1XVvN8mfmIF9tfCqFNipt+r7E4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Sleep, transitional, stupid, retrieved X-HELO: sasl.smtp.pobox.com Subject: Re: long I/O delays when strace is running To: cygwin AT cygwin DOT com References: <91DCAC3CB99C724EB365BB64677FBE7B16EBBD AT MX204CL04 DOT corp DOT emc DOT com> <46e39bce-9782-5c74-c196-35ee97ebbc64 AT pobox DOT com> From: Daniel Santos Message-ID: Date: Fri, 21 Apr 2017 00:44:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: ED41BE36-2654-11E7-AD45-E680B56B9B0B-06139138!pb-smtp1.pobox.com X-IsSubscribed: yes I've tracked it down to this little Sleep() loop in pinfo::init. bool created = shloc != SH_JUSTOPEN; /* Detect situation where a transitional memory block is being retrieved. If the block has been allocated with PINFO_REDIR_SIZE but not yet updated with a PID_EXECED state then we'll retry. */ if (!created && !(flag & PID_NEW)) /* If not populated, wait 2 seconds for procinfo to become populated. Would like to wait with finer granularity but that is not easily doable. */ for (int i = 0; i < 200 && !procinfo->ppid; i++) Sleep (10); I tried putting a stupid memory barrier in the loop and a volatile read just for kicks, but that doesn't seem to be the problem. I'm headed off to bed. This only happens when using strace, so if anybody has ideas please post. Daniel -- 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