Re: Possible race in fork()

Adam Heath (doogie@debian.org)
Mon, 25 Jan 1999 14:17:08 -0600 (CST)


On Mon, 25 Jan 1999, Richard B. Johnson wrote:

>
> Hi!
> On a system at home I had a consitant problem trying to set the
> terminal speed after a fork(). It was traced to the fact that
> a termios structure, set by the parent, was being corrupted during
> the fork().
>
> I have written a test program that shows this problem without using
> any termios stuff, just malloc()ed memory. The problem does not
> occur with a machine here at work (same CPUs, same CPU board), but
> 128Mb of memory. Both are dual pentium 400MHz SMP machines.
>
> Both machines are running 2.1.131.
> My machine at home, showing the problem, only has 32 Mb of memory
> so the problem may be anywhere in the VM handling.
>
> When the problem occurs, both the child and parent's memory contain
> random data, not related to either the zeros or the incrementing
> values the test program writes.
>
>

$ uname -a
Linux doogie 2.2.0-pre6 #4 Sat Jan 9 19:20:28 CST 1999 i586 unknown
$ ./test
Waiting for kid's signal...Ok!
$

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/