This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: snapshot 20050114 race (on list)
On Sun, Jan 16, 2005 at 02:24:17PM -0500, Pierre A. Humblet wrote:
>I have been trying without success to reproduce the race
>reported by Eric Blake, which started this thread.
>
>When trying a modified script (below), I can get a crash in proc_waiter
>3180441 [proc_waiter] sh 3676 handle_exceptions: Error while dumping state
>(probably corrupted stack)
>
>If you can't reproduce it, I can provide more info, but nothing very
>useful. That was with the cvs of yesterday. I noticed you made some changes
>and recompiled, same general result. That's on XP.
>
>Also, in :exit, it's only necessary to call set_exit_state
>if n != EXITCODE_NOSET (otherwise the exit code is already set).
>Also if set_exit_state does set the code, then the parent can be alerted.
>
>Pierre
>
>#! /bin/sh
>pwd=`pwd`
>tmp=race.$$
>for i in 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
>do
> mkdir "$tmp"
> cd "$tmp"
> sleep 1 &
> cd "$pwd"
> rmdir "$tmp"
>done
>exit 0
Thanks. That script unearthed at least two races in the proc_waiter
code. One was a "how in the world could it ever work" type. I was
inadvertently relying on the fact that the last process created would be
the first process to exit. It's amazing that this passed the test suite.
I guess I need to beef up that aspect of it.
cgf