From:	ADVAX::"mcnc!VM1.NoDak.EDU!ccc_rex%WAIKATO.AC.NZ" 13-MAR-1991 19:18:34.37
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Patch to fix hang if adding item into group being skimed

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Wed, 13 Mar 91 19:17:34 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA21754 for ; Wed, 13 Mar 91 18:26:01 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA10509; Wed, 13 Mar 91 16:30:47 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9103132130.AA10509@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 3397; Wed, 13 Mar 91 15:31:36 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 1563; Wed, 13 Mar 91 15:31:34 CST
Date:         Thu, 14 Mar 91 09:31:55 +1300
Reply-To: mcnc!VM1.NoDak.EDU!ccc_rex%WAIKATO.AC.NZ
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!ccc_rex%WAIKATO.AC.NZ
Subject:      Patch to fix hang if adding item into group being skimed
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
As I reported before we found that adding an item into the same newsgroup
that was being SKIM/ITEM'ed caused both processes to go into an infinite loop.
It seemed to be an RMS deadlock.
We are using ANU NEWS version 6.0-2 and VMS 5.3-1.
 
I seem to have found a solution.  I tried adding an item to a large
newsgroup that I was doing a SKIM/ITEM on, and it worked.
 
The file NEWSSKIM.C needs to be modified :-
before line 961  "if (sys$get(&grprab) & 1) {"  insert
 
        grprab.rab$l_rop = RAB$M_WAT | RAB$M_NLK;
 
and then after line 976 (the end of that if/else group)
 
      grprab.rab$l_rop = RAB$M_WAT;
 
The effect is just to read the record without locking it.
Before NEWSSKIM updates the group record it re-reads this record anyhow.
 
 
Another problem that I found was that DEFINEing NEWS_NNTP_LOG did not
cause all incoming batches of news to be logged by NNTP_TCPWINMULTINET.
In fact it only logged them if there was an error in the connection.
There is a call to log_to_file(1) in the routine cancel_net() but not one
in close_net().  I added
    log_to_file(1);
before
    sys$cancel(f_i);
 
Hope this is of use to someone.
 
 
Rex Croft     CCC_REX@WAIKATO.AC.NZ
VMS Systems Programmer
University of Waikato
Hamilton
New Zealand
