svn commit: r1701023 - in /tomcat/trunk/java/org/apache/catalina/connector: InputBuffer.java OutputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 13:45:39 2015
New Revision: 1701023

URL: http://svn.apache.org/r1701023
Log:
Refactor. Remove duplicate constants

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701023=1701022=1701023=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
13:45:39 2015
@@ -54,9 +54,6 @@ public class InputBuffer extends Reader
 
 // -- Constants
 
-
-public static final String DEFAULT_ENCODING =
-org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 public static final int DEFAULT_BUFFER_SIZE = 8*1024;
 
 // The buffer can be used for byte[] and char[] reading
@@ -65,8 +62,8 @@ public class InputBuffer extends Reader
 public final int CHAR_STATE = 1;
 public final int BYTE_STATE = 2;
 
-// - Instance Variables
 
+// - Instance Variables
 
 /**
  * The byte buffer.
@@ -564,7 +561,7 @@ public class InputBuffer extends Reader
 
 gotEnc = true;
 if (enc == null) {
-enc = DEFAULT_ENCODING;
+enc = org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 }
 conv = encoders.get(enc);
 if (conv == null) {

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1701023=1701022=1701023=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Thu Sep  
3 13:45:39 2015
@@ -51,8 +51,6 @@ public class OutputBuffer extends Writer
 
 // -- Constants
 
-public static final String DEFAULT_ENCODING =
-org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 public static final int DEFAULT_BUFFER_SIZE = 8*1024;
 
 
@@ -565,7 +563,7 @@ public class OutputBuffer extends Writer
 }
 
 if (enc == null) {
-enc = DEFAULT_ENCODING;
+enc = org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 }
 
 final Charset charset = B2CConverter.getCharset(enc);



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



svn commit: r1701021 - /tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 13:41:13 2015
New Revision: 1701021

URL: http://svn.apache.org/r1701021
Log:
Refactor: reduce visibility

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1701021=1701020=1701021=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Thu Sep  
3 13:41:13 2015
@@ -558,7 +558,7 @@ public class OutputBuffer extends Writer
 }
 
 
-protected void setConverter() throws IOException {
+private void setConverter() throws IOException {
 
 if (coyoteResponse != null) {
 enc = coyoteResponse.getCharacterEncoding();



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



svn commit: r1701027 - in /tomcat/trunk/java/org/apache: catalina/connector/CoyoteAdapter.java catalina/connector/OutputBuffer.java catalina/connector/Response.java tomcat/util/buf/C2BConverter.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 14:00:09 2015
New Revision: 1701027

URL: http://svn.apache.org/r1701027
Log:
Experiment with a static cache of C2BConverter objects rather than a per 
request cache that gets cleared every time the request switches to async mode.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/trunk/java/org/apache/catalina/connector/Response.java
tomcat/trunk/java/org/apache/tomcat/util/buf/C2BConverter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1701027=1701026=1701027=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Sep  
3 14:00:09 2015
@@ -308,7 +308,6 @@ public class CoyoteAdapter implements Ad
 // Clear converters so that the minimum amount of memory
 // is used by this processor
 request.clearEncoders();
-response.clearEncoders();
 }
 }
 return success;
@@ -409,7 +408,6 @@ public class CoyoteAdapter implements Ad
 // Clear converters so that the minimum amount of memory
 // is used by this processor
 request.clearEncoders();
-response.clearEncoders();
 }
 }
 

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1701027=1701026=1701027=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Thu Sep  
3 14:00:09 2015
@@ -34,6 +34,7 @@ import org.apache.tomcat.util.buf.B2CCon
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.C2BConverter;
 import org.apache.tomcat.util.buf.CharChunk;
+import org.apache.tomcat.util.collections.SynchronizedStack;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -49,10 +50,14 @@ public class OutputBuffer extends Writer
 
 private static final StringManager sm = 
StringManager.getManager(OutputBuffer.class);
 
-// -- Constants
-
 public static final int DEFAULT_BUFFER_SIZE = 8*1024;
 
+/**
+ * Encoder cache.
+ */
+private static final ConcurrentHashMap encoders =
+new ConcurrentHashMap<>();
+
 
 // - Instance Variables
 
@@ -117,12 +122,6 @@ public class OutputBuffer extends Writer
 
 
 /**
- * List of encoders.
- */
-protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
-
-
-/**
  * Current char to byte converter.
  */
 protected C2BConverter conv;
@@ -234,6 +233,7 @@ public class OutputBuffer extends Writer
 
 if (conv != null) {
 conv.recycle();
+encoders.get(conv.getCharset()).push(conv);
 conv = null;
 }
 
@@ -242,14 +242,6 @@ public class OutputBuffer extends Writer
 
 
 /**
- * Clear cached encoders (to save memory for async requests).
- */
-public void clearEncoders() {
-encoders.clear();
-}
-
-
-/**
  * Close the output buffer. This tries to calculate the response size if
  * the response has not been committed yet.
  *
@@ -567,11 +559,16 @@ public class OutputBuffer extends Writer
 }
 
 final Charset charset = B2CConverter.getCharset(enc);
-conv = encoders.get(charset);
+SynchronizedStack stack = encoders.get(charset);
+if (stack == null) {
+stack = new SynchronizedStack<>();
+encoders.putIfAbsent(charset, stack);
+stack = encoders.get(charset);
+}
+conv = stack.pop();
 
 if (conv == null) {
 conv = createNewConverter(charset);
-encoders.put(charset, conv);
 }
 }
 
@@ -635,6 +632,10 @@ public class OutputBuffer extends Writer
 bytesWritten = 0;
 charsWritten = 0;
 if (resetWriterStreamFlags) {
+if (conv != null) {
+conv.recycle();
+encoders.get(conv.getCharset()).push(conv);
+}
 conv = null;
 enc = null;
 }

Modified: tomcat/trunk/java/org/apache/catalina/connector/Response.java
URL: 

buildbot success in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/201

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1701023
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #4 from Mark Thomas  ---
Given bug 57799 which suggests that there might be a concurrency issue with
NIO2 and TLS it might be worth taking a closer look at the stack traces in this
report to see if they offer any clues.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1701020 - /tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 13:40:48 2015
New Revision: 1701020

URL: http://svn.apache.org/r1701020
Log:
Refactor. Move C2BConverter creation into a dedicated method.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1701020=1701019=1701020=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Thu Sep  
3 13:40:48 2015
@@ -572,28 +572,33 @@ public class OutputBuffer extends Writer
 conv = encoders.get(charset);
 
 if (conv == null) {
-if (Globals.IS_SECURITY_ENABLED){
-try {
-conv = AccessController.doPrivileged(
-new PrivilegedExceptionAction(){
+conv = createNewConverter(charset);
+encoders.put(charset, conv);
+}
+}
 
-@Override
-public C2BConverter run() throws IOException{
-return new C2BConverter(charset);
-}
+
+private static C2BConverter createNewConverter(Charset charset) throws 
IOException {
+if (Globals.IS_SECURITY_ENABLED){
+try {
+return AccessController.doPrivileged(
+new PrivilegedExceptionAction(){
+@Override
+public C2BConverter run() throws IOException{
+return new C2BConverter(charset);
 }
-);
-} catch (PrivilegedActionException ex) {
-Exception e = ex.getException();
-if (e instanceof IOException) {
-throw (IOException)e;
-}
+}
+);
+} catch (PrivilegedActionException ex) {
+Exception e = ex.getException();
+if (e instanceof IOException) {
+throw (IOException) e;
+} else {
+throw new IOException(ex);
 }
-} else {
-conv = new C2BConverter(charset);
 }
-
-encoders.put(charset, conv);
+} else {
+return new C2BConverter(charset);
 }
 }
 



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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #3 from Remy Maucherat  ---
No idea, it sounds too specific to the NIO2 behavior. Sure the completion
handler is going to be called directly by the main thread pool, but only once
per IO operation, and since a read cannot occur until the previous one is done
it's fine as is.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1701027 - in /tomcat/trunk/java/org/apache: catalina/connector/CoyoteAdapter.java catalina/connector/OutputBuffer.java catalina/connector/Response.java tomcat/util/buf/C2BConverter.ja

2015-09-03 Thread Mark Thomas
On 03/09/2015 15:00, ma...@apache.org wrote:
> Author: markt
> Date: Thu Sep  3 14:00:09 2015
> New Revision: 1701027
> 
> URL: http://svn.apache.org/r1701027
> Log:
> Experiment with a static cache of C2BConverter objects rather than a per 
> request cache that gets cleared every time the request switches to async mode.

My simple performance test with a HelloWorld servlet shows no measurable
performance impact of this change. I was concerned the static cache
would be a bottleneck but it is such a short code path it doesn't seem
to have an impact.

This change should improve performance when switching between non-async
and async request processing as well as reduced GC.

I intend to make similar changes to the InputBuffer on the request side
next.

Mark

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



[Bug 58323] Client passing away causes Log.ERROR messages

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58323

benjamin.gehrels_exter...@immobilienscout24.de changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---

--- Comment #2 from benjamin.gehrels_exter...@immobilienscout24.de ---
I am not quite sure about that. I would say, if it would be critical, it would
have been the Servlets responsibility to have done a
try-catch-log-rethrowAsServletException. If it failed to do so, its worth maybe
a warn, but not an error.

We had that discussion on the Spring MVC Jira
(https://jira.spring.io/browse/SPR-12745 ) and after reading the comments
there, i am not quite sure if the Servlet is even allowed to "catch and handle
such errors appropriately" (that is, swallow) that Exception. 

One could argue that the container (that manages and owns the connection)
somehow "borrows" it to the servlet (via the ServletRequests/Responses
Input/Output streams). The IOException thrown by the Servlet is then a way to
tell the container "Hey, i borrowed your connection, but something broke and
now i am not sure if i return it in an non-broken state. Be aware that it may
be fishy somehow".

The fact that the servlet spec explicitly includes it ("throws
java.io.IOException - if an input or output exception occurs") in the interface
somehow suggests that. Otherwise, it could have simply forced us to wrap the
IOException in a ServletException or Runtime exception - like all the other
non-IO Exceptions. In the end, only the container knows what to do with its
broken connection.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #5 from Remy Maucherat  ---
Yes, but I don't see how a concurrent read is possible, and this is a "non
blocking" read, that other bug is supposed to be using blocking IO.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #7 from Yilong Li  ---
(In reply to Remy Maucherat from comment #3)
> No idea, it sounds too specific to the NIO2 behavior. Sure the completion
> handler is going to be called directly by the main thread pool, but only
> once per IO operation, and since a read cannot occur until the previous one
> is done it's fine as is.

Sorry, I think I misunderstood your reply in my previous message. So you are
saying that the completion handler cannot be called concurrently, right? Why is
that? Or more precisely, what makes sure that "a read cannot occur until the
previous one is done"? AsynchronousSocketChannel? CompletionHandler? Also, what
do you mean by "a read is done"? After the "readCompletionHandler" in
"sc.read(netInBuffer, timeout, unit, attachment, readCompletionHandler);"
(https://github.com/apache/tomcat80/blob/TOMCAT_8_0_24/java/org/apache/tomcat/util/net/SecureNio2Channel.java#L792)
is called? Sorry for the many questions because I am not familiar enough with
the source code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58323] Client passing away causes Log.ERROR messages

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58323

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |INVALID

--- Comment #3 from Mark Thomas  ---
Logging unhandled errors at ERROR level has been the convention in Tomcat for
as long as I can remember and isn't going to change.

Any exceptions in the service() method are up to the application to handle.
Only it can determine how serious they are and only the application can
determine what cleaning up - if any - is required after the error.

While most applications won't be concerned about an I/O error, I have worked
with apps where any I/O trigger the destruction of the session, the logging out
of the user and a security alert. Tomcat has no way to determine which sort of
app has been deployed.

As an aside, as soon as the I/O occurs - and before the exception even reaches
the servlet - Tomcat will have marked the connection as faultly and be waiting
to close it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1701095 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 18:30:10 2015
New Revision: 1701095

URL: http://svn.apache.org/r1701095
Log:
Follow-up to https://bz.apache.org/bugzilla/show_bug.cgi?id=58313
Fix concurrent access of encoders map when clearing encoders prior to switch to 
async.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 18:30:10 2015
@@ -1,2 +1,2 @@
-/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1659907,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553
 
-1667555,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 

svn commit: r1701113 - /tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:35:19 2015
New Revision: 1701113

URL: http://svn.apache.org/r1701113
Log:
Small simplification
Use 'conv == null' to indicate that conv has not been set rather than a 
separate flag.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701113=1701112=1701113=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:35:19 2015
@@ -96,12 +96,6 @@ public class InputBuffer extends Reader
 
 
 /**
- * Encoder is set.
- */
-private boolean gotEnc = false;
-
-
-/**
  * List of encoders.
  */
 protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
@@ -202,9 +196,9 @@ public class InputBuffer extends Reader
 
 if (conv != null) {
 conv.recycle();
+conv = null;
 }
 
-gotEnc = false;
 enc = null;
 }
 
@@ -375,7 +369,7 @@ public class InputBuffer extends Reader
 
 @Override
 public int realReadChars() throws IOException {
-if (!gotEnc) {
+if (conv == null) {
 setConverter();
 }
 
@@ -542,24 +536,19 @@ public class InputBuffer extends Reader
 }
 
 
-public void checkConverter()
-throws IOException {
-
-if (!gotEnc) {
+public void checkConverter() throws IOException {
+if (conv == null) {
 setConverter();
 }
-
 }
 
 
-protected void setConverter()
-throws IOException {
+protected void setConverter() throws IOException {
 
 if (coyoteRequest != null) {
 enc = coyoteRequest.getCharacterEncoding();
 }
 
-gotEnc = true;
 if (enc == null) {
 enc = org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 }



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



svn commit: r1701116 - in /tomcat/trunk: java/org/apache/catalina/connector/CoyoteAdapter.java java/org/apache/catalina/connector/InputBuffer.java java/org/apache/tomcat/util/buf/B2CConverter.java tes

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:44:27 2015
New Revision: 1701116

URL: http://svn.apache.org/r1701116
Log:
Use Charset rather than encoding name to create B2CConvertor

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1701116=1701115=1701116=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Sep  
3 19:44:27 2015
@@ -1077,7 +1077,7 @@ public class CoyoteAdapter implements Ad
 B2CConverter conv = request.getURIConverter();
 try {
 if (conv == null) {
-conv = new B2CConverter(enc, true);
+conv = new B2CConverter(B2CConverter.getCharset(enc), 
true);
 request.setURIConverter(conv);
 } else {
 conv.recycle();

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701116=1701115=1701116=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:44:27 2015
@@ -565,7 +565,7 @@ public class InputBuffer extends Reader
 
 @Override
 public B2CConverter run() throws IOException {
-return new B2CConverter(enc);
+return new B2CConverter(charset);
 }
 }
 );
@@ -576,7 +576,7 @@ public class InputBuffer extends Reader
 }
 }
 } else {
-conv = new B2CConverter(enc);
+conv = new B2CConverter(charset);
 }
 encoders.put(charset, conv);
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java?rev=1701116=1701115=1701116=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java Thu Sep  3 
19:44:27 2015
@@ -97,12 +97,11 @@ public class B2CConverter {
  */
 private final ByteBuffer leftovers;
 
-public B2CConverter(String encoding) throws IOException {
-this(encoding, false);
+public B2CConverter(Charset charset) {
+this(charset, false);
 }
 
-public B2CConverter(String encoding, boolean replaceOnError)
-throws IOException {
+public B2CConverter(Charset charset, boolean replaceOnError) {
 byte[] left = new byte[LEFTOVER_SIZE];
 leftovers = ByteBuffer.wrap(left);
 CodingErrorAction action;
@@ -111,7 +110,6 @@ public class B2CConverter {
 } else {
 action = CodingErrorAction.REPORT;
 }
-Charset charset = getCharset(encoding);
 // Special case. Use the Apache Harmony based UTF-8 decoder because it
 // - a) rejects invalid sequences that the JVM decoder does not
 // - b) fails faster for some invalid sequences

Modified: tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java?rev=1701116=1701115=1701116=diff
==
--- tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/buf/TestB2CConverter.java Thu Sep  
3 19:44:27 2015
@@ -18,6 +18,7 @@ package org.apache.tomcat.util.buf;
 
 import java.nio.charset.Charset;
 import java.nio.charset.MalformedInputException;
+import java.nio.charset.StandardCharsets;
 import java.util.Locale;
 
 import org.junit.Assert;
@@ -48,7 +49,7 @@ public class TestB2CConverter {
 }
 
 private void testMessages(int msgCount) throws Exception {
-B2CConverter conv = new B2CConverter("UTF-16");
+B2CConverter conv = new B2CConverter(StandardCharsets.UTF_16);
 
 ByteChunk bc = new ByteChunk();
 CharChunk cc = new CharChunk(32);
@@ 

svn commit: r1701094 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 18:28:58 2015
New Revision: 1701094

URL: http://svn.apache.org/r1701094
Log:
Follow-up to https://bz.apache.org/bugzilla/show_bug.cgi?id=58313
Fix concurrent access of encoders map when clearing encoders prior to switch to 
async.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 18:28:58 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 

svn commit: r1701093 - /tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 18:27:27 2015
New Revision: 1701093

URL: http://svn.apache.org/r1701093
Log:
Follow-up to https://bz.apache.org/bugzilla/show_bug.cgi?id=58313
Fix concurrent access of encoders map when clearing encoders prior to switch to 
async.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701093=1701092=1701093=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
18:27:27 2015
@@ -21,7 +21,7 @@ import java.io.Reader;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
-import java.util.HashMap;
+import java.util.concurrent.ConcurrentHashMap;
 
 import javax.servlet.ReadListener;
 
@@ -104,7 +104,7 @@ public class InputBuffer extends Reader
 /**
  * List of encoders.
  */
-protected final HashMap encoders = new HashMap<>();
+protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
 
 
 /**



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



buildbot exception in ASF Buildbot on tomcat-8-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/84

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1701094
Blamelist: markt

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



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

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 18:31:30 2015
New Revision: 1701096

URL: http://svn.apache.org/r1701096
Log:
Add the InputBuffer side of the 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=1701096=1701095=1701096=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Sep  3 18:31:30 2015
@@ -62,6 +62,7 @@ PATCHES PROPOSED TO BACKPORT:
 
 * Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58313
   http://svn.apache.org/r1700872
+  http://svn.apache.org/r1701095
   Not required for async but still required because of Comet
   +1: markt
   -1:



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



svn commit: r1701114 - /tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:40:01 2015
New Revision: 1701114

URL: http://svn.apache.org/r1701114
Log:
Key encoder cache on Charset rather than encoding name

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701114=1701113=1701114=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:40:01 2015
@@ -18,6 +18,7 @@ package org.apache.catalina.connector;
 
 import java.io.IOException;
 import java.io.Reader;
+import java.nio.charset.Charset;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
@@ -98,7 +99,7 @@ public class InputBuffer extends Reader
 /**
  * List of encoders.
  */
-protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
+protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
 
 
 /**
@@ -552,10 +553,13 @@ public class InputBuffer extends Reader
 if (enc == null) {
 enc = org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING;
 }
-conv = encoders.get(enc);
+
+Charset charset = B2CConverter.getCharset(enc);
+conv = encoders.get(charset);
+
 if (conv == null) {
 if (SecurityUtil.isPackageProtectionEnabled()){
-try{
+try {
 conv = AccessController.doPrivileged(
 new PrivilegedExceptionAction(){
 
@@ -563,10 +567,9 @@ public class InputBuffer extends Reader
 public B2CConverter run() throws IOException {
 return new B2CConverter(enc);
 }
-
 }
 );
-}catch(PrivilegedActionException ex){
+} catch (PrivilegedActionException ex) {
 Exception e = ex.getException();
 if (e instanceof IOException) {
 throw (IOException)e;
@@ -575,9 +578,7 @@ public class InputBuffer extends Reader
 } else {
 conv = new B2CConverter(enc);
 }
-encoders.put(enc, conv);
+encoders.put(charset, conv);
 }
-
 }
-
 }



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



svn commit: r1701117 - /tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:48:07 2015
New Revision: 1701117

URL: http://svn.apache.org/r1701117
Log:
Better name

Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1701117=1701116=1701117=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Thu Sep  
3 19:48:07 2015
@@ -568,12 +568,12 @@ public class OutputBuffer extends Writer
 conv = stack.pop();
 
 if (conv == null) {
-conv = createNewConverter(charset);
+conv = createConverter(charset);
 }
 }
 
 
-private static C2BConverter createNewConverter(Charset charset) throws 
IOException {
+private static C2BConverter createConverter(Charset charset) throws 
IOException {
 if (Globals.IS_SECURITY_ENABLED){
 try {
 return AccessController.doPrivileged(



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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #6 from Yilong Li  ---
(In reply to Remy Maucherat from comment #3)
> No idea, it sounds too specific to the NIO2 behavior. Sure the completion
> handler is going to be called directly by the main thread pool, but only
> once per IO operation, and since a read cannot occur until the previous one
> is done it's fine as is.

Thank you, that's what I need to know. I will fix the tool to handle the
happens-before relationship imposed by
java.nio.channels.AsynchronousSocketChannel properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1701123 - /tomcat/trunk/java/org/apache/catalina/connector/Request.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 20:07:58 2015
New Revision: 1701123

URL: http://svn.apache.org/r1701123
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58320
In async requests multiple threads can access the request attribute map at the 
same time.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/Request.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?rev=1701123=1701122=1701123=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/Request.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Request.java Thu Sep  3 
20:07:58 2015
@@ -40,6 +40,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.TimeZone;
 import java.util.TreeMap;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import javax.naming.NamingException;
@@ -194,7 +195,7 @@ public class Request
 /**
  * The attributes associated with this Request, keyed by attribute name.
  */
-protected final HashMap attributes = new HashMap<>();
+protected final ConcurrentHashMap attributes = new 
ConcurrentHashMap<>();
 
 
 /**



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



svn commit: r1701118 - /tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:48:51 2015
New Revision: 1701118

URL: http://svn.apache.org/r1701118
Log:
Refactor. Move B2CConverter creation into a dedicated method.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701118=1701117=1701118=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:48:51 2015
@@ -558,27 +558,35 @@ public class InputBuffer extends Reader
 conv = encoders.get(charset);
 
 if (conv == null) {
-if (SecurityUtil.isPackageProtectionEnabled()){
-try {
-conv = AccessController.doPrivileged(
-new PrivilegedExceptionAction(){
+conv = createConverter(charset);
+encoders.put(charset, conv);
+}
+}
+
 
-@Override
-public B2CConverter run() throws IOException {
-return new B2CConverter(charset);
-}
+private static B2CConverter createConverter(Charset charset) throws 
IOException {
+if (SecurityUtil.isPackageProtectionEnabled()){
+try {
+return AccessController.doPrivileged(
+new PrivilegedExceptionAction(){
+
+@Override
+public B2CConverter run() throws IOException {
+return new B2CConverter(charset);
 }
-);
-} catch (PrivilegedActionException ex) {
-Exception e = ex.getException();
-if (e instanceof IOException) {
-throw (IOException)e;
-}
+}
+);
+} catch (PrivilegedActionException ex) {
+Exception e = ex.getException();
+if (e instanceof IOException) {
+throw (IOException) e;
+} else {
+throw new IOException(e);
 }
-} else {
-conv = new B2CConverter(charset);
 }
-encoders.put(charset, conv);
+} else {
+return new B2CConverter(charset);
 }
+
 }
 }



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



svn commit: r1701119 - /tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:49:17 2015
New Revision: 1701119

URL: http://svn.apache.org/r1701119
Log:
Refactor: reduce visibility

Modified:
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701119=1701118=1701119=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:49:17 2015
@@ -544,7 +544,7 @@ public class InputBuffer extends Reader
 }
 
 
-protected void setConverter() throws IOException {
+private void setConverter() throws IOException {
 
 if (coyoteRequest != null) {
 enc = coyoteRequest.getCharacterEncoding();



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



buildbot failure in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/206

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1701123
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



buildbot success in ASF Buildbot on tomcat-7-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-7-trunk/builds/61

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1701127
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1701127 - in /tomcat/tc7.0.x/trunk: java/org/apache/catalina/connector/InputBuffer.java test/org/apache/catalina/valves/TesterAccessLogValve.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 20:16:12 2015
New Revision: 1701127

URL: http://svn.apache.org/r1701127
Log:
No <> in Java 6

Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java

tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701127=1701126=1701127=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/InputBuffer.java 
Thu Sep  3 20:16:12 2015
@@ -106,7 +106,8 @@ public class InputBuffer extends Reader
 /**
  * List of encoders.
  */
-protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
+protected final ConcurrentHashMap encoders =
+new ConcurrentHashMap();
 
 
 /**

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java?rev=1701127=1701126=1701127=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java 
Thu Sep  3 20:16:12 2015
@@ -34,7 +34,7 @@ public class TesterAccessLogValve extend
 // Timing tests need a small error margin to prevent failures
 private static final long ERROR_MARGIN = 100;
 
-private final Queue entries = new ConcurrentLinkedQueue<>();
+private final Queue entries = new ConcurrentLinkedQueue();
 
 public TesterAccessLogValve() {
 // Async requests are supported



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



[Bug 58320] Data race inside the non-thread-safe HashMap org.apache.catalina.connector.Request.attributes

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58320

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report. This is fixed in trunk, 8.0.x (for 8.0.27 onwards) and
7.0.x (for 7.0.65 onwards).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



buildbot success in ASF Buildbot on tomcat-8-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-8-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-8-trunk/builds/85

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-8-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc8.0.x/trunk] 1701124
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1701120 - in /tomcat/trunk/java/org/apache: catalina/connector/CoyoteAdapter.java catalina/connector/InputBuffer.java catalina/connector/Request.java tomcat/util/buf/B2CConverter.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 19:58:03 2015
New Revision: 1701120

URL: http://svn.apache.org/r1701120
Log:
Use a static cache of B2CConverter objects rather than a per request cache that 
gets cleared every time the request switches to async mode.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
tomcat/trunk/java/org/apache/catalina/connector/Request.java
tomcat/trunk/java/org/apache/tomcat/util/buf/B2CConverter.java

Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1701120=1701119=1701120=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Thu Sep  
3 19:58:03 2015
@@ -304,10 +304,6 @@ public class CoyoteAdapter implements Ad
 if (!success || !request.isAsync()) {
 request.recycle();
 response.recycle();
-} else {
-// Clear converters so that the minimum amount of memory
-// is used by this processor
-request.clearEncoders();
 }
 }
 return success;
@@ -404,13 +400,8 @@ public class CoyoteAdapter implements Ad
 if (!async || error.get()) {
 request.recycle();
 response.recycle();
-} else {
-// Clear converters so that the minimum amount of memory
-// is used by this processor
-request.clearEncoders();
 }
 }
-
 }
 
 

Modified: tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java?rev=1701120=1701119=1701120=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/InputBuffer.java Thu Sep  3 
19:58:03 2015
@@ -33,6 +33,7 @@ import org.apache.coyote.Request;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.CharChunk;
+import org.apache.tomcat.util.collections.SynchronizedStack;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -52,9 +53,6 @@ public class InputBuffer extends Reader
  */
 protected static final StringManager sm = 
StringManager.getManager(InputBuffer.class);
 
-
-// -- Constants
-
 public static final int DEFAULT_BUFFER_SIZE = 8*1024;
 
 // The buffer can be used for byte[] and char[] reading
@@ -64,6 +62,13 @@ public class InputBuffer extends Reader
 public final int BYTE_STATE = 2;
 
 
+/**
+ * Encoder cache.
+ */
+private static final 
ConcurrentHashMap encoders =
+new ConcurrentHashMap<>();
+
+
 // - Instance Variables
 
 /**
@@ -97,12 +102,6 @@ public class InputBuffer extends Reader
 
 
 /**
- * List of encoders.
- */
-protected final ConcurrentHashMap encoders = new 
ConcurrentHashMap<>();
-
-
-/**
  * Current byte to char converter.
  */
 protected B2CConverter conv;
@@ -197,6 +196,7 @@ public class InputBuffer extends Reader
 
 if (conv != null) {
 conv.recycle();
+encoders.get(conv.getCharset()).push(conv);
 conv = null;
 }
 
@@ -205,14 +205,6 @@ public class InputBuffer extends Reader
 
 
 /**
- * Clear cached encoders (to save memory for async requests).
- */
-public void clearEncoders() {
-encoders.clear();
-}
-
-
-/**
  * Close the input buffer.
  *
  * @throws IOException An underlying IOException occurred
@@ -370,9 +362,7 @@ public class InputBuffer extends Reader
 
 @Override
 public int realReadChars() throws IOException {
-if (conv == null) {
-setConverter();
-}
+checkConverter();
 
 boolean eof = false;
 
@@ -545,7 +535,6 @@ public class InputBuffer extends Reader
 
 
 private void setConverter() throws IOException {
-
 if (coyoteRequest != null) {
 enc = coyoteRequest.getCharacterEncoding();
 }
@@ -555,11 +544,16 @@ public class InputBuffer extends Reader
 }
 
 Charset charset = B2CConverter.getCharset(enc);
-conv = encoders.get(charset);
+SynchronizedStack stack = encoders.get(charset);
+if (stack == null) {
+stack = new SynchronizedStack<>();
+

[Bug 57136] EL Parser escaping dollar sign not ${ or ${...}

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57136

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|NEEDINFO

--- Comment #12 from Mark Thomas  ---
The problem here is that both the EL and the JSP specs apply and they say
different things.

The JSP specs says (assuming EL is enabled) '\$' is an escape for a literal
'$'.
The EL spec says '\${' is an escape for a literal '${'.

The JSP spec has been in maintenance mode for 2.2 onwards whereas the EL spec
has been in active development - hence why more wieght was given the EL view
rather than the JSP one.

Having re-read both specs again, I'm no clearer in my own mind what the right
behaviour is. Either the JSP style escaping or the EL style could be viewed as
correct. It may even be possible (I need to think it through some more) to have
EL use '\${' as an escape for '${' while JSP uses '\$' as an escape for '$'.

I'm reluctant to change this again without clarification from the JSP
maintenance lead and the EL spec expert group. I'll leave this open in the
NEEDINFO state and raised a bug over in the EL EG.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 57136] EL Parser escaping dollar sign not ${ or ${...}

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57136

--- Comment #13 from Mark Thomas  ---
https://java.net/jira/browse/UEL-42

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



Re: svn commit: r1700900 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/util/RequestUtil.java

2015-09-03 Thread Mark Thomas
On 03/09/2015 00:27, Rainer Jung wrote:
> Am 02.09.2015 um 23:08 schrieb Konstantin Kolinko:
>> 2015-09-03 0:00 GMT+03:00 Mark Thomas :
>>> On 02/09/2015 21:46, ma...@apache.org wrote:
 Author: markt
 Date: Wed Sep  2 20:46:17 2015
 New Revision: 1700900

 URL: http://svn.apache.org/r1700900
 Log:
 Update proposal

 Modified:
  tomcat/tc6.0.x/trunk/STATUS.txt
 
 tomcat/tc6.0.x/trunk/java/org/apache/catalina/util/RequestUtil.java
>>>
>>> Bah. I applied the patch as well.
>>>
>>> Any chance of a couple of quick +1's from other committers so I don't
>>> have to revert it?
>>>
>>
>>
>> +1
> 
> mine as well: +1

Thanks.

Mark


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



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

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 07:08:08 2015
New Revision: 1700938

URL: http://svn.apache.org/r1700938
Log:
This was accidentally applied when adding the proposal.
kkolinko and rjung voted +1 for this on the dev list

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=1700938=1700937=1700938=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Thu Sep  3 07:08:08 2015
@@ -60,12 +60,6 @@ PATCHES PROPOSED TO BACKPORT:
   +1: markt, remm
   -1:
 
-* Back-port fixes for Javadoc, formatting, clean-up and edge cases for URL
-  normalization
-  
http://people.apache.org/~markt/patches/2015-09-02-url-normalization-tc6-v2.patch
-  +1: markt
-  -1:
-
 * Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58313
   http://svn.apache.org/r1700872
   Not required for async but still required because of Comet



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



Re: svn commit: r1700964 - /tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

2015-09-03 Thread jean-frederic clere

On 09/03/2015 11:16 AM, jfcl...@apache.org wrote:

Author: jfclere
Date: Thu Sep  3 09:16:48 2015
New Revision: 1700964

URL: http://svn.apache.org/r1700964
Log:
Remove useless code.


Well it reset the pos after the put... I will rollback that might be 
used somewhere no?


Cheers

Jean-Frederic

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



svn commit: r1700964 - /tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

2015-09-03 Thread jfclere
Author: jfclere
Date: Thu Sep  3 09:16:48 2015
New Revision: 1700964

URL: http://svn.apache.org/r1700964
Log:
Remove useless code.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java?rev=1700964=1700963=1700964=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java Thu 
Sep  3 09:16:48 2015
@@ -257,8 +257,6 @@ public final class OpenSSLEngine extends
 if (sslWrote > 0) {
 src.position(pos + sslWrote);
 return sslWrote;
-} else {
-src.position(pos);
 }
 } finally {
 buf.clear();



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



buildbot failure in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/196

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1700964
Blamelist: jfclere

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



svn commit: r1700967 - /tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

2015-09-03 Thread jfclere
Author: jfclere
Date: Thu Sep  3 09:35:09 2015
New Revision: 1700967

URL: http://svn.apache.org/r1700967
Log:
Rollback http://svn.apache.org/r1700964 (sorry).

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java?rev=1700967=1700966=1700967=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java Thu 
Sep  3 09:35:09 2015
@@ -257,6 +257,8 @@ public final class OpenSSLEngine extends
 if (sslWrote > 0) {
 src.position(pos + sslWrote);
 return sslWrote;
+} else {
+src.position(pos);
 }
 } finally {
 buf.clear();



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



buildbot success in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/197

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1700967
Blamelist: jfclere

Build succeeded!

Sincerely,
 -The Buildbot




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



svn commit: r1700977 - /tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 10:21:17 2015
New Revision: 1700977

URL: http://svn.apache.org/r1700977
Log:
Testing access log entries may be accessed concurrently so ensure that access 
is thread safe.

Modified:
tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

Modified: tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java?rev=1700977=1700976=1700977=diff
==
--- tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java 
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java Thu 
Sep  3 10:21:17 2015
@@ -17,8 +17,8 @@
 package org.apache.catalina.valves;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Queue;
+import java.util.concurrent.ConcurrentLinkedQueue;
 
 import javax.servlet.ServletException;
 
@@ -36,7 +36,7 @@ public class TesterAccessLogValve extend
 // Timing tests need an error margin to prevent failures.
 private static final long ERROR_MARGIN = RELAX_TIMING ? 1000 : 100;
 
-private final List entries = new ArrayList<>();
+private final Queue entries = new ConcurrentLinkedQueue<>();
 
 public TesterAccessLogValve() {
 // Async requests are supported
@@ -86,8 +86,7 @@ public class TesterAccessLogValve extend
 entriesLog.append(System.lineSeparator());
 }
 assertEquals(entriesLog.toString(), count, entries.size());
-for (int j = 0; j < count; j++) {
-Entry entry = entries.get(j);
+for (Entry entry : entries) {
 assertEquals(status, entry.getStatus());
 assertTrue(entry.toString() + " duration is not >= " + (minTime - 
ERROR_MARGIN),
 entry.getTime() >= minTime - ERROR_MARGIN);



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



[Bug 58319] New: Data race inside the non-thread-safe ArrayList org.apache.catalina.valves.TesterAccessLogValve.entries

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58319

Bug ID: 58319
   Summary: Data race inside the non-thread-safe ArrayList
org.apache.catalina.valves.TesterAccessLogValve.entrie
s
   Product: Tomcat 8
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: yilong...@runtimeverification.com

Reported by RV-Predict (a dynamic race detector) when running the test suite:

Data race on field java.util.ArrayList.$state: {{{
Concurrent write in thread T98 (locks held: {Monitor@5e5cc762})
 >  at
org.apache.catalina.valves.TesterAccessLogValve.log(TesterAccessLogValve.java:48)
at
org.apache.catalina.core.AccessLogAdapter.log(AccessLogAdapter.java:51)
at
org.apache.catalina.core.ContainerBase.logAccess(ContainerBase.java:1042)
at
org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:245)
at
org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:106)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:661)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
- locked Monitor@5e5cc762 at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1483)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T98 is created by T90
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent read in thread T1 (locks held: {})
 >  at
org.apache.catalina.valves.TesterAccessLogValve.validateAccessLog(TesterAccessLogValve.java:79)
at
org.apache.catalina.comet.TestCometProcessor.doSimpleCometTest(TestCometProcessor.java:347)
at
org.apache.catalina.comet.TestCometProcessor.testSimpleCometClientEndFail(TestCometProcessor.java:261)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:38)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:532)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1165)
at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1016)
T1 is the main thread
}}}

Looks like TesterAccessLogValve.entries is accessed from multiple threads
without proper synchronization.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58320] New: Data race inside the non-thread-safe HashMap org.apache.catalina.connector.Request.attributes

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58320

Bug ID: 58320
   Summary: Data race inside the non-thread-safe HashMap
org.apache.catalina.connector.Request.attributes
   Product: Tomcat 8
   Version: 8.0.24
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: yilong...@runtimeverification.com

Reported by RV-Predict (a dynamic race detector) when running the test suite:

Data race on field java.util.HashMap.$state: {{{
Concurrent read in thread T122 (locks held: {Monitor@5d0626be})
 >  at org.apache.catalina.connector.Request.getAttribute(Request.java:876)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:277)
- locked Monitor@5d0626be at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:259)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T122 is created by T120
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent write in thread T123 (locks held: {})
 >  at
org.apache.catalina.connector.Request.setAttribute(Request.java:1480)
at
org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:192)
at
org.apache.catalina.core.AsyncContextImpl.dispatch(AsyncContextImpl.java:178)
at
org.apache.catalina.core.TestAsyncContextImpl$Bug53337ServletB$1.run(TestAsyncContextImpl.java:1456)
T123 is created by T122
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}}

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1700979 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/valves/TesterAccessLogValve.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 10:24:14 2015
New Revision: 1700979

URL: http://svn.apache.org/r1700979
Log:
Testing access log entries may be accessed concurrently so ensure that access 
is thread safe.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)

tomcat/tc7.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 10:24:14 2015
@@ -1,2 +1,2 @@
-/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1659907,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553
 
-1667555,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 

svn commit: r1700978 - in /tomcat/tc8.0.x/trunk: ./ test/org/apache/catalina/valves/TesterAccessLogValve.java

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 10:22:27 2015
New Revision: 1700978

URL: http://svn.apache.org/r1700978
Log:
Testing access log entries may be accessed concurrently so ensure that access 
is thread safe.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)

tomcat/tc8.0.x/trunk/test/org/apache/catalina/valves/TesterAccessLogValve.java

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 10:22:27 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 

[Bug 58319] Data race inside the non-thread-safe ArrayList org.apache.catalina.valves.TesterAccessLogValve.entries

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58319

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
The way the tests are written it is extremely unlikely that this could ever be
a problem. I certainly don't recall any test failures triggered by something
along these lines.

Just to be safe, I've switched the ist for a ConcurrentLinkedQueue in trunk,
8.0.x and 7.0.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58321] New: Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

Bug ID: 58321
   Summary: Using non-thread-safe javax.net.ssl.SSLEngine inside
org.apache.tomcat.util.net.SecureNio2Channel without
synchronization
   Product: Tomcat 8
   Version: 8.0.24
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: yilong...@runtimeverification.com

Reported by RV-Predict (a dynamic race detector) when running against the test
suite:

Data race on field javax.crypto.Cipher.initialized: {{{
Concurrent read in thread T46 (locks held: {})
 >  at javax.crypto.Cipher.checkCipherState(Cipher.java:1749)
at javax.crypto.Cipher.update(Cipher.java:1932)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T46 is created by T44
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent write in thread T55 (locks held: {})
 >  at javax.crypto.Cipher.init(Cipher.java:1399)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T55 is created by T40
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field javax.crypto.Cipher.opmode: {{{
Concurrent read in thread T46 (locks held: {})
 >  at javax.crypto.Cipher.checkCipherState(Cipher.java:1752)
at javax.crypto.Cipher.update(Cipher.java:1932)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T46 is created by T44
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent write in thread T55 (locks held: {})
 >  at javax.crypto.Cipher.init(Cipher.java:1400)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T55 is created by T40
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Data race on field javax.crypto.Cipher.spi: {{{
Concurrent read in thread T46 (locks held: {})
 >  at javax.crypto.Cipher.chooseFirstProvider(Cipher.java:717)
at javax.crypto.Cipher.getBlockSize(Cipher.java:929)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T46 is created by T44
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)

Concurrent write in thread T55 (locks held: {Monitor@618773ae})
 >  at javax.crypto.Cipher.chooseProvider(Cipher.java:867)
- locked Monitor@618773ae at
javax.crypto.Cipher.chooseProvider(Cipher.java:825)
at javax.crypto.Cipher.init(Cipher.java:1396)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at
org.apache.tomcat.util.net.SecureNio2Channel$3.completed(SecureNio2Channel.java:746)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
T55 is created by T40
at
java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:1010)
}}} 

Looks like the root cause is that SSLEngine.unwrap is called by multiple
threads concurrently? The Javadoc of SSLEngine
(http://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLEngine.html)
mentions this situation in the Concurrency Notes section.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

Remy Maucherat  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Remy Maucherat  ---
This looks invalid as the IO operations are protected by pending flags and/or
semaphores. I get it your tool seems to use (sub)classes independently, which
is not the case here.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



buildbot failure in ASF Buildbot on tomcat-7-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-7-trunk/builds/59

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1700979
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[Bug 58321] Using non-thread-safe javax.net.ssl.SSLEngine inside org.apache.tomcat.util.net.SecureNio2Channel without synchronization

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58321

--- Comment #2 from Yilong Li  ---
(In reply to Remy Maucherat from comment #1)
> This looks invalid as the IO operations are protected by pending flags
> and/or semaphores. I get it your tool seems to use (sub)classes
> independently, which is not the case here.

Hi Remy, thanks for your quick response. Can you please be more specific about
the synchronization mechanism applied here? For example, which pending flags,
semaphores, futures are functioning in this case? The thing is that, ideally,
our tool should have zero false positive and we take false positive very
seriously. I would like to understand the problem and fix it. Thanks again!

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



svn commit: r1701124 - in /tomcat/tc8.0.x/trunk: ./ java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 20:10:10 2015
New Revision: 1701124

URL: http://svn.apache.org/r1701124
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58320
In async requests multiple threads can access the request attribute map at the 
same time.

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 20:10:10 2015
@@ -1 +1 @@
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886,1644890,1644892
 
,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657592,1657607,1657609,1657682,1657
 
907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1666387,1666494,1666496,1666552,1666569,1666579,137,149,1
 
666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-1684527,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,168582
 

svn commit: r1701125 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/Request.java webapps/docs/changelog.xml

2015-09-03 Thread markt
Author: markt
Date: Thu Sep  3 20:15:16 2015
New Revision: 1701125

URL: http://svn.apache.org/r1701125
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=58320
In async requests multiple threads can access the request attribute map at the 
same time.

Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep  3 20:15:16 2015
@@ -1,2 +1,2 @@
-/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1659907,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988,1667553
 
-1667555,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978,1701094
-/tomcat/trunk:1156115-1157160,1157162-1157859,1157862-1157942,1157945-1160347,1160349-1163716,1163718-1166689,1166691-1174340,1174342-1175596,1175598-1175611,1175613-1175932,1175934-1177783,1177785-1177980,1178006-1180720,1180722-1183094,1183096-1187753,1187755,1187775,1187801,1187806,1187809,1187826-1188312,1188314-1188401,1188646-1188840,1188842-1190176,1190178-1195223,1195225-1195953,1195955,1195957-1201238,1201240-1203345,1203347-1206623,1206625-1208046,1208073,1208096,1208114,1208145,1208772,1209194-1212125,1212127-1220291,1220293,1220295-1221321,1221323-1222329,1222332-1222401,1222405-1222795,1222850-1222950,1222969-1225326,1225328-1225463,1225465,1225627,1225629-1226534,1226536-1228908,1228911-1228923,1228927-1229532,1229534-1230766,1230768-1231625,1231627-1233414,1233419-1235207,1235209-1237425,1237427,1237429-1237977,1237981,1237985,1237995,1238070,1238073,1239024-1239048,1239050-1239062,1239135,1239256,1239258-1239485,1239785-1240046,1240101,1240106,1240109,1240112,1240114
 
,1240116,1240118,1240121,1240329,1240474-1240850,1240857,1241087,1241160,1241408-1241822,1241908-1241909,1241912-1242110,1242371-1292130,1292134-1292458,1292464-1292670,1292672-1292776,1292780-1293392,1293397-1297017,1297019-1297963,1297965-1299820,1300108,1300111-1300460,1300520-1300948,1300997,1301006,1301280,1302332,1302348,1302608-1302610,1302649,1302837,1303138,1303163,1303338,1303521,1303587,1303698,1303803,1303852,1304011,1304035,1304037,1304135,1304249,1304253,1304260,1304271,1304275,1304468,1304895,1304930-1304932,1305194,1305943,1305965,1306556,1306579-1306580,1307084,1307310,1307511-1307512,1307579,1307591,1307597,1310636,1310639-1310640,1310642,1310701,1311212,1311995,1327617,1327670,1331766,1333161,1333173,1333827,1334787,1335026,1335257,1335547,1335692,1335711,1335731,1336515,1336813,1336864,1336868,1336884,1337419,1337426,1337546,1337572,1337591-1337595,1337643,1337707,1337719,1337734,1337741,1337745,1338151-1338154,1338178,1342027,1342029,1342315,1342320,1342476,1342
 

svn commit: r1701011 - /tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

2015-09-03 Thread remm
Author: remm
Date: Thu Sep  3 13:12:31 2015
New Revision: 1701011

URL: http://svn.apache.org/r1701011
Log:
Reading the code, don't treat 0 as a problem at this point.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java?rev=1701011=1701010=1701011=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java Thu 
Sep  3 13:12:31 2015
@@ -239,7 +239,7 @@ public final class OpenSSLEngine extends
 if (src.isDirect()) {
 final long addr = Buffer.address(src) + pos;
 sslWrote = SSL.writeToSSL(ssl, addr, len);
-if (sslWrote > 0) {
+if (sslWrote >= 0) {
 src.position(pos + sslWrote);
 return sslWrote;
 }
@@ -254,7 +254,7 @@ public final class OpenSSLEngine extends
 src.limit(limit);
 
 sslWrote = SSL.writeToSSL(ssl, addr, len);
-if (sslWrote > 0) {
+if (sslWrote >= 0) {
 src.position(pos + sslWrote);
 return sslWrote;
 } else {



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



svn commit: r1701016 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java

2015-09-03 Thread remm
Author: remm
Date: Thu Sep  3 13:22:02 2015
New Revision: 1701016

URL: http://svn.apache.org/r1701016
Log:
Blocking mode doesn't work for me with APR in some cases if the nonblock option 
isn't set as well.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1701016=1701015=1701016=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Thu Sep  3 
13:22:02 2015
@@ -2448,8 +2448,10 @@ public class AprEndpoint extends Abstrac
 // Set the current settings for this socket
 setBlockingStatus(block);
 if (block) {
+Socket.optSet(getSocket().longValue(), 
Socket.APR_SO_NONBLOCK, 0);
 Socket.timeoutSet(getSocket().longValue(), 
getReadTimeout() * 1000);
 } else {
+Socket.optSet(getSocket().longValue(), 
Socket.APR_SO_NONBLOCK, 1);
 Socket.timeoutSet(getSocket().longValue(), 0);
 }
 // Downgrade the lock
@@ -2567,8 +2569,10 @@ public class AprEndpoint extends Abstrac
 // Set the current settings for this socket
 setBlockingStatus(block);
 if (block) {
+Socket.optSet(getSocket().longValue(), 
Socket.APR_SO_NONBLOCK, 0);
 Socket.timeoutSet(getSocket().longValue(), 
getWriteTimeout() * 1000);
 } else {
+Socket.optSet(getSocket().longValue(), 
Socket.APR_SO_NONBLOCK, 1);
 Socket.timeoutSet(getSocket().longValue(), 0);
 }
 



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



buildbot exception in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a build exception on builder tomcat-trunk while 
building ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/200

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1701016
Blamelist: remm

BUILD FAILED: exception upload_2

Sincerely,
 -The Buildbot




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



buildbot failure in ASF Buildbot on tomcat-trunk

2015-09-03 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot. Full details are available at:
http://ci.apache.org/builders/tomcat-trunk/builds/199

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-commit' 
triggered this build
Build Source Stamp: [branch tomcat/trunk] 1701011
Blamelist: remm

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




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



[Bug 58323] New: Client passing away causes Log.ERROR messages

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58323

Bug ID: 58323
   Summary: Client passing away causes Log.ERROR messages
   Product: Tomcat 8
   Version: 8.0.23
  Hardware: PC
OS: Linux
Status: NEW
  Severity: minor
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: benjamin.gehrels_exter...@immobilienscout24.de

i think that ERROR logging should be reserved to misbehaviour of the software,
that needs attention by the operator/developer (in contrast to WARN/INFO
logging, that *may* show some misbehaviour). Having a client stumbeling over
his network cable or having a bad connection during a subway ride should be a
pretty normal and non-alarming situation in a distributed system, not a
misbehaviour of the software.

Sadly, when a SocketTimeoutException or an IOException: Connection reset by
peer is thrown in a HttpServlet, it will be propagated through the FilterChain
and cause ugly ERROR Logging:

java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[na:1.8.0_51]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
~[na:1.8.0_51]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_51]
at sun.nio.ch.IOUtil.read(IOUtil.java:197) ~[na:1.8.0_51]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
~[na:1.8.0_51]
at org.apache.tomcat.util.net.NioChannel.read(NioChannel.java:140)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.tomcat.util.net.NioBlockingSelector.read(NioBlockingSelector.java:173)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:251)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.tomcat.util.net.NioSelectorPool.read(NioSelectorPool.java:232)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:133)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:177)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.coyote.http11.filters.IdentityInputFilter.doRead(IdentityInputFilter.java:110)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:416)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.coyote.Request.doRead(Request.java:469)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:338)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:363)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.catalina.connector.InputBuffer.readByte(InputBuffer.java:352)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:94)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at java.io.FilterInputStream.read(FilterInputStream.java:83) ~[na:1.8.0_51]
at java.io.PushbackInputStream.read(PushbackInputStream.java:139)
~[na:1.8.0_51]
at
org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters(RequestResponseBodyMethodProcessor.java:135)
~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
[...]
at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:869)
~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
~[spring-webmvc-4.1.7.RELEASE.jar!/:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
~[tomcat-embed-websocket-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
~[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
[tomcat-embed-core-8.0.23.jar!/:8.0.23]
at

[Bug 58323] Client passing away causes Log.ERROR messages

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58323

benjamin.gehrels_exter...@immobilienscout24.de changed:

   What|Removed |Added

 CC||benjamin.gehrels_external@i
   ||mmobilienscout24.de

-- 
You are receiving this mail because:
You are the assignee for the bug.

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



[Bug 58323] Client passing away causes Log.ERROR messages

2015-09-03 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=58323

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Mark Thomas  ---
That stack trace originates inside Servlet.service(). Tomcat has no way to tell
if the problem is a trivial one that is safe to ignore or a serious one that
needs to be logged. Therefore, such errors are always logged at ERROR.

Even if Tomcat is able to detect that it is due to a client abort exception,
Tomcat still doens't know how serious an issue that is for any given
application.

Applications are expected to catch and handle such errors appropriately.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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