This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fairly repeatable fork(?) errors in (contrived) test script


On Wed 9/21/05 11:44 EDT (cgf) cygwin@cygwin.com wrote:
> On Wed, Sep 21, 2005 at 09:13:09AM -0500, Tom Rodman wrote:
> >All:
> >
> >I'm using the 9/19 snapshot. The sleep in the below test script seems to
> >be required, otherwise the script could be simplified and still
> >cause errors.

Today I carefully swapped in the 9/22 snapshot (without rebooting). The
errors are gone - the test ran cleanly 4 times in a row.   I swapped back in
the 9/19 snapshot (w/o rebooting) and again it ran cleanly multiple times.

In general what might explain the "unhappy state" cygwin got into,
before I killed off all cygwin processes (sshd, cron, incoming and
out going ssh sessions, bash shells, vim, less..)?

> >The test script works (always?) without errors on 1.3.20.
> 
> 1.3.20?  That is at least three years old.  There is nothing useful that
> can be derived from quoting a regression from a version which is that
> old.

The 1.3.20 test is on a production server.  The "errors" were
on a separate "development" server.

Our production boxes will be upgraded from 1.3.20 when I can
show our scripts work reliably with the latest cygwin.  

My cygwin tests are done mainly on the "development" box. 
This is at least the second time that my errors could not be
duplicated by others - it is a dual processor server with 
hyperthreading on, cygcheck.out is
attached.  It runs about 10 cron jobs nightly, and reboots weekly.

> I can't reproduce this, even with 81 repetitions instead of 9.  Please
> see the snapshot reporting guidelines that I requested at
> http://sources.redhat.com/ml/cygwin/2005-09/msg00419.html .

I've read it now.  To comply, I would need to be a more active/systematic
tester - I'll see what I can do ;)

> >Here are a couple of test runs:
> >
> >  ~ $ /tmp/test
> >  x: 1
> >  x: 2
> >  x: 3
> >  x: 4
> >  x: 5
> >  x: 6
> >  x: 7
> >  x: 8
> >  x: 9
> >      896 [main] bash 6544 fork_parent: child 6680 died waiting for longjmp before initialization
> >  /tmp/test: fork: No such file or directory
> >
> >  all done
> >  ~ $ /tmp/test
> >  x: 1
> >  x: 2
> >  x: 3
> >  x: 4
> >  x: 5
> >  x: 6
> >  x: 7
> >  x: 8
> >  x: 9
> >  /tmp/test: fork: No such file or directory
> >      812 [main] bash 7028 fork_parent: child 3576 died waiting for longjmp before initialization
> >  /tmp/test: fork: Bad file descriptor
> >
> >  all done
> >
> >--
> >With a real (ie useful) script (that also involved a sleep) I was able to
> >get similar(?) errors after running only 5 instances of that
> >script in parallel.
> >
> >
> >"do nothing" test script:
> >--v-v------------------C-U-T---H-E-R-E-------------------------v-v-- 
> >#!/bin/bash
> >
> >bar()
> >{
> >
> >  foo=$(
> >    echo $(
> >      perl -pe '1;' /etc/passwd|
> >      tee /dev/null|
> >      (sleep 7;tr '[A-Z]' '[a-z]') |
> >      tail -1
> >    )
> >  )
> >
> >  echo foo: $foo >/dev/null
> >
> >}
> >
> >
> >for x in 1 2 3 4 5 6 7 8 9
> >do
> >  echo x: $x
> >  bar &
> >done
> >
> >wait
> >echo
> >echo all done
> >

Attachment: cygcheck.out
Description: cygcheck -s -v -r

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]