You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2006/08/30 01:31:21 UTC

DO NOT REPLY [Bug 40303] - Time order problem in multithreaded environment

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40303>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40303


carnold@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Additional Comments From carnold@apache.org  2006-08-29 23:31 -------
This is a known cosmetic defect in log4j, though I could not find a previously logged bug in a search.  
Previously discussed in a thread on log4j-user in late August, early Sept 2005, see http://
marc.theaimsgroup.com/?l=log4j-user&m=112567762307503&w=2.

Basically, getting timestamp occurs in one synchronization block and output to the appender in 
another.  There is no guarantee that the thread that got the first timestamp will be the first to be 
released if the thread blocks in the later block.  If the issue is significant for you, then I would 
recommend using the "new" AsyncAppender (in the SVN but not in 1.2.13 or 1.3 alpha 9) with 
blocking=false.  This should minimize the potential for threads to block in a manner that would 
misorder the timestamps.

After much research and discussion, I'm convinced that there is no simple solution to the problem that 
would not potentially add significant compatibility issues.  Maybe in log4j 2.0, this could be addressed.  
But not in log4j 1.2 or 1.3. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org