Bug #41593 Logic error in FileAppender breaks logs tab when files hit rotation limit
Submitted: 18 Dec 2008 16:23 Modified: 29 Jan 2009 13:55
Reporter: Josh Sled Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Web Severity:S3 (Non-critical)
Version:2.0 OS:Any
Assigned to: Josh Sled CPU Architecture:Any

[18 Dec 2008 16:23] Josh Sled
Description:
Inevitably, the logs files will rotate to the maximum allowed by the log4j config.  At this point, the metadata contained in the FileAppender will become out of sync due to a logic bug.  This will cause an assertion error on any subsequent request for the logs tab/data.

This issue will affect every customer (if/when they use the logs tabs).

How to repeat:
Start instance, wait for 10 log rotations, try logs tab.

Suggested fix:
Fix bug.
[18 Dec 2008 16:35] Josh Sled
revno: 6553
revision-id: jsled@asynchronous.org-20081218162605-46td897kb2ck36xy
parent: andy.bang@sun.com-20081218015559-os2l7n3td0og5ije
committer: Josh Sled <jsled@asynchronous.org>
branch nick: 2.0
timestamp: Thu 2008-12-18 11:26:05 -0500
message:
  Bug#41593: fix logic error in FileAppender metadata maintenance when max file rotation limit hit; add regression test.
[8 Jan 2009 5:35] Bill Weber
with build 2.0.2.7128 the mysql-monitor.log file doesn't seem to be getting rotated (i have one that's 1.3G) - also, it still gets the FileAppender error when clicking on the log link
[8 Jan 2009 14:34] Josh Sled
What's the "log4j.properties" relevant to that installation.
[21 Jan 2009 19:07] Josh Sled
branches/2.0:

revno: 6579
revision-id: jsled@asynchronous.org-20090121174656-8l3tfwgqjvc7grq9
parent: aggie@sun.com-20090121182215-4f012wfrahddxlh3
committer: Josh Sled <jsled@asynchronous.org>
branch nick: 2.0
timestamp: Wed 2009-01-21 12:46:56 -0500
message:
  Bug#41593: fix FileAppender file rotation meta-data maintenance bug; improve unit test and actaully add it to the suite.

trunk/:

revno: 6598
revision-id: jsled@asynchronous.org-20090121155618-n0wsoadcsb4pygi9
parent: eric@mysql.com-20090121132329-391sirxfihfya0xe
committer: Josh Sled <jsled@asynchronous.org>
branch nick: local
timestamp: Wed 2009-01-21 10:56:18 -0500
message:
  Bug#41593: fix FileAppender file rotation meta-data maintenance bug; improve unit test and actaully add it to the suite.
[28 Jan 2009 23:08] Bill Weber
verified fixed in build 2.0.4.7141
[29 Jan 2009 13:55] Tony Bedford
An entry was added to the 2.0.4 changelog:

When the log files rotated to the maximum allowed by the log4j configuration, the metadata contained in the FileAppender became out of synchronization due to a logic bug. This caused an assertion error on any subsequent request for the logs tab or data.