Division by zero in innreport

Petr Novopashenniy pety at rusnet.ru
Wed Jan 18 14:44:06 UTC 2012


Good day, Julien!

On Tue, 17 Jan 2012, Julien ?LIE wrote:

JL> Hi Petr,
JL> 
JL> > After patching, I get this error:
JL> > "
JL> > Day '29' out of range 1..28 at /usr/local/news/bin/innreport line 771
JL> > "
JL> 
JL> What is the result of a search for 'Feb 28' and 'Feb 29' in
JL> your <pathhttp>/innreport.db file?
JL> 

<dd>

[news at goblin /usr/local/www/News/stats/goblin1]$ grep 'Feb 28' 
innreport.db
news-notice.2011.02.28-03.00.03.html|Feb 28 03:00:03 -- Mar  1 
03:00:03|8297897|626946|59.1 GB|22603757|4487147|182.5 GB
news-notice.2011.02.27-03.00.03.html|Feb 27 03:00:03 -- Feb 28 
03:00:03|7866524|637928|67.5 GB|20556159|4501693|195.4 GB
news-notice.2010.02.28-03.00.01.html|Feb 28 03:00:01 -- Mar  1 
03:00:01|9138035|562029|60.7 GB|21667090|2790506|116.3 GB
news-notice.2010.02.27-03.00.02.html|Feb 27 03:00:02 -- Feb 28 
03:00:01|10906787|546110|500.8 MB|15493521|1929150|75.8 GB
news-notice.2009.02.28-03.00.01.html|Feb 28 03:00:01 -- Mar  1 
03:00:02|13817111|658743|73.3 GB|29274366|4145309|170.0 GB
news-notice.2009.02.27-03.00.01.html|Feb 27 03:00:01 -- Feb 28 
03:00:01|16240534|765696|82.7 GB|32233114|4180602|165.0 GB
news-notice.2008.02.28-03.00.01.html|Feb 28 03:00:01 -- Feb 29 
03:00:01|12604185|686458|54.4 GB|24431086|2380133|62.5 GB
news-notice.2008.02.27-03.00.02.html|Feb 27 03:00:02 -- Feb 28 
03:00:01|10514460|579555|64.7 GB|22229114|2191693|62.3 GB
news-notice.2007.02.28-03.00.07.html|Feb 28 03:00:07 -- Mar  1 
03:00:07|5512555|1347482|257.0 GB|578233|106444|28.7 GB
news-notice.2007.02.27-03.00.05.html|Feb 27 03:00:05 -- Feb 28 
03:00:05|4531307|1265399|274.9 GB|4413924|678971|187.4 GB

[news at goblin /usr/local/www/News/stats/goblin1]$ grep 'Feb 29' 
innreport.db
news-notice.2008.02.28-03.00.01.html|Feb 28 03:00:01 -- Feb 29 
03:00:01|12604185|686458|54.4 GB|24431086|2380133|62.5 GB
news-notice.2007.03.01-00.00.00.html|Mar  1 00:00:00 -- Feb 29 
23:59:59|11118619|669692|83.2 GB|25398255|3043507|68.5 GB


JL> 
JL> I see your issue if I change 2004 to 2003 in the last lines.
JL> However, such a date should not have been generated; that's why
JL> I am intrigued by the contents of your innreport.db file.
JL> 
JL> 
JL> 
JL> Hmmm...  Having a look at:
JL>     http://news.neva.ru/news/News/stats/goblin1/index.html
JL> 
JL> I see in 2007:
JL> 
JL> Mar 1 03:00:07 -- Mar 2 03:00:05
JL> Mar 1 00:00:00 -- Feb 29 23:59:59
JL> Feb 28 03:00:07 -- Mar 1 03:00:07
JL> Feb 27 03:00:05 -- Feb 28 03:00:05
JL> 
JL> The line for "Mar 1 00:00:00 -- Feb 29 23:59:59" looks very suspicious.
JL> goblin2 and goblin3 were not active in 2007 so I can check only on goblin1.
JL> 
JL> 
JL> I would suggest to remove the line for "Mar 1 00:00:00 -- Feb 29 23:59:59"
JL> in innreport.db to fix the problem.
JL> Maybe it has been generated by a previous version of innreport that had a bug;
JL> yet, it seems strange that it occurred in 2007 (a non-leap year)!!

Ok, I remove this strange line from innreport.db, and wait nightly report 
now.

--pety



More information about the inn-workers mailing list