delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/21/01:41:03

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <be8713ec-5b68-e0e9-c5a5-d48fce491a2d AT pobox DOT com> <91DCAC3CB99C724EB365BB64677FBE7B16EBBD AT MX204CL04 DOT corp DOT emc DOT com> <46e39bce-9782-5c74-c196-35ee97ebbc64 AT pobox DOT com> <ace81c86-80d5-bef9-6b93-7d36dde5a4e8 AT pobox DOT com>
From: Daniel Santos <daniel DOT santos AT pobox DOT com>
Message-ID: <bff9c5ea-85d9-bf4e-2f25-271c1490565f@pobox.com>
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: <ace81c86-80d5-bef9-6b93-7d36dde5a4e8@pobox.com>
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

- Raw text -


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