[news.software.b] c-news: Date: too far in the future???

alden@shape.mps.ohio-state.edu (Dave Alden) (03/29/91)

Ok - where did I blow it?  :-)  I installed the latest patches for C-News
and all of a sudden I dropped ~250 articles last night, ie:

Mar 29 01:54:43.684 uwm.edu - <BE1FF49A4E6000BD@YMIR.CLAREMONT.EDU> Date: too
far in the future: `29 Mar 91 04:35:00 GMT'

Now I'm 5 hours behind GMT, which means this message is "perfectly legal"
in regards to when it was posted and when I got it.  I thought c news was
supposed to accept articles with a date up to one day in advance?  Did I
blow something in the config?

...thnx,
...dave
--
 Dave Alden, System Programmer  MaBellNet: (614) 292-4962
 Department of Mathematics      FaxNet:    (614) 292-7174
 The Ohio State University      Internet:  alden@shape.mps.ohio-state.edu
 231 W 18th Avenue              UUCP:      ...!osu-cis!alden
 Columbus, OH USA 43210         BITNET:    alden@ohstpy

rickert@mp.cs.niu.edu (Neil Rickert) (03/29/91)

In article <1991Mar29.151419.8855@zaphod.mps.ohio-state.edu> alden@shape.mps.ohio-state.edu (Dave Alden) writes:
>
>Ok - where did I blow it?  :-)  I installed the latest patches for C-News
>and all of a sudden I dropped ~250 articles last night, ie:
>
>Mar 29 01:54:43.684 uwm.edu - <BE1FF49A4E6000BD@YMIR.CLAREMONT.EDU> Date: too
>far in the future: `29 Mar 91 04:35:00 GMT'

 An obvious guess is that perhaps someone accidently set your time to 1990 by
mistake, and it went unnoticed for a while.

 I don't know how you would tell whether this guess is true - perhaps look at
some mail headers of messages processed at that time.  Anyway, adding the
year to the log message in ~news/log would be helpful in these cases.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

geoff@world.std.com (Geoff Collyer) (03/30/91)

alden@shape.mps.ohio-state.edu (Dave Alden) writes:
>Now I'm 5 hours behind GMT, which means this message is "perfectly legal"
>in regards to when it was posted and when I got it.  I thought c news was
>supposed to accept articles with a date up to one day in advance?  Did I
>blow something in the config?

Hmmm, I'm not quite sure what the problem is here, but relaynews notes the
current time when it processes the first article and uses that as its notion
of "now".  An *extremely* long-running relaynews (i.e. one that ran for
several hours) could run into trouble.  This is extremely unlikely given the
software as distributed, but ghod only knows what people get up to...
-- 
Geoff Collyer		world.std.com!geoff, uunet.uu.net!geoff

brendan@cs.widener.edu (Brendan Kehoe) (03/30/91)

In <1991Mar29.151419.8855@zaphod.mps.ohio-state.edu>, alden@shape.mps.ohio-state.edu writes:
>
>Ok - where did I blow it?  :-)  I installed the latest patches for C-News
>and all of a sudden I dropped ~250 articles last night, ie:
>
>Mar 29 01:54:43.684 uwm.edu - <BE1FF49A4E6000BD@YMIR.CLAREMONT.EDU> Date: too
>far in the future: `29 Mar 91 04:35:00 GMT'
>
>Now I'm 5 hours behind GMT, which means this message is "perfectly legal"
>in regards to when it was posted and when I got it.  I thought c news was
>supposed to accept articles with a date up to one day in advance?  Did I
>blow something in the config?

    I had the same problem (~400 out of 8000+); so I decided for the
   time being to just take out the offending test. (Posts made 4 or 5
   minutes before I got it were dying, so I figured something had to
   be fudged.)

-- cut --
*** relay/procart.c.~1~	Mon Mar 25 13:10:22 1991
--- relay/procart.c	Tue Mar 26 16:06:11 1991
***************
*** 346,356 ****
  	} else if ((date = getindate(hdrs->h_date, (struct timeb *)NULL)) == -1) {
  		prefuse(art);
  		(void) printf("unparsable Date: `%s'\n", hdrs->h_date);
! 	} else if (date > now + CLOCKSLOP) {
  		prefuse(art);
  		(void) printf("Date: too far in the future: `%s'\n",
  			hdrs->h_date);
! 	} else if (staledays > 0 && date < datestale) {
  		prefuse(art);
  		(void) printf("older than %d days\n", staledays);
  	} else if (hopcount(hdrs->h_path) > 0 &&
--- 346,356 ----
  	} else if ((date = getindate(hdrs->h_date, (struct timeb *)NULL)) == -1) {
  		prefuse(art);
  		(void) printf("unparsable Date: `%s'\n", hdrs->h_date);
! /*	} else if (date > now + CLOCKSLOP) {
  		prefuse(art);
  		(void) printf("Date: too far in the future: `%s'\n",
  			hdrs->h_date);
! */	} else if (staledays > 0 && date < datestale) {
  		prefuse(art);
  		(void) printf("older than %d days\n", staledays);
  	} else if (hopcount(hdrs->h_path) > 0 &&

-- cut --
-- 
     Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widener.edu
  Widener University in Chester, PA                A Bloody Sun-Dec War Zone
 Now that we know he has ID, we could give him an account. finger bush@cs....

brendan@cs.widener.edu (Brendan Kehoe) (03/30/91)

In <XGK_D2#@cs.widener.edu>, I wrote:
>In <1991Mar29.151419.8855@zaphod.mps.ohio-state.edu>, alden@shape.mps.ohio-state.edu writes:
>>Ok - where did I blow it?  :-)  I installed the latest patches for C-News
>>and all of a sudden I dropped ~250 articles last night, ie:
>>
>>Mar 29 01:54:43.684 uwm.edu - <BE1FF49A4E6000BD@YMIR.CLAREMONT.EDU> Date: too
>>far in the future: `29 Mar 91 04:35:00 GMT'
>
>    I had the same problem (~400 out of 8000+); so I decided for the
>   time being to just take out the offending test. (Posts made 4 or 5
>   minutes before I got it were dying, so I figured something had to
>   be fudged.)

  That's what I get for responding right away .. it turns out that the
 problem is with Dave Alden's relaynews patch -- since it's running
 as a daemon, 'now' [in the (date > now + CLOCKSLOP) test] remains the
 same, so after a day things start getting interesting. He's in the
 process of patching it now.

-- 
     Brendan Kehoe - Widener Sun Network Manager - brendan@cs.widener.edu
  Widener University in Chester, PA                A Bloody Sun-Dec War Zone
 Now that we know he has ID, we could give him an account. finger bush@cs....

henry@zoo.toronto.edu (Henry Spencer) (03/30/91)

In article <HHK_Q8#@cs.widener.edu> brendan@cs.widener.edu (Brendan Kehoe) writes:
>>    I had the same problem ...
>
>  That's what I get for responding right away .. it turns out that the
> problem is with Dave Alden's relaynews patch ...

I would remind everyone using C News of the following condition from our
copyright notice:

 * 3. Altered versions must be plainly marked as such, and must not be
 *    misrepresented as being the original software...

You use C News on condition that you not misrepresent it.  When reporting
problems like this, please describe your software as "C News with Dave
Alden's modifications", not "C News".  We do not stand behind any software
not shipped with our distribution, and we find it quite unpleasant to
spend time worrying about and investigating what turns out to be somebody
else's mistake.

We are fussy about quality control; it pleases us immensely when people
send mail saying things like "I only wish the vendors we pay money to
were half so conscientious".  Some of the software people have published
for use with C News has been good stuff.  Some of it basically works but
could use improvements in robustness and response to problems.  Some of
it, alas, is wretched sludge.  We don't officially endorse any of it
as part of C News; please be specific about what you run.

(We hope to eventually include the better stuff in our distribution,
authors permitting, although we've been very busy and our to-be-looked-at
pile is large.)
-- 
"The stories one hears about putting up | Henry Spencer @ U of Toronto Zoology
SunOS 4.1.1 are all true."  -D. Harrison|  henry@zoo.toronto.edu  utzoo!henry

jef@well.sf.ca.us (Jef Poskanzer) (03/31/91)

>Date: 1 Apr 91 00:00:00 GMT
>From: spaf@cs.purdue.EDU (Gene Spafford)
>Subject: Warning: April Fools Time again (forged messages on the loose!)

Heh!
---
Jef

  Jef Poskanzer  jef@well.sf.ca.us  {apple, ucbvax, hplabs}!well!jef
 If you were walking along the seashore and saw an attorney and an IRS
          agent drowning, would you eat lunch or take a nap?

urlichs@smurf.sub.org (Matthias Urlichs) (03/31/91)

In news.software.b, article <HHK_Q8#@cs.widener.edu>,
  brendan@cs.widener.edu (Brendan Kehoe) writes:
< >
< >    I had the same problem (~400 out of 8000+); so I decided for the
< >   time being to just take out the offending test. (Posts made 4 or 5
< >   minutes before I got it were dying, so I figured something had to
< >   be fudged.)
< 
<   That's what I get for responding right away .. it turns out that the
<  problem is with Dave Alden's relaynews patch -- since it's running
<  as a daemon, 'now' [in the (date > now + CLOCKSLOP) test] remains the
<  same, so after a day things start getting interesting. He's in the
<  process of patching it now.
< 
That shouldn't happen -- see the C News copyright statement.
Besides, the patch involves three lines (making the static variable "now", in
procart.c, external, and zeroing it in the main loop) and is pretty trivial.
 -- Once you know that the bug exists, that is. :-(

Incidentally, another problem with these patches is that they stop
compressed batches from working because there's no more newsrun trying to
uncompress them any more.
My fix was to create a special "crnews" script to send compressed batches to
which uncompresses the news as they come in and passes them to rnews. I
suppose it's equally possible to pipe directly into relaynews.

Other than that, running relaynews as daemon and letting nntpd create a file
per article seems to work OK. The daemon mode shoud probably be part of C News
proper, if only to make sure that such mistakes as the above don't happen
again.  ;-)


-- 
Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de     /(o\
Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49-721-621127(0700-2330)   \o)/

alden@shape.mps.ohio-state.edu (Dave Alden) (04/01/91)

In article <1991Mar30.092412.5046@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
>You use C News on condition that you not misrepresent it.  When reporting
>problems like this, please describe your software as "C News with Dave
>Alden's modifications", not "C News".

Oh boy - my name in lights - just what my ma and pa always wanted, they'll
be so proud.  :-)

>We do not stand behind any software not shipped with our distribution, and
>we find it quite unpleasant to spend time worrying about and investigating
>what turns out to be somebody else's mistake.

Understandable.  I'd like to thank Geoff for his pointer to what the
problem was and I hope the two of you feel better real soon now.  :-)

...dave

ps  For those of you who might be interested in seeing some of the "good
    stuff", or maybe the "works but could use improvements in robustness
    and response to problems" - or maybe it's the "wretched sludge", you
    be the judge.  :-)  Anyway - I've made some patches to relaynews to
    add a new "daemon" mode - this way you only have to start relaynews
    once and it runs forever, watching for new news in the in.coming spool
    directory.  If you're interested the patches can be found on:

    shape.mps.ohio-state.edu[128.146.7.200]:/pub/nntplink/relaynews.daemon.Z

    If you don't have access to the Internet drop me a line and I'll gladly
    mail them to you.

david@elroy.jpl.nasa.gov (David Robinson) (04/02/91)

In article <0HL_7MB@smurf.sub.org> urlichs@smurf.sub.org (Matthias Urlichs) writes:
>Incidentally, another problem with these patches is that they stop
>compressed batches from working because there's no more newsrun trying to
>uncompress them any more.
>My fix was to create a special "crnews" script to send compressed batches to
>which uncompresses the news as they come in and passes them to rnews. I
>suppose it's equally possible to pipe directly into relaynews.
>
>Other than that, running relaynews as daemon and letting nntpd create a file
>per article seems to work OK. The daemon mode shoud probably be part of C News
>proper, if only to make sure that such mistakes as the above don't happen
>again.  ;-)

The solution that we use is to place all the NNTP "batches" into
NEWSPOOL/in.nntp and run the daemon relaynews with the -S option to
change the default directory.  Batches that arrive compressed via UUCP
are placed in the normail in.coming directory and get picked up by
the normal newsrun processing.  No code needs to be changed or special
scripts run.

	-David

-- 
David Robinson	david@elroy.jpl.nasa.gov 	{decwrl,usc,ames}!elroy!david
Disclaimer: No one listens to me anyway!
"Once a new technology rolls over you, if you're not part of the steamroller,
 you're part of the road." - Stewart Brand