tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47158] New: I think AccessLogValve has race condition problem
Date Tue, 05 May 2009 22:12:47 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47158

           Summary: I think AccessLogValve has race condition problem
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: xxd82329@gmail.com


"Double-Checked Locking" pattern is heavily used in this class, but the usage
of it in AccessLogValve has some issues of race condition judging by this
article: http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

Based by this article, I think these variables in this class should be declared
as volatile to get rid of race condition: 

private volatile long currentMillis;

private volatile  Date currentDate;

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

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


Mime
View raw message