Our Forums are now closed. Please go to our Google Mailing List for help. This site will remain open for historical purposes.
ColdBox Framework Forums Home | Profile | Search | Login | RSS

 pdf Print PDF   Previous Page  Page: 1   Next Page

Thread: Stack Overflow possible in logger.cfc
Created on: 03/15/10 01:37 PM Replies: 3
RyanLynch


Joined: 03/15/10
Posts: 3
Stack Overflow possible in logger.cfc
03/15/10 1:37 PM

Coldbox Version: 2.6.4

Server Details:

Server Product: ColdFusion

Version: 9,0,0,251028

Edition: Developer

Operating System: Windows XP

OS Version: 5.1

Adobe Driver Version: 4.0 (Build 0005)


Description:

An infinite recursive loop in logger.cfc resulting in a stack overflow. (see first trace in attached file).

Cause:

Within the logEntry function (starts at coldbox.system.plugins.logger, line 249) there is a call to the checkRotation function (starts coldbox.system.plugins.logger, line 482; called at line 280) to rotate and archive log files. Within the check rotation function there is a try/catch structure, and within the catch block logEntry is called (coldbox.system.plugins.logger, line 517). It is possible that an error occuring within the try/catch structure in checkRotation (coldbox.system.plugins.logger lines 489-515) can lead to an infinite recursion between logEntry and checkRotation, resulting eventually in a stack overflow. I commented out the try/catch structure, and determined that the error in my case that triggered the catch in checkRotation was a CouldNotDeleteFileException (see second trace in attached file), however it's possible that any error triggering the catch could lead to an infinite loop.
Link | Top | Bottom
RyanLynch


Joined: 03/15/10
Posts: 3
RE: Stack Overflow possible in logger.cfc
03/15/10 1:38 PM
Attachment: trace.txt

Not sure if the stack trace was attached to the previous post. It is attached to this one.
Link | Top | Bottom
lmajano
Veteran Master

Joined: 01/29/05
Posts: 1209
RE: Stack Overflow possible in logger.cfc
03/15/10 1:43 PM

The logging has been completely reworked for 3.0 into the LogBox library and this issue was addressed.
Luis Majano
Link | Top | Bottom
RyanLynch


Joined: 03/15/10
Posts: 3
RE: Stack Overflow possible in logger.cfc
03/15/10 1:55 PM

Good to know. I didn't see a ticket for it, but looking at the logging classes in 3.0 I can see that code has been reworked.
Link | Top | Bottom

Galleon Forums V1.7.008 was created by Raymond Camden