delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/24/03:02:51

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:mime-version:reply-to:from:date:message-id
:subject:to:content-type; q=dns; s=default; b=hVk6kCUb8nS8eZTmyw
nlbagScpUxf9CEc9bBRRH9aqln+7OelTCIsXTA8NuyU7PWpE2XcF4dDXK/nfS+fk
XboJrbNs1UKHyJD6Wl3+SB+tlK22XV3qEKfHJG933tqcCF3H5OcvGMs64/kpErQX
m6kr3IIKndNDpAYLb6sG4Zs8c=
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:mime-version:reply-to:from:date:message-id
:subject:to:content-type; s=default; bh=qNwlaNb+pMPNx2SCsktbyEBc
woU=; b=FMer82x6xbjQO4PkJBAdhn3WO5cdHl5+K1kdQFU0XVEZtWbdnEog2RiH
lIeKZoKnYCD/GaBQ9fiK0Km+hvuRoX97As0xanf22m7wxU1L22gtpKFqt//kKdxv
RwfV9HdMqyJeoDsEcQbmSjz18AEQ5KcYAon8ghgorbJ0GsM00vw=
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=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wi0-f175.google.com
X-Received: by 10.180.75.203 with SMTP id e11mr27206627wiw.77.1440399747076; Mon, 24 Aug 2015 00:02:27 -0700 (PDT)
MIME-Version: 1.0
Reply-To: fracting AT gmail DOT com
From: Qian Hong <fracting AT gmail DOT com>
Date: Mon, 24 Aug 2015 15:01:47 +0800
Message-ID: <CALd+sZSmEchJrQsm3YzxedC5aK5VcffhyQiLFx2tEProxCtyAQ@mail.gmail.com>
Subject: strace -f hangs forever with process who creates child process
To: cygwin <cygwin AT cygwin DOT com>
X-IsSubscribed: yes

Dear list,

I just found `strace -f` hangs forever for me.

$ uname -a
CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin)

$ cat parent.sh
./child.sh

$ cat child.sh
echo haha

$ strace -f -o out.txt bash -c parent.sh #hangs forever.

I have a few C source test case here, which were originally for a Wine
bug, but could reproduce this Cygwin bug:
https://bugs.wine-staging.com/show_bug.cgi?id=525#c2

To reproduce:
(Ignore the Wine bug report itself, just copy the source. The Wine bug
itself is fixed now, with analysis which indicates something is wrong
with IsDebuggerPresent(). I refer the bug here since it might help to
triage our Cygwin issue if there is something related)

gcc spawn-parent.c -o spawn-parent.exe
gcc spawn-child.c -o spawn-child.exe
gcc dummy.c -o dummy.exe

Without strace, the above programs works fine:
$ ./spawn-parent.exe
from SPAWN parent!
from SPAWN dummy!
haha this is dummy

However, when tracing with `strace -f`, spawn-child.exe hangs:
$ strace -f -o /tmp/spawn.nested.strace.txt ./spawn-parent.exe #hangs



I read the strace document of Cygwin[1], it said:

  -f, --trace-children         trace child processes (toggle - default true)

[1] https://cygwin.com/cygwin-ug-net/strace.html

According to my test, `strace` without `-f` works fine, which trace
child process, as the document says.

Is it a known bug that toggle off child process doesn't work? Or did i
miss anything else?

(Note, current strace works with my needs, I don't need to toggle off
child process tracing at all, just make sure there is not a bug here)

Thanks!


-- 
Regards,
Qian Hong

-
http://www.winehq.org

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