delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/04/08:29:45

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.1 required=5.0 tests=AWL,BAYES_00,BUG6152_INVALID_DATE_TZ_ABSURD,INVALID_DATE_TZ_ABSURD,L_SPAM_TOOL_13
X-Spam-Check-By: sourceware.org
Date: Fri, 4 Nov 2011 13:28:41 +0059
From: Denis Excoffier <cygwin AT Denis-Excoffier DOT org>
To: cygwin AT cygwin DOT com
Subject: proc_waiter: error on read of child wait pipe
Message-ID: <20111104122905.GA3864@po8371>
MIME-Version: 1.0
User-Agent: Mutt/1.5.21 (2010-09-15)
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

Hello,

I have all the packages up to date, and also the last Cygwin snapshot:

jupiter% cat /proc/version | tr -d '\100'
CYGWIN_NT-5.1 version 1.7.10s(0.254/5/3) (cgf) (gcc version 4.3.4 20090804 (release) 1 (GCC) ) 20111030 04:51:42
jupiter%

I have compiled the last upstream tcsh (tcsh-6.17.06.tar.gz) with all default options.
and installed the newly compiled tcsh into /bin/tcsh-6.17.06 for testing.


I can now experience the following strange message:

jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `echo foo | wc -c`'
      2 [proc_waiter] wc 2840 proc_waiter: error on read of child wait pipe 0x708, Win32 error 6
jupiter%

wc seems to be able to be replaced by anything else, with the same message:

jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `echo foo | cat`'
    330 [proc_waiter] cat 3912 proc_waiter: error on read of child wait pipe 0x708, Win32 error 6
jupiter%

And the result seems ok:

jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `echo foo | tr o a`; echo $bar'
    243 [proc_waiter] tr 2892 proc_waiter: error on read of child wait pipe 0x708, Win32 error 6
faa
jupiter%


On the other hand, the following variations don't produce the message:
/usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `/usr/bin/echo foo | wc -c`'
/usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'echo foo | wc -c'
/usr/bin/env -i PATH=/usr/bin /bin/tcsh -fc 'set bar = `echo foo | wc -c`'

When the number of pipes increases, the result is not so easily predictable (or reproducible):
jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `cat /proc/version | cat | wc -c`'
jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `cat /proc/version | cat | cat | wc -c`'
      3 [main] wc 260 child_info_spawn::reattach_children: couldn't duplicate parent 0x6A0 handles for forked children after exec, Win32 error 6
    177 [main] wc 260 _pinfo::dup_proc_pipe: DuplicateHandle failed, pid 2884, hProcess 0x708, wr_proc_pipe 0x700, Win32 error 5
    270 [main] wc 260 child_info_spawn::reattach_children: couldn't duplicate parent 0x658 handles for forked children after exec, Win32 error 6
    345 [main] wc 260 _pinfo::dup_proc_pipe: DuplicateHandle failed, pid 2720, hProcess 0x6F8, wr_proc_pipe 0x6F0, Win32 error 5
(there seems to be another effect)
jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `cat /proc/version | cat | cat | cat | wc -c`'
      1 [proc_waiter] wc 2908 proc_waiter: error on read of child wait pipe 0x6F8, Win32 error 6
jupiter% /usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc 'set bar = `/usr/bin/echo foo | cat | wc -c`'
      1 [proc_waiter] wc 3908 proc_waiter: error on read of child wait pipe 0x708, Win32 error 6




Compilation of tcsh under GCC-4.5.3 (Cygwin default) or GCC-4.6.2 has the same effect.
Use of tcsh-6.17.04, tcsh-6.17.05 and tcsh-6.17.06 all have the same effect.
But tcsh-6.17.00 (upstream) or tcsh-6.17.00.1-1 (patched by CV) do not exhibit the message.
(i have currently no access to tcsh-6.17.01, tcsh-6.17.02 and tcsh-6.17.03)
The message appeared with the 2011-10-26 snapshot (was not there with the 2011-10-23 snapshot).

Of course, the decorations '/usr/bin/env -i PATH=/usr/bin /bin/tcsh-6.17.06 -fc' are not really
needed. If your shell is tcsh-6.17.06, the result is:
jupiter% echo `echo foo | wc -l`
      5 [proc_waiter] wc 732 proc_waiter: error on read of child wait pipe 0x720, Win32 error 6
1
jupiter%


Is somebody able to reproduce this?

Regards,

Denis Excoffier.

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