From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109024 invoked by alias); 21 Apr 2017 05:40:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 97117 invoked by uid 89); 21 Apr 2017 05:39:47 -0000 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 Received: from pb-smtp1.pobox.com (HELO sasl.smtp.pobox.com) (64.147.108.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Apr 2017 05:39:46 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 4DA817D9D4 for ; Fri, 21 Apr 2017 01:39:46 -0400 (EDT) Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 45F647D9D3 for ; Fri, 21 Apr 2017 01:39:46 -0400 (EDT) Received: from [192.168.1.4] (unknown [76.215.41.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id A5F907D9D2 for ; Fri, 21 Apr 2017 01:39:45 -0400 (EDT) Subject: Re: long I/O delays when strace is running To: cygwin@cygwin.com References: <91DCAC3CB99C724EB365BB64677FBE7B16EBBD@MX204CL04.corp.emc.com> <46e39bce-9782-5c74-c196-35ee97ebbc64@pobox.com> From: Daniel Santos Message-ID: Date: Fri, 21 Apr 2017 11:06:00 -0000 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 X-SW-Source: 2017-04/txt/msg00257.txt.bz2 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