Division by zero in innreport

Julien ÉLIE julien at trigofacile.com
Tue Jan 17 20:55:43 UTC 2012


Hi Petr,

> After patching, I get this error:
> "
> Day '29' out of range 1..28 at /usr/local/news/bin/innreport line 771
> "

What is the result of a search for 'Feb 28' and 'Feb 29' in
your <pathhttp>/innreport.db file?

21:36 news at trigo /var/log/news/http% grep 'Feb 28' innreport.db
news-notice.2011.02.28-04.15.03.html|Feb 28 04:15:03 -- Mar  1 04:15:02|32222|3787|8.6 MB|38707|1803|4.8 MB
news-notice.2011.02.27-04.15.02.html|Feb 27 04:15:02 -- Feb 28 04:15:02|20548|2252|7.2 MB|33734|1377|3.6 MB
news-notice.2010.02.28-04.15.03.html|Feb 28 04:15:03 -- Mar  1 04:15:03|36788|3981|9.8 MB|51931|2616|6.6 MB
news-notice.2010.02.27-04.15.03.html|Feb 27 04:15:03 -- Feb 28 04:15:02|42328|4393|8.9 MB|53560|2606|5.9 MB
news-notice.2009.02.28-04.15.03.html|Feb 28 04:15:03 -- Mar  1 04:15:01|34943|3929|8.5 MB|47366|2216|6.0 MB
news-notice.2009.02.27-04.15.03.html|Feb 27 04:15:03 -- Feb 28 04:15:02|47363|5079|11.2 MB|60341|3299|9.0 MB
news-notice.2004.02.29-04.15.03.html|Feb 29 04:15:03 -- Mar  1 04:15:02|32222|3787|8.6 MB|38707|1803|4.8 MB
news-notice.2004.02.28-04.15.03.html|Feb 28 04:15:03 -- Feb 29  1 04:15:02|32222|3787|8.6 MB|38707|1803|4.8 MB
21:36 news at trigo /var/log/news/http% grep 'Feb 29' innreport.db
news-notice.2004.02.29-04.15.03.html|Feb 29 04:15:03 -- Mar  1 04:15:02|32222|3787|8.6 MB|38707|1803|4.8 MB
news-notice.2004.02.28-04.15.03.html|Feb 28 04:15:03 -- Feb 29  1 04:15:02|32222|3787|8.6 MB|38707|1803|4.8 MB

I see your issue if I change 2004 to 2003 in the last lines.
However, such a date should not have been generated; that's why
I am intrigued by the contents of your innreport.db file.



Hmmm...  Having a look at:
    http://news.neva.ru/news/News/stats/goblin1/index.html

I see in 2007:

Mar 1 03:00:07 -- Mar 2 03:00:05
Mar 1 00:00:00 -- Feb 29 23:59:59
Feb 28 03:00:07 -- Mar 1 03:00:07
Feb 27 03:00:05 -- Feb 28 03:00:05

The line for "Mar 1 00:00:00 -- Feb 29 23:59:59" looks very suspicious.
goblin2 and goblin3 were not active in 2007 so I can check only on goblin1.


I would suggest to remove the line for "Mar 1 00:00:00 -- Feb 29 23:59:59"
in innreport.db to fix the problem.
Maybe it has been generated by a previous version of innreport that had a bug;
yet, it seems strange that it occurred in 2007 (a non-leap year)!!

-- 
Julien ÉLIE

« C'est une forêt vierge où la main de l'homme n'a jamais mis le
  pied. »



More information about the inn-workers mailing list