[pe.cust.bugs] uucp dumping core when many files - help!

dave@lsuc.UUCP (David Sherman) (02/14/85)

For the first time we have uucp trying to process many
files at one time, because pesnta is feeding us some news
articles which we send on to utcs. This has been causing UUCP
to dump core partway through the session - after transferring
a goodly number of files. The worst part is that it leave LCK
files lying around, and that hangs all our uucp calls for a while.

Adb on the core dump reveals that a segmentation violation (SIGSEGV)
caused a call to intrEXIT. I tried bumping the stack size up to
16 (with setstack) but it still happens.

Any idea what I can do?

David Sherman
-- 
{utzoo pesnta nrcaero utcs}!lsuc!dave
{allegra decvax ihnp4 linus}!utcsrgv!lsuc!dave

dave@lsuc.UUCP (David Sherman) (02/27/85)

Well, since no-one else came up with the answer, I delved into
the uucp source and fixed the bug which was causing core dumps.
A memory fault was resulting from a call to prefix() with a
second argument which was garbage. In anlwrk.c, the function
iswrk(), the code

	static char **listp, *list[LLEN];
	...
	if (listp == NULL || *listp == NULL || listp > (list + LLEN)
	  || !prefix(pre, *listp)) {

obviously was checking one too far. Just change the > to >= so
the test line reads:

	if (listp == NULL || *listp == NULL || listp >= (list + LLEN)

Presto, problem solved. If you have source, you should fix it.
If you don't, get your P-E office to fix it. Since LLEN is 20,
the problem appears if you have >40 files to process for the same
site at one time.

(We had a backlog of 862 files in /usr/spool/uucp, which was what
encouraged me to track down the bug!)

Dave Sherman
The Law Society of Upper Canada
-- 
{utzoo pesnta nrcaero utcs hcr}!lsuc!dave
{allegra decvax ihnp4 linus}!utcsri!lsuc!dave