logengine crash on log messages with years in their timestamps

Bug #347776 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Morten Brekkevold

Bug Description

The logengine crashes when attempting to parse a log message containing a year in its origin timestamp. This results in a truncated log file and lots of discarded log messages.

The traceback, provided by Ronny Raudstein, is as follows:

Traceback (most recent call last):
File "logengine.py", line 298, in ?
message = createMessage(line)
File "logengine.py", line 123, in createMessage
oritime = DateTime.DateTime(year,month,day,hour,min)
TypeError: an integer is required

An example log message that will crash it:

Mar 20 10:27:26 sw_1 607977: Mar 20 2009 10:20:06: %SEC-6-IPACCESSLOGP: list fraVLAN800 denied tcp x.x.x.x(1380) -> y.y.y.y(80), 2 packets

Reference this nav-users thread: https://postlister.uninett.no/sympa/arc/nav-users/2009-03/msg00011.html (initially, it was thought that the message counter was the problem, but it turned out to be the year).

Tags: logengine
description: updated
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

Working on a series of patches for this.

1. The code sucks, so I'm slightly refactoring it to make it more legible.
2. Add error handling for situations like this.
3. Support years in timestamps

Changed in nav:
assignee: nobody → mvold
importance: Undecided → Medium
milestone: none → v3.5.3
status: New → In Progress
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.