Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 1997 00:30:33 -0700 (PDT)
From:      Simon Shapiro <Shimon@i-Connect.Net>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: What is wrong with this snipet?
Message-ID:  <XFMail.970914003033.Shimon@i-Connect.Net>
In-Reply-To: <199709140444.VAA08806@usr08.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Terry Lambert;  On 14-Sep-97 you wrote: 
> > Why would the following segfault on 6 of the 10 iterations?
>  
>  Forget that, we want to know how you get 5 more iterations (minimum)
>  out of a program that's already segfaulted.  8-).

I dunno, I just work here :-)
You saw the program (well, excuding some #includes).  If you notice, it is
not a star forker, but a chain one;  Each process forks a child and exits.
I suspect the segfault (if you move things a bit you can get bus errors
instead :-) happens sometimes when an earlier parent exits.  If the kernel
gives priority to fork, vs. exit, this is what we will see.  It goes away
if you do not share memory, which makes sense, as one of the exit() calls
eventually free()'s some critical memory.

The interesting thing is that the program is (I think) semantically correct.
There is no obviously wrong anything in it.  Actually, if you clear the
RFMEM bit, it runs perfectly normally.

As I said to someone else earlier, in one place, at one time we considered
a system which when operated as documented but produced obviously erroneous
results to have a bug.  But since we understand what happened here, we can
document it. Voila!  a feature :-))

BTW, I do not pretend to know how to solve it in a satisfactory manner.
---


Sincerely Yours,                               (Sent on 14-Sep-97, 00:13:30
by XF-Mail)

Simon Shapiro                                                Atlas Telecom
Senior Architect         14355 SW Allen Blvd., Suite 130 Beaverton OR 97005
Shimon@i-Connect.Net          Voice:  503.643.5559, Emergency: 503.799.2313



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.970914003033.Shimon>