Re: Plans for 8.0.6

2014-05-13 Thread Mark Thomas
On 12/05/2014 21:00, Rémy Maucherat wrote:
> 2014-05-12 16:39 GMT+02:00 Mark Thomas :
> 
>> I just got to that. I've answered your immediate question but I want to
>> do a little more digging of my own. I'll respond in more detail on that
>> thread. That said, I'm not expecting NIO2 to be declared stable in this
>> release so I don't see this as a release blocker.
>>
> 
> Ok.
> 
> I looked at it more, and I think the comment you made is correct: on
> shutdown it would simply try to read data (but the read for the keepalive
> is pending, so it gets an exception).
> So I'm not reverting anything, the code as is won't do anything that would
> cause real issues even if it's not perfect. The main idea was to avoid
> ignoring read pending exceptions.

I'm running the unit tests now. I want to look at BZ 56516 some more and
I don't want to hold up a 8.0.x release any longer.

Mark


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



Re: Plans for 8.0.6

2014-05-13 Thread Rémy Maucherat
2014-05-13 9:37 GMT+02:00 Mark Thomas :

> I'm running the unit tests now. I want to look at BZ 56516 some more and
> I don't want to hold up a 8.0.x release any longer.
>

There's nothing to look at IMO, the guy is using scriptlets and expects
things to work with the tag variable. Jasper has no idea to know there's
flow control in his Java code fragments.

Rémy

>From his test case (with a "message" variable info):
<%
try {
%>

<%
} catch (Exception e) {
//String message = null;
%>

<%
}
%>


[Bug 56518] NIO async servlet limit latch leak

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #1 from hanyong  ---
Created attachment 31614
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31614&action=edit
source code of the sample webapp

-- 
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 56496] 无缘无故引用另一个项目的同类名同方法名的方法函数

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56496

Mark Thomas  changed:

   What|Removed |Added

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

--- Comment #1 from Mark Thomas  ---
The translation of this (via Google) follows:

==

For example:
I now have two projects (namely, Project A and Project B), and have
successfully deployed in TOMCAT
When I call the update method Project A, update method calls put methods of
another class, but when I look at when DEBUG, put the update method of another
class method called Project A Project B is put methods. (Note that this project
A and project B is not referenced to each other, they are independent.)
In short:
I have no reason to call the A project to Method B project, and this two
projects are independent, there is no reference to each other.

Solution:
To% CATALINA_HOME% / work / Catalina / localhost / B to find items to solve the
deleted items B

==

This appears to be some form of IDE / deployment user error. The Apache Tomcat
users mailing list is the correct location to seek help.

Please note that nearly all communication on that list is in English.

-- 
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: r1593018 - /tomcat/tc6.0.x/trunk/STATUS.txt

2014-05-13 Thread markt
Author: markt
Date: Wed May  7 13:56:59 2014
New Revision: 1593018

URL: http://svn.apache.org/r1593018
Log:
Correct vote

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=1593018&r1=1593017&r2=1593018&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Wed May  7 13:56:59 2014
@@ -79,7 +79,7 @@ PATCHES PROPOSED TO BACKPORT:
 * Ensure TLD parser obtained from cache has correct value of blockExternal
   (r1590036 + r1590040 + r1590065)
   https://people.apache.org/~kkolinko/patches/2014-04-26_tc6_TldConfig.patch
-  +1: kkolinko, mark
+  +1: kkolinko, markt
   -1:
 
 * Followup to r1589635



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



svn commit: r1593387 - /tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java

2014-05-13 Thread kkolinko
Author: kkolinko
Date: Thu May  8 19:15:25 2014
New Revision: 1593387

URL: http://svn.apache.org/r1593387
Log:
Small optimization: move "getRegistry(null, null)" call out of the loop.

Modified:
tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java

Modified: tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java?rev=1593387&r1=1593386&r2=1593387&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/NamingContextListener.java Thu 
May  8 19:15:25 2014
@@ -318,9 +318,12 @@ public class NamingContextListener
 ContextAccessController.unsetSecurityToken(container, token);
 
 // unregister mbeans.
-Collection names = objectNames.values();
-for (ObjectName objectName : names) {
-Registry.getRegistry(null, 
null).unregisterComponent(objectName);
+if (!objectNames.isEmpty()) {
+Collection names = objectNames.values();
+Registry registry = Registry.getRegistry(null, null);
+for (ObjectName objectName : names) {
+registry.unregisterComponent(objectName);
+}
 }
 } finally {
 objectNames.clear();



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



svn commit: r1594198 - in /tomcat/trunk/java/org/apache/coyote: AsyncStateMachine.java http11/AbstractHttp11Processor.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 11:25:14 2014
New Revision: 1594198

URL: http://svn.apache.org/r1594198
Log:
Address root cause of ReadPendingException rather than swallowing it.

Modified:
tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java?rev=1594198&r1=1594197&r2=1594198&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java (original)
+++ tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java Tue May 13 
11:25:14 2014
@@ -280,7 +280,9 @@ public class AsyncStateMachine {
 state == AsyncState.TIMING_OUT ||
 state == AsyncState.ERROR) {
 state = AsyncState.DISPATCHING;
-doDispatch = true;
+if (!ContainerThreadMarker.isContainerThread()) {
+doDispatch = true;
+}
 } else {
 throw new IllegalStateException(
 sm.getString("asyncStateMachine.invalidAsyncState",

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1594198&r1=1594197&r2=1594198&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Tue 
May 13 11:25:14 2014
@@ -18,7 +18,6 @@ package org.apache.coyote.http11;
 
 import java.io.IOException;
 import java.io.InterruptedIOException;
-import java.nio.channels.ReadPendingException;
 import java.util.Locale;
 import java.util.StringTokenizer;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -955,7 +954,7 @@ public abstract class AbstractHttp11Proc
 setSocketTimeout(connectionUploadTimeout);
 }
 }
-} catch (IOException | ReadPendingException e) {
+} catch (IOException e) {
 if (getLog().isDebugEnabled()) {
 getLog().debug(
 sm.getString("http11processor.header.parse"), e);



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



svn commit: r1594199 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 11:26:26 2014
New Revision: 1594199

URL: http://svn.apache.org/r1594199
Log:
Give the thread shutting down the existing connections a chance to finish 
before forcibly closing them and triggering an exception on each connection 
that is forcibly closed.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1594199&r1=1594198&r2=1594199&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue May 13 
11:26:26 2014
@@ -90,6 +90,8 @@ public class Nio2Endpoint extends Abstra
  */
 private AsynchronousChannelGroup threadGroup = null;
 
+private volatile boolean allClosed;
+
 /**
  * The oom parachute, when an OOM error happens,
  * will release the data, giving the JVM instantly
@@ -347,6 +349,7 @@ public class Nio2Endpoint extends Abstra
 public void startInternal() throws Exception {
 
 if (!running) {
+allClosed = false;
 running = true;
 paused = false;
 
@@ -398,6 +401,8 @@ public class Nio2Endpoint extends Abstra
 handler.closeAll();
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
+} finally {
+allClosed = true;
 }
 }
 });
@@ -431,8 +436,12 @@ public class Nio2Endpoint extends Abstra
 public void shutdownExecutor() {
 if (threadGroup != null && internalExecutor) {
 try {
-threadGroup.shutdownNow();
 long timeout = getExecutorTerminationTimeoutMillis();
+while (timeout > 0 && !allClosed) {
+timeout -= 100;
+Thread.sleep(100);
+}
+threadGroup.shutdownNow();
 if (timeout > 0) {
 threadGroup.awaitTermination(timeout, 
TimeUnit.MILLISECONDS);
 }



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



svn commit: r1594229 - in /tomcat/trunk: java/org/apache/naming/ContextAccessController.java webapps/docs/changelog.xml

2014-05-13 Thread kkolinko
Author: kkolinko
Date: Tue May 13 14:11:11 2014
New Revision: 1594229

URL: http://svn.apache.org/r1594229
Log:
Require RuntimePermission when introducing a new token.

Modified:
tomcat/trunk/java/org/apache/naming/ContextAccessController.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/naming/ContextAccessController.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/ContextAccessController.java?rev=1594229&r1=1594228&r2=1594229&view=diff
==
--- tomcat/trunk/java/org/apache/naming/ContextAccessController.java (original)
+++ tomcat/trunk/java/org/apache/naming/ContextAccessController.java Tue May 13 
14:11:11 2014
@@ -55,6 +55,12 @@ public class ContextAccessController {
  * @param token Security token
  */
 public static void setSecurityToken(Object name, Object token) {
+SecurityManager sm = System.getSecurityManager();
+if (sm != null) {
+sm.checkPermission(new RuntimePermission(
+ContextAccessController.class.getName()
++ ".setSecurityToken"));
+}
 if ((!securityTokens.containsKey(name)) && (token != null)) {
 securityTokens.put(name, token);
 }

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1594229&r1=1594228&r2=1594229&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue May 13 14:11:11 2014
@@ -171,7 +171,8 @@
   
   
 Make the naming context tokens for containers more robust by using a
-separate object. (markt/kkolinko)
+separate object. Require RuntimePermission when introducing a new 
token.
+(markt/kkolinko)
   
   
 56501: HttpServletRequest.getContextPath()



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



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

2014-05-13 Thread kkolinko
Author: kkolinko
Date: Tue May 13 14:17:33 2014
New Revision: 1594232

URL: http://svn.apache.org/r1594232
Log:
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=1594232&r1=1594231&r2=1594232&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 13 14:17:33 2014
@@ -28,7 +28,10 @@ None
 PATCHES PROPOSED TO BACKPORT:
   [ New proposals should be added at the end of the list ]
 
-None
+* Require RuntimePermission when introducing a new token.
+  https://svn.apache.org/r1594230
+  +1: kkolinko
+  -1:
 
 
 PATCHES/ISSUES THAT ARE STALLED:



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



svn commit: r1594230 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/naming/ContextAccessController.java webapps/docs/changelog.xml

2014-05-13 Thread kkolinko
Author: kkolinko
Date: Tue May 13 14:15:06 2014
New Revision: 1594230

URL: http://svn.apache.org/r1594230
Log:
Merged r1594229 from tomcat/trunk:
Require RuntimePermission when introducing a new token.

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

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1594229

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/naming/ContextAccessController.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/naming/ContextAccessController.java?rev=1594230&r1=1594229&r2=1594230&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/naming/ContextAccessController.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/naming/ContextAccessController.java 
Tue May 13 14:15:06 2014
@@ -55,6 +55,12 @@ public class ContextAccessController {
  * @param token Security token
  */
 public static void setSecurityToken(Object name, Object token) {
+SecurityManager sm = System.getSecurityManager();
+if (sm != null) {
+sm.checkPermission(new RuntimePermission(
+ContextAccessController.class.getName()
++ ".setSecurityToken"));
+}
 if ((!securityTokens.containsKey(name)) && (token != null)) {
 securityTokens.put(name, token);
 }

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1594230&r1=1594229&r2=1594230&view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue May 13 14:15:06 2014
@@ -157,8 +157,8 @@
 when running under a security manager. (markt)
   
   
-Make the naming context tokens for containers more robust by using a
-separate object. (markt/kkolinko)
+Make the naming context tokens for containers more robust. Require
+RuntimePermission when introducing a new token. (markt/kkolinko)
   
   
 56472: Allow NamingContextListener to clean up on stop if 
its



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



[Bug 56463] Allow to disable ServerInfo in directory listings in DefaultServlet

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56463

Violeta Georgieva  changed:

   What|Removed |Added

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

--- Comment #3 from Violeta Georgieva  ---
This has been fixed in trunk for 8.0.6 and in 7.0.x for 7.0.54 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



Re: svn commit: r1593303 - /tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java

2014-05-13 Thread Mark Thomas
On 12/05/2014 18:32, Rémy Maucherat wrote:
> 2014-05-12 16:25 GMT+02:00 Mark Thomas :
> 
>>
>> In terms of whether there is a better place, I didn't look lower down
>> the stack. We probably only want to swallow this if we haven't read any
>> part of the request line.
>>
> Ok, I'll add back the two try/catch I removed, I should have cleaned up
> the "bad" cases where the completion handler from the buffer is pending,
> but the processor is recycled. Hopefully ;)
> (if not, hey, it's still "beta")

Hmm. This isn't being triggered by shut down. I still see the
ReadPendingException if I add a breakpoint to one of the
TestCoyoteOutputStream unit tests before shut down starts.

It does appear that there is some form of timing issue that is
triggering multiple read events for the same thread.

I'm trying to track it down but the catch that I put in originally needs
to be removed.

... a few hours go by...

I think I have got to the bottom of this. An async dispatch always adds
the socket to the poller but if the dispatch occurs on a container
thread then it will also be added to the poller when that thread exits
the AbstractConnectionHandler.process() method.

This looks like a bug with all the connectors but one that is more
obvious with Nio2 because it triggers the ReadPendingException. Fixing
this bug highlighted a minor issue on shutdown. I have a fix for that
too. Commits to follow shortly.

Mark


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



Re: Tomcat 8 now available in Debian

2014-05-13 Thread Emmanuel Bourg
Le 12/05/2014 21:24, Christopher Schultz a écrit :

> Could you announce on u...@tomcat.apache.org as well? You have a bigger
> audience over there. Feel free to put [ANN] in the subject which is
> often put into announcement emails to our lists.

Thank you for the hint Christopher. I don't think I'm entitled to make
official announcements for Tomcat, but I'll post on the user list when
the package is backported to Debian stable.

Emmanuel Bourg


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



svn commit: r1594238 - /tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java

2014-05-13 Thread schultz
Author: schultz
Date: Tue May 13 14:52:26 2014
New Revision: 1594238

URL: http://svn.apache.org/r1594238
Log:
Replace looped String-concatenation with StringBuilder. No functional change.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?rev=1594238&r1=1594237&r2=1594238&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java Tue May 13 
14:52:26 2014
@@ -156,30 +156,30 @@ public class JDTCompiler extends org.apa
 @Override
 public NameEnvironmentAnswer
 findType(char[][] compoundTypeName) {
-String result = "";
-String sep = "";
+StringBuilder result = new StringBuilder();
 for (int i = 0; i < compoundTypeName.length; i++) {
-result += sep;
-result += new String(compoundTypeName[i]);
-sep = ".";
+if(i > 0)
+result.append('.');
+result.append(compoundTypeName[i]);
 }
-return findType(result);
+return findType(result.toString());
 }
 
 @Override
 public NameEnvironmentAnswer
 findType(char[] typeName,
  char[][] packageName) {
-String result = "";
-String sep = "";
-for (int i = 0; i < packageName.length; i++) {
-result += sep;
-result += new String(packageName[i]);
-sep = ".";
+StringBuilder result = new StringBuilder();
+int i=0;
+for ( ; i < packageName.length; i++) {
+if(i > 0)
+result.append('.');
+result.append(packageName[i]);
 }
-result += sep;
-result += new String(typeName);
-return findType(result);
+if(i > 0)
+result.append('.');
+result.append(typeName);
+return findType(result.toString());
 }
 
 private NameEnvironmentAnswer findType(String className) {
@@ -234,25 +234,26 @@ public class JDTCompiler extends org.apa
 @Override
 public boolean isPackage(char[][] parentPackageName,
  char[] packageName) {
-String result = "";
-String sep = "";
+StringBuilder result = new StringBuilder();
+int i=0;
 if (parentPackageName != null) {
-for (int i = 0; i < parentPackageName.length; i++) {
-result += sep;
-String str = new String(parentPackageName[i]);
-result += str;
-sep = ".";
+for (; i < parentPackageName.length; i++) {
+if(i > 0)
+result.append('.');
+result.append(parentPackageName[i]);
 }
 }
-String str = new String(packageName);
-if (Character.isUpperCase(str.charAt(0))) {
-if (!isPackage(result)) {
+
+if (Character.isUpperCase(packageName[0])) {
+if (!isPackage(result.toString())) {
 return false;
 }
 }
-result += sep;
-result += str;
-return isPackage(result);
+if(i > 0)
+result.append('.');
+result.append(packageName);
+
+return isPackage(result.toString());
 }
 
 @Override
@@ -396,19 +397,17 @@ public class JDTCompiler extends org.apa
 ClassFile classFile = classFiles[i];
 char[][] compoundName =
 classFile.getCompoundName();
-String className = "";
-String sep = "";
+  

[Bug 56501] problems with urlencoding in webapp name

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56501

--- Comment #6 from Mark Thomas  ---
(In reply to Kay from comment #5)

> i think there should be some kind on URL decode on tomcat side.

The problem is the exact opposite. Neither getRequestURI() not getContextPath()
should return decoded values but currently getContextPath() does.

I'll look into fixing this.

-- 
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



[GUMP@vmgump]: Project taglibs-parent (in module tomcat-taglibs) failed

2014-05-13 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project taglibs-parent has an issue affecting its community integration.
This issue affects 2 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- taglibs-parent :  Taglib Parent POM
- taglibs-standard-spec :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole pom output [pom.xml] identifier set to project name
 -INFO- Optional dependency commons-io failed with reason build failed
 -INFO- Optional dependency commons-collections failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/pom.xml
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/gump_work/build_tomcat-taglibs_taglibs-parent.html
Work Name: build_tomcat-taglibs_taglibs-parent (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: /opt/maven2/bin/mvn --batch-mode --settings 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/taglibs-parent]
M2_HOME: /opt/maven2
-
[INFO] Scanning for projects...
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error building POM (may not be this project's POM).


Project ID: junit:junit

Reason: Invalid JDK version in profile 'restrict-doclint': Unbounded range: 
[1.8, for project junit:junit


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Tue May 13 06:21:03 UTC 2014
[INFO] Final Memory: 4M/15M
[INFO] 
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 20140513060006, vmgump.apache.org:vmgump:20140513060006
Gump E-mail Identifier (unique within run) #12.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



[Bug 56403] Support pluggable password-derivation in Realms

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56403

--- Comment #5 from Christopher Schultz  ---
Created attachment 31615
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31615&action=edit
Example of an interface and implementation of both MessageDigest and PBKDF2

Attaching a self-contained driver, interface, and implementation of
CredentialMatcher for MessageDigest and PBKDF2.

This is the kind of thing I'd like to place into RealmBase (or, rather,
factor-out of RealmBase).

RealmBase currently has some additional code to allow prefixes such as {MD5},
{SSHA}, etc. to alter the behavior of the existing message-digest-only code.
None of that type of code has been included in this example as it can be
trivially added once the interfaces have been established.

I was thinking that the  could have a sub-element 
(or similar... I'm not happy with the interface's name but can't think of a
better one at the moment) that could identify the class to be used plus provide
all of the configuration attributes like salt-length, iteration-count,
algorithm name, and anything else an implementation may need. For
backward-compatibility, we'd default to MessageDigestCredentialMatcher and
route calls to RealmBase.setDigest() to
MessageDigestCredentialMatcher.setAlgorithm().

Comments are welcome!

-- 
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 56518] New: NIO async servlet limit latch leak

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

Bug ID: 56518
   Summary: NIO async servlet limit latch leak
   Product: Tomcat 7
   Version: 7.0.53
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P2
 Component: Connectors
  Assignee: dev@tomcat.apache.org
  Reporter: observer.h...@alibaba-inc.com

Created attachment 31613
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31613&action=edit
the sample webapp to reproduce the bug

we have encouter this bug in a real product webapp.

I have tested this in linux x86, oracle jdk jdk1.7.0_55, tomcat 7.0.53 and
tomcat 8.0.5.

CONFIG:
we change HTTP Connector to NIO in "server.xml", 
e.g. protocol="org.apache.coyote.http11.Http11NioProtocol"

WEBAPP LOGIC:
the simplified situation:
1. call "req.startAsync()" to start async serlvet, then execute the async logic
in our user thread.
2. sometimes the user thread be interrupted (by some timeout logic of our
code).
3. some user code call "resp.flushBuffer()" to send response to client

PROBLEM:
in the situation descibed above, the "LimitLatch.countDown()" is not called.
when the connections limit latch count up to max ( default "1" ),
tomcat DO not accept any connection, all incoming client hangs.

REPRODUCER:

in a clean tomcat-7.0.53 installation:
1. change the default "server.xml" Connector config.
(1) change protocol="org.apache.coyote.http11.Http11NioProtocol"
(2) Optional, add maxConnections="100" to reproduce the bug faster.
2. copy the sample webapp in the attachment to "webapps/ROOT.war"
3. start tomcat.
4. make plenty request to "/async.html", 

for (( i = 0; i < 15000; ++i )) ; do echo $i; curl localhost:8080/async.html;
done

each request is likely cause a limit latch leak.
when the requests reaches maxConnections (100 as we set above) or some more,
the client ( curl ) hangs.

TECHNIC-DETAILS:
after some debug, wo found these:

1. when the thread was interrupted, when the user code call
"resp.flushBuffer()",
the NioChannel was Closed by jdk NIO code, and a ClosedByInterruptException is
thrown.

2. when the channel closed, the SelectionKey was removed by Poller thread, 
stack trace:
Daemon Thread [http-nio-8080-ClientPoller-0] (Suspended)
owns: Object  (id=3346)
owns: HashSet  (id=3354)
owns: EPollSelectorImpl  (id=82)
owns: Collections$UnmodifiableSet  (id=3355)
owns: Util$2  (id=3356)
SocketChannelImpl(AbstractSelectableChannel).removeKey(SelectionKey) line:
114
EPollSelectorImpl(AbstractSelector).deregister(AbstractSelectionKey) line:
168
EPollSelectorImpl.implDereg(SelectionKeyImpl) line: 162
EPollSelectorImpl(SelectorImpl).processDeregisterQueue() line: 131
EPollSelectorImpl.doSelect(long) line: 69
EPollSelectorImpl(SelectorImpl).lockAndDoSelect(long) line: 69
EPollSelectorImpl(SelectorImpl).select(long) line: 80
NioEndpoint$Poller.run() line: 1163
Thread.run() line: 662

3. when we call "ctx.complete()", it run to
"org.apache.tomcat.util.net.NioEndpoint.processSocket(NioChannel, SocketStatus,
boolean)", code is below:

public boolean processSocket(NioChannel socket, SocketStatus status,
boolean dispatch) {
try {
KeyAttachment attachment =
(KeyAttachment)socket.getAttachment(false);
if (attachment == null) {
return false;
}

since the SelectionKey was removed, the "attachment" returns null.
the logic is break, "AbstractEndpoint.countDownConnection()" is not called, a
limit latch leak happens.

WORK-AROUND:
some work-around:
1. switch to the stable BIO connector.
2. avoid call "resp.flushBuffer()" in the user thread.

-- 
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-trunk

2014-05-13 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/69

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1594229
Blamelist: kkolinko

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: r1594346 - /tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 19:39:43 2014
New Revision: 1594346

URL: http://svn.apache.org/r1594346
Log:
Keep Checkstyle happy

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?rev=1594346&r1=1594345&r2=1594346&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java Tue May 13 
19:39:43 2014
@@ -171,7 +171,7 @@ public class JDTCompiler extends org.apa
  char[][] packageName) {
 StringBuilder result = new StringBuilder();
 int i=0;
-for ( ; i < packageName.length; i++) {
+for (; i < packageName.length; i++) {
 if(i > 0)
 result.append('.');
 result.append(packageName[i]);



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



Re: Plans for 8.0.6

2014-05-13 Thread Mark Thomas
On 13/05/2014 11:43, Rémy Maucherat wrote:
> 2014-05-13 9:37 GMT+02:00 Mark Thomas :
> 
>> I'm running the unit tests now. I want to look at BZ 56516 some more and
>> I don't want to hold up a 8.0.x release any longer.
>>
> 
> There's nothing to look at IMO, the guy is using scriptlets and expects
> things to work with the tag variable. Jasper has no idea to know there's
> flow control in his Java code fragments.
> 
> Rémy
> 
> From his test case (with a "message" variable info):
> <%
> try {
> %>
> 
> <%
> } catch (Exception e) {
> //String message = null;
> %>
> 
> <%
> }
> %>

Indeed. So do we:

a) do nothing

b) declare variables just after the implicit variables so they are
always in scope

c) add some { } blocks and declare the variable once each time the tag
is used?

I've been looking through the specification but haven't found anything
yet that would suggest a preferred approach. Equally, I haven't found
anything to suggest that a) is valid in this case.

Mark


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



[Bug 56518] NIO async servlet limit latch leak

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

hanyong  changed:

   What|Removed |Added

 CC||observer.hany@alibaba-inc.c
   ||om

-- 
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-trunk

2014-05-13 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/70

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

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1594238
Blamelist: schultz

Build succeeded!

sincerely,
 -The Buildbot




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



[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread cpbills
Github user cpbills closed the pull request at:

https://github.com/apache/tomcat/pull/7


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



svn commit: r1594380 - in /tomcat/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java tomcat/util/net/NioEndpoint.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 20:55:24 2014
New Revision: 1594380

URL: http://svn.apache.org/r1594380
Log:
Merge processSocket() and dispatchForEvent()

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

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1594380&r1=1594379&r2=1594380&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
13 20:55:24 2014
@@ -504,7 +504,7 @@ public class Http11NioProcessor extends 
 } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
 socketWrapper.clearDispatches();
 if (asyncStateMachine.asyncComplete()) {
-
((NioEndpoint)endpoint).dispatchForEvent(this.socketWrapper.getSocket(),SocketStatus.OPEN_READ,
 true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
 if (param==null) {
@@ -519,7 +519,7 @@ public class Http11NioProcessor extends 
 attach.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {
-
((NioEndpoint)endpoint).dispatchForEvent(this.socketWrapper.getSocket(),SocketStatus.OPEN_READ,
 true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 }
 }

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1594380&r1=1594379&r2=1594380&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 13 
20:55:24 2014
@@ -604,14 +604,11 @@ public class NioEndpoint extends Abstrac
 @Override
 public void processSocket(SocketWrapper socketWrapper,
 SocketStatus socketStatus, boolean dispatch) {
-dispatchForEvent(socketWrapper.getSocket(), socketStatus, dispatch);
-}
-
-public void dispatchForEvent(NioChannel socket, SocketStatus status, 
boolean dispatch) {
-if (dispatch && status == SocketStatus.OPEN_READ) {
+NioChannel socket = socketWrapper.getSocket();
+if (dispatch && socketStatus == SocketStatus.OPEN_READ) {
 socket.getPoller().add(socket, OP_CALLBACK);
 } else {
-processSocket(socket,status,dispatch);
+processSocket(socket, socketStatus, dispatch);
 }
 }
 



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



svn commit: r1594028 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/connector/ java/org/apache/tomcat/util/http/mapper/ test/org/apache/catalina/connector/ webapps/docs/

2014-05-13 Thread markt
Author: markt
Date: Mon May 12 16:56:56 2014
New Revision: 1594028

URL: http://svn.apache.org/r1594028
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56501
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56501
HttpServletRequest.getContextPath() should return the undecoded context path 
used by the user agent.

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/java/org/apache/tomcat/util/http/mapper/Mapper.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/MappingData.java
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
  Merged /tomcat/trunk:r1593621

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java?rev=1594028&r1=1594027&r2=1594028&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/connector/Request.java Mon 
May 12 16:56:56 2014
@@ -1990,7 +1990,17 @@ public class Request
  */
 @Override
 public String getContextPath() {
-return mappingData.contextPath.toString();
+String uri = getRequestURI();
+int lastSlash = mappingData.contextSlashCount;
+int pos = 0;
+while (lastSlash > 0) {
+pos = uri.indexOf('/', pos + 1);
+if (pos == -1) {
+return uri;
+}
+lastSlash--;
+}
+return uri.substring(0, pos);
 }
 
 

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java?rev=1594028&r1=1594027&r2=1594028&view=diff
==
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/Mapper.java 
Mon May 12 16:56:56 2014
@@ -237,6 +237,7 @@ public final class Mapper {
 new ContextVersion[contextVersions.length + 1];
 ContextVersion newContextVersion = new ContextVersion();
 newContextVersion.path = path;
+newContextVersion.slashCount = slashCount;
 newContextVersion.name = version;
 newContextVersion.object = context;
 newContextVersion.welcomeResources = welcomeResources;
@@ -814,6 +815,7 @@ public final class Mapper {
 }
 }
 mappingData.context = contextVersion.object;
+mappingData.contextSlashCount = contextVersion.slashCount;
 }
 
 // Wrapper mapping
@@ -1503,6 +1505,7 @@ public final class Mapper {
 
 protected static final class ContextVersion extends MapElement {
 public String path = null;
+public int slashCount;
 public String[] welcomeResources = new String[0];
 public javax.naming.Context resources = null;
 public Wrapper defaultWrapper = null;

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/MappingData.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/MappingData.java?rev=1594028&r1=1594027&r2=1594028&view=diff
==
--- 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/MappingData.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/http/mapper/MappingData.java 
Mon May 12 16:56:56 2014
@@ -28,6 +28,7 @@ public class MappingData {
 
 public Object host = null;
 public Object context = null;
+public int contextSlashCount = 0;
 public Object[] contexts = null;
 public Object wrapper = null;
 public boolean jspWildCard = false;
@@ -42,6 +43,7 @@ public class MappingData {
 public void recycle() {
 host = null;
 context = null;
+contextSlashCount = 0;
 contexts = null;
 wrapper = null;
 jspWildCard = false;

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java?rev=1594028&r1=1594027&r2=1594028&view=diff
==
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.java 
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/connector/TestRequest.ja

svn commit: r1594393 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioEndpoint.java res/LocalStrings.properties res/LocalStrings_es.properties

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 21:24:04 2014
New Revision: 1594393

URL: http://svn.apache.org/r1594393
Log:
Remove unused code

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1594393&r1=1594392&r2=1594393&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 13 
21:24:04 2014
@@ -1532,7 +1532,6 @@ public class NioEndpoint extends Abstrac
 }
 
 private void doRun(SelectionKey key, KeyAttachment ka) {
-boolean launch = false;
 try {
 int handshake = -1;
 
@@ -1631,16 +1630,6 @@ public class NioEndpoint extends Abstrac
 socket.getPoller().cancelledKey(key,SocketStatus.ERROR);
 }
 } finally {
-if (launch) {
-try {
-getExecutor().execute(new SocketProcessor(socket, 
SocketStatus.OPEN_READ));
-} catch (NullPointerException npe) {
-if (running) {
-log.error(sm.getString("endpoint.launch.fail"),
-npe);
-}
-}
-}
 socket = null;
 status = null;
 //return to cache

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties?rev=1594393&r1=1594392&r2=1594393&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings.properties 
Tue May 13 21:24:04 2014
@@ -40,7 +40,6 @@ endpoint.init.listen=Socket listen faile
 endpoint.init.notavail=APR not available
 endpoint.accept.fail=Socket accept failed
 endpoint.getAttribute=[{0}] is [{1}]
-endpoint.launch.fail=Failed to launch new runnable
 endpoint.poll.limitedpollsize=Failed to create poller with specified size of 
{0}
 endpoint.poll.initfail=Poller creation failed
 endpoint.poll.fail=Critical poller failure (restarting poller): [{0}] {1}

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties?rev=1594393&r1=1594392&r2=1594393&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/res/LocalStrings_es.properties 
Tue May 13 21:24:04 2014
@@ -21,7 +21,6 @@ endpoint.init.bind = Ligado de conector 
 endpoint.init.listen = Escucha de conector fall\u00F3\: [{0}] {1}
 endpoint.init.notavail = APR no disponible
 endpoint.accept.fail = Aceptaci\u00F3n de conector fall\u00F3
-endpoint.launch.fail = No pude lanzar nuevo ejecutable
 endpoint.poll.limitedpollsize = No pude crear encuestador de medida 
espec\u00EDfica de {0}
 endpoint.poll.initfail = Fall\u00F3 la creaci\u00F3n del encuestador
 endpoint.poll.fail = Fallo cr\u00EDtico de encuestador (reiniciando 
encuestador)\: [{0}] {1}



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



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

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 20:50:20 2014
New Revision: 1594377

URL: http://svn.apache.org/r1594377
Log:
Return value is never used (and is hard coded to true anyway) so change return 
type to void.

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1594377&r1=1594376&r2=1594377&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 13 
20:50:20 2014
@@ -607,13 +607,12 @@ public class NioEndpoint extends Abstrac
 dispatchForEvent(socketWrapper.getSocket(), socketStatus, dispatch);
 }
 
-public boolean dispatchForEvent(NioChannel socket, SocketStatus status, 
boolean dispatch) {
+public void dispatchForEvent(NioChannel socket, SocketStatus status, 
boolean dispatch) {
 if (dispatch && status == SocketStatus.OPEN_READ) {
 socket.getPoller().add(socket, OP_CALLBACK);
 } else {
 processSocket(socket,status,dispatch);
 }
-return true;
 }
 
 protected boolean processSocket(NioChannel socket, SocketStatus status, 
boolean dispatch) {



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



[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread cpbills
Github user cpbills closed the pull request at:

https://github.com/apache/tomcat/pull/8


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



svn commit: r1594386 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 21:12:36 2014
New Revision: 1594386

URL: http://svn.apache.org/r1594386
Log:
Consistent naming

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1594386&r1=1594385&r2=1594386&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue May 13 
21:12:36 2014
@@ -585,13 +585,13 @@ public class Nio2Endpoint extends Abstra
 processSocket0(socketWrapper, socketStatus, dispatch);
 }
 
-protected boolean processSocket0(SocketWrapper socket, 
SocketStatus status, boolean dispatch) {
+protected boolean processSocket0(SocketWrapper socketWrapper, 
SocketStatus status, boolean dispatch) {
 try {
 SocketProcessor sc = (useCaches) ? processorCache.pop() : null;
 if (sc == null) {
-sc = new SocketProcessor(socket, status);
+sc = new SocketProcessor(socketWrapper, status);
 } else {
-sc.reset(socket, status);
+sc.reset(socketWrapper, status);
 }
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
@@ -600,7 +600,7 @@ public class Nio2Endpoint extends Abstra
 sc.run();
 }
 } catch (RejectedExecutionException ree) {
-log.debug(sm.getString("endpoint.executor.fail", socket), ree);
+log.debug(sm.getString("endpoint.executor.fail", socketWrapper), 
ree);
 return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);



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



svn commit: r1594405 - in /tomcat/trunk/java/org/apache/tomcat/util/net: NioBlockingSelector.java NioEndpoint.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 22:17:21 2014
New Revision: 1594405

URL: http://svn.apache.org/r1594405
Log:
Remove duplicate method

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

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=1594405&r1=1594404&r2=1594405&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue 
May 13 22:17:21 2014
@@ -245,7 +245,7 @@ public class NioBlockingSelector {
 
 public void add(final KeyAttachment key, final int ops, final 
KeyReference ref) {
 if ( key == null ) return;
-NioChannel nch = key.getChannel();
+NioChannel nch = key.getSocket();
 if ( nch == null ) return;
 final SocketChannel ch = nch.getIOChannel();
 if ( ch == null ) return;
@@ -276,7 +276,7 @@ public class NioBlockingSelector {
 
 public void remove(final KeyAttachment key, final int ops) {
 if ( key == null ) return;
-NioChannel nch = key.getChannel();
+NioChannel nch = key.getSocket();
 if ( nch == null ) return;
 final SocketChannel ch = nch.getIOChannel();
 if ( ch == null ) return;

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1594405&r1=1594404&r2=1594405&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 13 
22:17:21 2014
@@ -956,12 +956,12 @@ public class NioEndpoint extends Abstrac
 if (ka != null && ka.isComet() && status != null) {
 ka.setComet(false);//to avoid a loop
 if (status == SocketStatus.TIMEOUT ) {
-if (processSocket(ka.getChannel(), status, true)) {
+if (processSocket(ka.getSocket(), status, true)) {
 return; // don't close on comet timeout
 }
 } else {
 // Don't dispatch if the lines below are canceling the 
key
-processSocket(ka.getChannel(), status, false);
+processSocket(ka.getSocket(), status, false);
 }
 }
 key.attach(null);
@@ -1126,7 +1126,7 @@ public class NioEndpoint extends Abstrac
 cancelledKey(sk, SocketStatus.STOP);
 } else if ( sk.isValid() && attachment != null ) {
 attachment.access();//make sure we don't time out valid 
sockets
-NioChannel channel = attachment.getChannel();
+NioChannel channel = attachment.getSocket();
 if (sk.isReadable() || sk.isWritable() ) {
 if ( attachment.getSendfileData() != null ) {
 processSendfile(sk,attachment, false);
@@ -1189,7 +1189,7 @@ public class NioEndpoint extends Abstrac
 }
 
 //configure output channel
-sc = attachment.getChannel();
+sc = attachment.getSocket();
 sc.setSendFile(true);
 //ssl channel is slightly different
 WritableByteChannel wc = ((sc instanceof 
SecureNioChannel)?sc:sc.getIOChannel());
@@ -1228,7 +1228,7 @@ public class NioEndpoint extends Abstrac
 log.debug("Connection is keep alive, 
registering back for OP_READ");
 }
 if (event) {
-
this.add(attachment.getChannel(),SelectionKey.OP_READ);
+
this.add(attachment.getSocket(),SelectionKey.OP_READ);
 } else {
 reg(sk,attachment,SelectionKey.OP_READ);
 }
@@ -1244,7 +1244,7 @@ public class NioEndpoint extends Abstrac
 log.debug("OP_WRITE for sendfile: " + sd.fileName);
 }
 if (event) {
-add(attachment.getChannel(),SelectionKey.OP_WRITE);
+add(attachment.getSocket(),SelectionKey.OP_WRITE);
 } else {
 reg(sk,attachment,SelectionKey.OP_WRITE);
 }
@@ -1302,7 +1302,7 @@ public class NioEndpoint ex

[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread cpbills
GitHub user cpbills opened a pull request:

https://github.com/apache/tomcat/pull/8

Fix how a link to $0 is determined

- The test '-L' is true of the file provided is a symbolic link
- 'readlink -f' will print the absolute path to a symbolic link's target
- 'readlink -n' will skip a trailing newline

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cpbills/tomcat fix_link_logic

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tomcat/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #8


commit c0b3e571182ace0ff4525e24677148020b6667be
Author: Christopher P. Bills 
Date:   2014-05-12T22:08:09Z

Fix how a link to $0 is determined

- The test '-L' is true of the file provided is a symbolic link
- 'readlink -f' will print the absolute path to a symbolic link's target
- 'readlink -n' will skip a trailing newline




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



svn commit: r1594381 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11AprProcessor.java Http11Processor.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 20:59:25 2014
New Revision: 1594381

URL: http://svn.apache.org/r1594381
Log:
Remove unnecessary casts

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1594381&r1=1594380&r2=1594381&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Tue May 
13 20:59:25 2014
@@ -470,8 +470,7 @@ public class Http11AprProcessor extends 
 } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
 socketWrapper.clearDispatches();
 if (asyncStateMachine.asyncComplete()) {
-((AprEndpoint)endpoint).processSocket(this.socketWrapper,
-SocketStatus.OPEN_READ, true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
 if (param==null) {
@@ -481,8 +480,7 @@ public class Http11AprProcessor extends 
 socketWrapper.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {
-((AprEndpoint)endpoint).processSocket(this.socketWrapper,
-SocketStatus.OPEN_READ, true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1594381&r1=1594380&r2=1594381&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Tue May 13 
20:59:25 2014
@@ -370,8 +370,7 @@ public class Http11Processor extends Abs
 } else if (actionCode == ActionCode.ASYNC_COMPLETE) {
 socketWrapper.clearDispatches();
 if (asyncStateMachine.asyncComplete()) {
-((JIoEndpoint) endpoint).processSocket(this.socketWrapper,
-SocketStatus.OPEN_READ, true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
 if (param == null) return;
@@ -380,8 +379,7 @@ public class Http11Processor extends Abs
 socketWrapper.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {
-((JIoEndpoint) endpoint).processSocket(this.socketWrapper,
-SocketStatus.OPEN_READ, true);
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 }
 }



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



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

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 22:53:21 2014
New Revision: 1594412

URL: http://svn.apache.org/r1594412
Log:
Whitespace police

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

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1594412&r1=1594411&r2=1594412&view=diff
==
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue May 13 22:53:21 2014
@@ -234,7 +234,7 @@
   
   
 56518: Fix connection limit latch leak when a non-container
-thread is interrupted during asynchronous processing. (markt) 
+thread is interrupted during asynchronous processing. (markt)
   
 
   



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



Re: Tomcat 8 now available in Debian

2014-05-13 Thread Christopher Schultz
Emmanuel,

On 5/13/14, 11:16 AM, Emmanuel Bourg wrote:
> Le 12/05/2014 21:24, Christopher Schultz a écrit :
> 
>> Could you announce on u...@tomcat.apache.org as well? You have a bigger
>> audience over there. Feel free to put [ANN] in the subject which is
>> often put into announcement emails to our lists.
> 
> Thank you for the hint Christopher. I don't think I'm entitled to make
> official announcements for Tomcat, but I'll post on the user list when
> the package is backported to Debian stable.

You wouldn't be making an official announcement for Tomcat; you'd be
making one about Debian. We have some community members that announce
the availability of certain tools, etc. when the become available. I
personally think it would be entirely appropriate for you to make such
an announcement on the users' list.

You might want to provide a link to the documentation for the package.
We often get questions about package-managed versions of Tomcat and the
usual reply is "those things are a mess that nobody (like us) can
understand: go install one fresh from tomcat.apache.org". If you have
good documentation about how things work in the Debian system, it will
make the world a better place.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


Re: Proposed patch for JDTCompiler

2014-05-13 Thread Christopher Schultz
Rémy,

On 5/7/14, 9:33 AM, Rémy Maucherat wrote:
> 2014-05-06 19:25 GMT+02:00 Christopher Schultz > :
> 
>>
>> Since this is not really a "bug" per se, I decided not to create a BZ
>> issue. If it would be easier for everyone if I attached the patch to a
>> BZ issue I'm happy to do that as well.
>>
> 
> Ok, but this is not a review then commit branch, so you can commit it
> without asking. I think it is a good idea to ask for comments for features
> and significant refactorings, but this one looks like a regular enhancement.

Yes, I know we're RTC but I wanted to avoid any confusion if I was doing
something that was viewed as being a bad idea.

Thanks,
-chris



signature.asc
Description: OpenPGP digital signature


[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread kkolinko
Github user kkolinko commented on the pull request:

https://github.com/apache/tomcat/pull/7#issuecomment-43018127
  
http://pubs.opengroup.org/onlinepubs/009695399/mindex.html
http://pubs.opengroup.org/onlinepubs/9699919799/mindex.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



svn commit: r1594411 - in /tomcat/trunk: java/org/apache/tomcat/util/net/NioEndpoint.java webapps/docs/changelog.xml

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 22:51:19 2014
New Revision: 1594411

URL: http://svn.apache.org/r1594411
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56518
Refactor NIO's SocketProcessor to use KeyAtrtachment rather than Socket to 
align it with the other implementations. This enables a number of 
attachment->socket->attachment transitions to be skipped which appears to 
resolve the root cause of BZ 56518. Since the wrapper is available and can be 
processed, it becomes possible to reduce the connection count when the socket 
is closed by the interrupt.

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1594411&r1=1594410&r2=1594411&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Tue May 13 
22:51:19 2014
@@ -605,23 +605,22 @@ public class NioEndpoint extends Abstrac
 public void processSocket(SocketWrapper socketWrapper,
 SocketStatus socketStatus, boolean dispatch) {
 NioChannel socket = socketWrapper.getSocket();
-if (dispatch && socketStatus == SocketStatus.OPEN_READ) {
+if (socket.isOpen() && dispatch && socketStatus == 
SocketStatus.OPEN_READ) {
 socket.getPoller().add(socket, OP_CALLBACK);
 } else {
-processSocket(socket, socketStatus, dispatch);
+processSocket((KeyAttachment) socketWrapper, socketStatus, 
dispatch);
 }
 }
 
-protected boolean processSocket(NioChannel socket, SocketStatus status, 
boolean dispatch) {
+protected boolean processSocket(KeyAttachment attachment, SocketStatus 
status, boolean dispatch) {
 try {
-KeyAttachment attachment = 
(KeyAttachment)socket.getAttachment(false);
 if (attachment == null) {
 return false;
 }
 attachment.setCometNotify(false); //will get reset upon next reg
 SocketProcessor sc = processorCache.pop();
-if ( sc == null ) sc = new SocketProcessor(socket,status);
-else sc.reset(socket,status);
+if ( sc == null ) sc = new SocketProcessor(attachment, status);
+else sc.reset(attachment, status);
 Executor executor = getExecutor();
 if (dispatch && executor != null) {
 executor.execute(sc);
@@ -629,7 +628,7 @@ public class NioEndpoint extends Abstrac
 sc.run();
 }
 } catch (RejectedExecutionException ree) {
-log.warn(sm.getString("endpoint.executor.fail", socket), ree);
+log.warn(sm.getString("endpoint.executor.fail", 
attachment.getSocket()), ree);
 return false;
 } catch (Throwable t) {
 ExceptionUtils.handleThrowable(t);
@@ -900,7 +899,8 @@ public class NioEndpoint extends Abstrac
 }
 addEvent(r);
 if (close) {
-processSocket(socket, SocketStatus.STOP, false);
+NioEndpoint.KeyAttachment ka = 
(NioEndpoint.KeyAttachment)socket.getAttachment(false);
+processSocket(ka, SocketStatus.STOP, false);
 }
 }
 
@@ -956,12 +956,12 @@ public class NioEndpoint extends Abstrac
 if (ka != null && ka.isComet() && status != null) {
 ka.setComet(false);//to avoid a loop
 if (status == SocketStatus.TIMEOUT ) {
-if (processSocket(ka.getSocket(), status, true)) {
+if (processSocket(ka, status, true)) {
 return; // don't close on comet timeout
 }
 } else {
 // Don't dispatch if the lines below are canceling the 
key
-processSocket(ka.getSocket(), status, false);
+processSocket(ka, status, false);
 }
 }
 key.attach(null);
@@ -1126,7 +1126,6 @@ public class NioEndpoint extends Abstrac
 cancelledKey(sk, SocketStatus.STOP);
 } else if ( sk.isValid() && attachment != null ) {
 attachment.access();//make sure we don't time out valid 
sockets
-NioChannel channel = attachment.getSocket();
 if (sk.isReadable() || sk.isWritable() ) {
 if ( attachment.getSendfileData() != null ) {
 processSendfile(sk,attachment, false);
@@ -1136,12 +1135,12 @@ public class NioEndpoint extends Abstrac
 boolean closeSocket = false;
   

[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread cpbills
GitHub user cpbills opened a pull request:

https://github.com/apache/tomcat/pull/7

Fix how a link to $0 is determined

- The test '-L' is true of the file provided is a symbolic link
- 'readlink -f' will print the absolute path to a symbolic link's target
- 'readlink -n' will skip a trailing newline

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cpbills/tomcat fix_link_logic

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tomcat/pull/7.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #7


commit 27fa81523cf8021477bb5dbaab29c23a5aace08a
Author: Christopher P. Bills 
Date:   2014-05-12T22:08:09Z

Fix how a link to $0 is determined

- The test '-L' is true of the file provided is a symbolic link
- 'readlink -f' will print the absolute path to a symbolic link's target
- 'readlink -n' will skip a trailing newline




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] tomcat pull request: Fix how a link to $0 is determined

2014-05-13 Thread cpbills
Github user cpbills commented on the pull request:

https://github.com/apache/tomcat/pull/7#issuecomment-43012973
  
Seems like there are other scripts that need fixing; closing for now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



svn commit: r1594383 - in /tomcat/trunk/java/org/apache/coyote/http11: AbstractHttp11Processor.java Http11AprProcessor.java Http11Nio2Processor.java Http11NioProcessor.java Http11Processor.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 21:07:35 2014
New Revision: 1594383

URL: http://svn.apache.org/r1594383
Log:
Pull up common async code

Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1594383&r1=1594382&r2=1594383&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Tue 
May 13 21:07:35 2014
@@ -816,6 +816,22 @@ public abstract class AbstractHttp11Proc
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncTimingOut());
 } else if (actionCode == ActionCode.ASYNC_IS_ERROR) {
 ((AtomicBoolean) param).set(asyncStateMachine.isAsyncError());
+} else if (actionCode == ActionCode.ASYNC_COMPLETE) {
+socketWrapper.clearDispatches();
+if (asyncStateMachine.asyncComplete()) {
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
+}
+} else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
+if (param == null || socketWrapper == null) {
+return;
+}
+long timeout = ((Long)param).longValue();
+// If we are not piggy backing on a worker thread, set the timeout
+socketWrapper.setTimeout(timeout);
+} else if (actionCode == ActionCode.ASYNC_DISPATCH) {
+if (asyncStateMachine.asyncDispatch()) {
+endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
+}
 } else if (actionCode == ActionCode.UPGRADE) {
 httpUpgradeHandler = (HttpUpgradeHandler) param;
 // Stop further HTTP output

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1594383&r1=1594382&r2=1594383&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Tue May 
13 21:07:35 2014
@@ -467,22 +467,6 @@ public class Http11AprProcessor extends 
 SocketStatus.OPEN_READ, true);
 } else if (actionCode == ActionCode.COMET_SETTIMEOUT) {
 //no op
-} else if (actionCode == ActionCode.ASYNC_COMPLETE) {
-socketWrapper.clearDispatches();
-if (asyncStateMachine.asyncComplete()) {
-endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
-}
-} else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
-if (param == null || socketWrapper == null) {
-return;
-}
-long timeout = ((Long)param).longValue();
-// If we are not piggy backing on a worker thread, set the timeout
-socketWrapper.setTimeout(timeout);
-} else if (actionCode == ActionCode.ASYNC_DISPATCH) {
-if (asyncStateMachine.asyncDispatch()) {
-endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
-}
 }
 }
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java?rev=1594383&r1=1594382&r2=1594383&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java Tue May 
13 21:07:35 2014
@@ -518,22 +518,6 @@ public class Http11Nio2Processor extends
 if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE ) {
 socketWrapper.setTimeout(timeout);
 }
-} else if (actionCode == ActionCode.ASYNC_COMPLETE) {
-socketWrapper.clearDispatches();
-if (asyncStateMachine.asyncComplete()) {
-endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
-}
-} else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
-if (param == null || socketWrapper == null) {
-return;
-}
-long timeout = ((Long)

[Bug 56399] Re-factor request/response recycling so Coyote and Catalina objects are recycled simultaneously

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56399

--- Comment #1 from Konstantin Kolinko  ---
The feature (but not the refactoring it implied) was implemented in Tomcat 8
with r1594436 and will be in 8.0.6.

-- 
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: r1594436 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ webapps/docs/

2014-05-13 Thread kkolinko
Author: kkolinko
Date: Wed May 14 00:44:33 2014
New Revision: 1594436

URL: http://svn.apache.org/r1594436
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56399
When recycling a Coyote request, ensure that Catalina request have been 
recycled.

Modified:
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
tomcat/trunk/java/org/apache/coyote/Adapter.java
tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/webapps/docs/changelog.xml

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=1594436&r1=1594435&r2=1594436&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Wed May 
14 00:44:33 2014
@@ -655,6 +655,41 @@ public class CoyoteAdapter implements Ad
 }
 
 
+private static class RecycleRequiredException extends Exception {
+private static final long serialVersionUID = 1L;
+}
+
+@Override
+public void checkRecycled(org.apache.coyote.Request req,
+org.apache.coyote.Response res) {
+Request request = (Request) req.getNote(ADAPTER_NOTES);
+Response response = (Response) res.getNote(ADAPTER_NOTES);
+try {
+if (request != null) {
+if (request.getContext() != null || request.getHost() != null)
+throw new RecycleRequiredException();
+}
+if (response != null) {
+if (response.getContentWritten() != 0)
+throw new RecycleRequiredException();
+}
+} catch (RecycleRequiredException e) {
+String message = sm.getString("coyoteAdapter.checkRecycled");
+if (connector.getState().isAvailable()) {
+log.warn(message, e);
+} else {
+// There may be some aborted requests.
+// When connector shuts down, the request and response will not
+// be reused, so there is no issue to warn about here.
+log.debug(message, e);
+}
+// Log this request, as it has probably skipped the access log.
+// The log() method will take care of recycling.
+log(req, res, 0L);
+}
+}
+
+
 @Override
 public String getDomain() {
 return connector.getDomain();

Modified: 
tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties?rev=1594436&r1=1594435&r2=1594436&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties 
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/LocalStrings.properties Wed 
May 14 00:44:33 2014
@@ -17,6 +17,7 @@ cometEvent.nullRequest=The event object 
 
 coyoteAdapter.accesslogFail=Exception while attempting to add an entry to the 
access log
 coyoteAdapter.asyncDispatch=Exception while processing an asynchronous request
+coyoteAdapter.checkRecycled=A non-recycled request encountered. It will be 
recycled forcedly.
 coyoteAdapter.debug=The variable [{0}] has value [{1}]
 coyoteAdapter.parsePathParam=Unable to parse the path parameters using 
encoding [{0}]. The path parameters in the URL will be ignored.
 

Modified: tomcat/trunk/java/org/apache/coyote/Adapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/Adapter.java?rev=1594436&r1=1594435&r2=1594436&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/Adapter.java (original)
+++ tomcat/trunk/java/org/apache/coyote/Adapter.java Wed May 14 00:44:33 2014
@@ -56,6 +56,19 @@ public interface Adapter {
 public void log(Request req, Response res, long time);
 
 /**
+ * Assert that request and response have been recycled. If they have not
+ * then log a warning and force a recycle. This method is called as a 
safety
+ * check when a processor is being recycled and may be returned to a pool
+ * for reuse.
+ *
+ * @param req
+ *Request
+ * @param res
+ *Response
+ */
+public void checkRecycled(Request req, Response res);
+
+/**
  * Provide the name of the domain to use to register MBeans for conponents
  * associated with the connector.
  *

Modified: tomcat/trunk/java/org/apache/coyote/ajp/AbstractAjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomca

[Bug 56512] filter url-pattern xyz/* does not match xyz/

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56512

--- Comment #3 from j...@yahoo.com ---
argh.  i was staring at that for ages and kept reading it as
`requestPath.charAt(requestPath.length() - 2)` .  must be something wrong with
my testcase then.  will go back and see.

-- 
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 56516] VariableInfo doesn't handle scope changes correctly

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56516

--- Comment #1 from Konstantin Kolinko  ---
Do you expect a variable to be declared each time when
VariableInfo.getDeclare() returns true?
When JSP java code is generated the java scriptlets are treated as opaque. One
does not analyze what curly braces you may have in that code.


Just a quick note:
The last attempt to review variables declaration (4 years ago with bug 42390
and bug 48616 ) was somewhat painful, with regressions and reverts.

For reference:
- See places that call javax.servlet.jsp.tagext.VariableInfo.getDeclare()
- r910792

Fortunately, we have test cases for 42390 and 48616 in trunk
(TestScriptingVariabler, bug42390.jsp, bug48616*.jsp).

-- 
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 56518] NIO async servlet limit latch leak

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #2 from Mark Thomas  ---
Thanks for the sample web application. I am able to reproduce this with NIO but
not with NIO2 or APR/native so it appears that this issue is specific to NIO.

I have started some refactoring that should make this simpler to fix (in 8.0.x
at least) but it doesn't look like there is an easy fix for this.

-- 
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



[GUMP@vmgump]: Project taglibs-parent (in module tomcat-taglibs) failed

2014-05-13 Thread Gump
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project taglibs-parent has an issue affecting its community integration.
This issue affects 2 projects,
 and has been outstanding for 4 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- taglibs-parent :  Taglib Parent POM
- taglibs-standard-spec :  JSP Taglibs


Full details are available at:

http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Sole pom output [pom.xml] identifier set to project name
 -INFO- Optional dependency commons-io failed with reason build failed
 -INFO- Optional dependency commons-collections failed with reason build failed
 -DEBUG- (Apache Gump generated) Apache Maven Settings in: 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/gump_mvn_settings.xml
 -INFO- Failed with reason build failed
 -DEBUG- Maven POM in: 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/pom.xml
 -DEBUG- Extracted fallback artifacts from Gump Repository



The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/gump_work/build_tomcat-taglibs_taglibs-parent.html
Work Name: build_tomcat-taglibs_taglibs-parent (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: /opt/maven2/bin/mvn --batch-mode --settings 
/srv/gump/public/workspace/tomcat-taglibs/taglibs-parent/gump_mvn_settings.xml 
install 
[Working Directory: /srv/gump/public/workspace/tomcat-taglibs/taglibs-parent]
M2_HOME: /opt/maven2
-
[INFO] Scanning for projects...
[INFO] 
[ERROR] BUILD ERROR
[INFO] 
[INFO] Error building POM (may not be this project's POM).


Project ID: junit:junit

Reason: Invalid JDK version in profile 'restrict-doclint': Unbounded range: 
[1.8, for project junit:junit


[INFO] 
[INFO] For more information, run Maven with the -e switch
[INFO] 
[INFO] Total time: 1 second
[INFO] Finished at: Wed May 14 00:21:15 UTC 2014
[INFO] Final Memory: 4M/15M
[INFO] 
-

To subscribe to this information via syndicated feeds:
- RSS: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/rss.xml
- Atom: 
http://vmgump.apache.org/gump/public/tomcat-taglibs/taglibs-parent/atom.xml

== Gump Tracking Only ===
Produced by Apache Gump(TM) version 2.3.
Gump Run 2014051406, vmgump.apache.org:vmgump:2014051406
Gump E-mail Identifier (unique within run) #12.

--
Apache Gump
http://gump.apache.org/ [Instance: vmgump]

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



svn commit: r1594382 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11AprProcessor.java Http11Nio2Processor.java Http11NioProcessor.java Http11Processor.java

2014-05-13 Thread markt
Author: markt
Date: Tue May 13 21:05:33 2014
New Revision: 1594382

URL: http://svn.apache.org/r1594382
Log:
Align code across the Processors
Note for NIO that the socketWrapper is the KeyAttachment which allows the NIO 
code to be simplified

Modified:
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1594382&r1=1594381&r2=1594382&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Tue May 
13 21:05:33 2014
@@ -473,18 +473,17 @@ public class Http11AprProcessor extends 
 endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
-if (param==null) {
+if (param == null || socketWrapper == null) {
 return;
 }
 long timeout = ((Long)param).longValue();
+// If we are not piggy backing on a worker thread, set the timeout
 socketWrapper.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {
 endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 }
-
-
 }
 
 

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java?rev=1594382&r1=1594381&r2=1594382&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Nio2Processor.java Tue May 
13 21:05:33 2014
@@ -524,14 +524,11 @@ public class Http11Nio2Processor extends
 endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
-if (param == null) {
-return;
-}
-if (socketWrapper == null) {
+if (param == null || socketWrapper == null) {
 return;
 }
 long timeout = ((Long)param).longValue();
-//if we are not piggy backing on a worker thread, set the timeout
+// If we are not piggy backing on a worker thread, set the timeout
 socketWrapper.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1594382&r1=1594381&r2=1594382&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue May 
13 21:05:33 2014
@@ -507,16 +507,12 @@ public class Http11NioProcessor extends 
 endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);
 }
 } else if (actionCode == ActionCode.ASYNC_SETTIMEOUT) {
-if (param==null) {
+if (param == null || socketWrapper == null) {
 return;
 }
-if (socketWrapper==null || 
socketWrapper.getSocket().getAttachment(false)==null) {
-return;
-}
-NioEndpoint.KeyAttachment attach = 
(NioEndpoint.KeyAttachment)socketWrapper.getSocket().getAttachment(false);
 long timeout = ((Long)param).longValue();
-//if we are not piggy backing on a worker thread, set the timeout
-attach.setTimeout(timeout);
+// If we are not piggy backing on a worker thread, set the timeout
+socketWrapper.setTimeout(timeout);
 } else if (actionCode == ActionCode.ASYNC_DISPATCH) {
 if (asyncStateMachine.asyncDispatch()) {
 endpoint.processSocket(this.socketWrapper, 
SocketStatus.OPEN_READ, true);

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1594382&r1=1594381&r2=1594382&view=diff
=

[Bug 56518] NIO async servlet limit latch leak

2014-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=56518

--- Comment #3 from Mark Thomas  ---
As luck would have it, the next stage of clean-up / refactoring appears to have
fixed this issue. The fix is applied to 8.0.x and the unit tests pass on OSX.
I'm just waiting for the results for Linux and Windows before looking at
back-porting the fix to 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



Re: svn commit: r1594436 - in /tomcat/trunk: java/org/apache/catalina/connector/ java/org/apache/coyote/ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ webapps/docs/

2014-05-13 Thread Rémy Maucherat
2014-05-14 2:44 GMT+02:00 :

> Author: kkolinko
> Date: Wed May 14 00:44:33 2014
> New Revision: 1594436
>
> URL: http://svn.apache.org/r1594436
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56399
> When recycling a Coyote request, ensure that Catalina request have been
> recycled.
>

This shouldn't cause regressions (cosmetic or performance). So this needs
to be refined, and shouldn't be committed for now.

I'll have to -1 this commit until it doesn't cause issues. The code can be
left in instead, but the calls to getAdapter().checkRecycled(request,
response) could be disabled with a system property flag.

Rémy