[net.news.b] rare but catastrophic bug in 2.10.2

reid@glacier.ARPA (Brian Reid) (12/26/85)

Today the news on glacier suddenly stopped working. I posted two articles.
The first one made it out, the second one didn't, and nothing further
made it out. After several hours of poking around (it was Christmas, after
all, and my mind was elsewhere) I found the problem.

2.10.2 inews has a feature wherein it puts itself in the background after
calling input() but before posting the article, unless it is running under
Eunice. Unfortunately, it forgets to look for an error return in its call
to fork(), so if the fork() fails for some reason, then inews happily 
exits without a trace, without even an error status, thinking that its
child process is carrying on its work.

This was extremely easy to fix--just take out the exit(0) after the call
to fork(), and replace it with a log() call so that some record of this
event will be made. What this does is causes the parent process to do
the insertion work if the fork fails.

I've looked in the beta-release copy of 2.10.3 that I have lying around,
and the background code does not seem to be there any more, so I guess
this bug is not present in 2.10.3.  

One final note--the symptom that this bug has been happening is that 
a bunch of files named .in000000, .in003451, etc. get left in your
/usr/spool/news directory. If you want to see if this bug has ever happened
to you, then go look in /usr/spool/news to see if you have any files
named .in*.  If you do, then you should fix this bug.

(in posting this note I am testing my fix--if you read it, that means my
fix works. Don't ask why our process table was full.)
-- 
	Brian Reid	decwrl!glacier!reid
	Stanford	reid@SU-Glacier.ARPA

brown@nicmad.UUCP (01/12/86)

In article <2641@glacier.ARPA> reid@glacier.ARPA (Brian Reid) writes:
>This was extremely easy to fix--just take out the exit(0) after the call
>to fork(), and replace it with a log() call so that some record of this
>event will be made. What this does is causes the parent process to do
>the insertion work if the fork fails.

Well, I did your fix and it caused another problem.  If one posts an article
the article gets posted, but another following article get posted containg
the single character: ^?

If I try to cancel it, from within rn, the previous article gets dumped.

Not so good.
-- 

              ihnp4------\
            harvard-\     \
Mr. Video      seismo!uwvax!nicmad!brown
              topaz-/     /
             decvax------/