DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483





--- Comment #7 from Tony <[EMAIL PROTECTED]>  2008-04-04 01:35:47 PST ---
Is this bug going to be fixed and what additional comments you may need? As we
know it's very hard to reproduce this errors.

Thanks


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEEDINFO|NEW




--- Comment #8 from Mark Thomas <[EMAIL PROTECTED]>  2008-04-04 02:03:22 PST ---
Yes it will be fixed.

To answer the obvious next question: "When?" - when someone gets to it. There
are current ~170 open bugs against TC5 and TC6. A patch will speed the process
up but one that uses syncs is likely to get rejected.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483





--- Comment #9 from Peter Rossbach <[EMAIL PROTECTED]>  2008-04-04 05:26:40 PST 
---
The question is also: How we can fix it:
Critical section at AccessLogValve is (LL 581 (current tomcat 5.5 trunk): 
result.append("[");
result.append(dayFormatter.format(date));   // Day
result.append('/');
result.append(lookup(monthFormatter.format(date))); // Month
result.append('/');
result.append(yearFormatter.format(date));  // Year
result.append(':');
result.append(timeFormatter.format(date));  // Time
result.append(space);
result.append(getTimeZone(date));   // Time Zone
result.append("] \"");

Not only the timeFormatter is the problem :-(

Option to fix:
a) synchronize the complete formatter access
 easy to implement, but can be a performance problem
b) use a cache with some threadLocals
 can be a memory leak at shrinking request thread pools
c) use some formatter object pools
 little implementation overhead and we must also use a sync datastructure!

Peter


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483





--- Comment #10 from Rainer Jung <[EMAIL PROTECTED]>  2008-04-04 05:34:35 PST 
---
Since we are collecting ideas:

- FastDateFormat from commons.lang
- Joda Time (also seems to be ASL licensed)

Both would add another foreign dependency but are thread safe in their
formatters. I didn't look at their performance though. A concurrent
microbenchmark could be adequate here.

Peter: why do you expect a leak, if we put the SimpleDateFormat into a
ThreadLocal? Do we have any indication, that when shrinking the pool, any
references to the removed Threads remain?


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483





--- Comment #11 from Tim Funk <[EMAIL PROTECTED]>  2008-04-04 05:52:05 PST ---
In this case - syncs aren't really that evil. All the syncing is occuring
during the logging phase. Which occurs after the request has been served to the
client.

So yes - there is a performance penalty for syncing but its not critical path
which will slow the server down. With the exception that you had run out of
workers - in which case you have bigger issues to deal with.


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 38483] access log valve uses simpledateformat in tread-unsafe way

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=38483





--- Comment #12 from Niall Pemberton <[EMAIL PROTECTED]>  2008-04-04 07:47:02 
PST ---
I don't see that theres a problem any more - the block that uses most (i.e. all
except fileDateFormatter) of the SimpleDateFormats is now in a synchronized
block:

synchronized (this) {
if (currentDate != date) {
StringBuffer current = new StringBuffer(32);
current.append('[');
current.append(dayFormatter.format(date)); // Day
current.append('/');
current.append(lookup(monthFormatter.format(date))); // Month
current.append('/');
current.append(yearFormatter.format(date)); // Year
current.append(':');
current.append(timeFormatter.format(date)); // Time
current.append(' ');
current.append(getTimeZone(date)); // Timezone
current.append(']');
currentDateString = current.toString();
currentDate = date;
}
}

...and fileDateFormatter is used in the rotate() method which is also
synchronized

Looks to me like this was resolved in the following revision:
http://svn.apache.org/viewvc?view=rev&revision=494191

But perhaps I'm looking at the wrong version - as code I see differs from what
Peter quotes (StringBuffer is called current rather than result)


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r644858 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2008-04-04 Thread fhanik
Author: fhanik
Date: Fri Apr  4 12:48:34 2008
New Revision: 644858

URL: http://svn.apache.org/viewvc?rev=644858&view=rev
Log:
fix sendfile, incorrect if else statements

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=644858&r1=644857&r2=644858&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Fri Apr  4 
12:48:34 2008
@@ -1607,10 +1607,11 @@
 }
 if ( sd.length <= 0 ) {
 attachment.setSendfileData(null);
-if ( sd.keepAlive ) 
+if ( sd.keepAlive ) {
 if (reg) reg(sk,attachment,SelectionKey.OP_READ);
-else 
+} else {
 cancelledKey(sk,SocketStatus.STOP,false);
+}
 } else if ( attachment.interestOps() == 0 && reg ) {
 reg(sk,attachment,SelectionKey.OP_WRITE);
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r644860 - /tomcat/trunk/webapps/docs/changelog.xml

2008-04-04 Thread fhanik
Author: fhanik
Date: Fri Apr  4 12:51:52 2008
New Revision: 644860

URL: http://svn.apache.org/viewvc?rev=644860&view=rev
Log:
doco update for the latest change

Modified:
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=644860&r1=644859&r2=644860&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Apr  4 12:51:52 2008
@@ -33,6 +33,14 @@
 
 
 
+  
+
+ 644858
+   Inproper curly brackets cause NIO/SendFile to fail. Workaround prior to 
this version, set
+   useSendFile="false" in the Connector element.
+   
+
+  
   
  
  634513



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r644861 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-04-04 Thread fhanik
Author: fhanik
Date: Fri Apr  4 12:54:17 2008
New Revision: 644861

URL: http://svn.apache.org/viewvc?rev=644861&view=rev
Log:
add proposal

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=644861&r1=644860&r2=644861&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 12:54:17 2008
@@ -127,3 +127,9 @@
   http://svn.apache.org/viewvc?rev=643497&view=rev
   +1: mark
   -1:
+
+* Fix NIO/Sendfile problem
+  http://svn.apache.org/viewvc?rev=644858&view=rev
+  http://svn.apache.org/viewvc?rev=644860&view=rev
+  +1: fhanik
+  -1: 
\ No newline at end of file



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r644865 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-04-04 Thread fhanik
Author: fhanik
Date: Fri Apr  4 12:56:32 2008
New Revision: 644865

URL: http://svn.apache.org/viewvc?rev=644865&view=rev
Log:
votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=644865&r1=644864&r2=644865&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 12:56:32 2008
@@ -120,7 +120,11 @@
   http://svn.apache.org/viewvc?rev=642819&view=rev (the fix)
   This is Remy's patch from comment #23 less the one bad line (comment #28)
   +1: markt, remm
-  -1: 
+  +1: fhanik - for the actual fix
+  -1: fhanik - for the code cleanup, makes it hard to look back, 
+  and since this code is now in its third fix stage, I would prefer it to  
+  be kept so that one can easily see change to change
+  +1 for the code cleanup in trunk
 
 * Document missing secret attributes
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44715



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r644871 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-04-04 Thread fhanik
Author: fhanik
Date: Fri Apr  4 13:01:59 2008
New Revision: 644871

URL: http://svn.apache.org/viewvc?rev=644871&view=rev
Log:
votes

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=644871&r1=644870&r2=644871&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Fri Apr  4 13:01:59 2008
@@ -63,20 +63,20 @@
 * Get o.a.c.valves.CometConnectionManagerValve working
   Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44646
   http://svn.apache.org/viewvc?rev=640273&view=rev
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * Provide more helpful error message when class can't load due to wrong version
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44633
   http://svn.apache.org/viewvc?rev=640451&view=rev
   http://svn.apache.org/viewvc?rev=640559&view=rev (Rainer's improvement)
-  +1: markt, rjung
+  +1: markt, rjung, fhanik
   -1:
 
 * Prevent the connector entering an infinite loop
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44620
   http://svn.apache.org/viewvc?rev=640572&view=rev
-  +1: markt
+  +1: markt, fhanik
   -1:
 
 * Fix issues with DirContextURLConnection has bugs:
@@ -87,30 +87,30 @@
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44611
   Patch provided by Chris Hubick
   http://svn.apache.org/viewvc?rev=640584&view=rev
-  +1: markt, remm (I wonder where these methods are used)
+  +1: markt, fhanik, remm (I wonder where these methods are used)
   -1:
 
 * Document packetSize attribute for AJP connector
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44541
   http://svn.apache.org/viewvc?rev=640994&view=rev
-  +1: markt, rjung
+  +1: markt, rjung, fhanik
   -1:
 
 * Fix ServletInputStream still readable when closed
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44673
   http://svn.apache.org/viewvc?rev=641076&view=rev
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * Fix CGI and env on vista (and prob, other OS's)
   http://svn.apache.org/viewvc?rev=642391&view=rev
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * No roles (deny all) trumps no auth-constraint (allow all)
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44529
   http://svn.apache.org/viewvc?rev=642542&view=rev
-  +1: markt, remm
+  +1: markt, remm, fhanik
   -1:
 
 * Fix reading of multi-byte request data
@@ -122,14 +122,14 @@
   +1: markt, remm
   +1: fhanik - for the actual fix
   -1: fhanik - for the code cleanup, makes it hard to look back, 
-  and since this code is now in its third fix stage, I would prefer it to  
-  be kept so that one can easily see change to change
+  and since this code is now in its third fix stage for something I 
believed could have been fixed simple, I would prefer it to  
+  be kept so that one can easily see change to change, without having to 
circumvent code cleanup and formatting
   +1 for the code cleanup in trunk
 
 * Document missing secret attributes
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44715
   http://svn.apache.org/viewvc?rev=643497&view=rev
-  +1: mark
+  +1: mark, fhanik
   -1:
 
 * Fix NIO/Sendfile problem



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 37794] getParameter() fails on POST with transfer-encoding: chunked

2008-04-04 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=37794


MJ <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #5 from MJ <[EMAIL PROTECTED]>  2008-04-04 15:18:59 PST ---
As of Tomcat 5.5.20 and Tomcat 6.0.16, this is still an open issue.  Any
status?


-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]