Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!mcdphx!udc!darrell From: darrell@urbana.mcd.mot.com (Darrell McIntosh) Newsgroups: news.software.b Subject: Problem with C news addmissing (actually histdups) Message-ID: <1991Mar5.184229.10851@urbana.mcd.mot.com> Date: 5 Mar 91 18:42:29 GMT Sender: news@urbana.mcd.mot.com (news) Organization: Motorola Computer Group, Urbana Design Center Lines: 43 Originator: darrell@urbana.mcd.mot.com Nntp-Posting-Host: cheyenne.urbana.mcd.mot.com We've been running C news (Patchdate 15-Dec-1990) on our system here for the past month and it's been great - barely any problems. However, yesterday I decided to run addmissing from cron overnight and ran into a problem. I got a complaint from histslash saying that an assert had failed: histslash urping on Assertion failed: last != NULL, file histslash.c, line 33 /usr/tools/local/contrib/cnews/bin/maint/addmissing: 9795 abort - core dumped I did a little investigating and found the source of the problem. In addmissing there is a command line that looks like comm -13 /tmp/hist$$ /tmp/tree$$ | histinfo | sort | awk -f $NEWSBIN/expire/histdups | histslash >/tmp/new$$ The comm command found no differences in the two files (meaning I didn't have any missing files). Things in the pipeline worked fine until it got to the awk script which added a null line to the pipe. (In the END portion of the awk script it fails to check if the script had read anything.) The null line causes histslash to fail the assert. The following context diff is a fix for the problem in expire/histdups: *** histdups.old Tue Mar 5 12:15:42 1991 --- histdups Tue Mar 5 12:15:49 1991 *************** *** 11,14 **** } else names = names " " $3 } ! END { print mesgid, dates, names } --- 11,16 ---- } else names = names " " $3 } ! END { if (mesgid != "") ! print mesgid, dates, names ! } -- Darrell McIntosh, Motorola Computer Group, Urbana Design Center Email: darrell@urbana.mcd.mot.com, udc!darrell, uunet!uiucuxc!udc!darrell