bugzilla | 1 Nov 2011 01:02
Picon
Favicon

DO NOT REPLY [Bug 52002] Pool re-opens and re-issues closed connection

https://issues.apache.org/bugzilla/show_bug.cgi?id=52002

Kevin Greiner <kevin.greiner <at> compsol.cc> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27751|0                           |1
        is obsolete|                            |

--- Comment #1 from Kevin Greiner <kevin.greiner <at> compsol.cc> 2011-11-01 00:02:55 UTC ---
Created attachment 27879
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27879
Patch to create new test case and fix.

This patch directly addresses the defect in the ConnectionPool's
setupConnection method.  This method creates a new proxy instance each time it
is called.  However, unlike an ordinary object where each instance is unique,
proxy objects store their state in their InvocationHandler object. In the
original implementation, calls to getConnection() returned a new proxy instance
and, as a side effect, returned all previous proxies to the same
PooledConnection to an open state.

In this patch, I've created a new interceptor (ProxyCutOffConnection) to act as
a unique, and disposable, head to a shared interceptor chain.  Each proxy
instance created by setConnection uses its own unique ProxyCutOffConnection as
its handler.  When 'close' is called for the first time, ProxyCutOffConnection
first passes it to the next interceptor to perform all normal close logic then
it severs its connection with that interceptor.  As a result, all future calls
using this proxy object irrevocably fail with a connection closed error.

(Continue reading)

kfujino | 1 Nov 2011 08:00
Picon
Favicon

svn commit: r1195848 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/ha/session/ webapps/docs/

Author: kfujino
Date: Tue Nov  1 07:00:21 2011
New Revision: 1195848

URL: http://svn.apache.org/viewvc?rev=1195848&view=rev
Log:
When Context manager does not exist, no context manager message is replied in order to avoid timeout
(default 60 sec) of GET_ALL_SESSIONS sync phase.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/ClusterSessionListener.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/DeltaManager.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SessionMessage.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/SessionMessageImpl.java
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/mbeans-descriptors.xml
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/ClusterSessionListener.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/ClusterSessionListener.java?rev=1195848&r1=1195847&r2=1195848&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/ClusterSessionListener.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/ha/session/ClusterSessionListener.java Tue
Nov  1 07:00:21 2011
 <at>  <at>  -88,10 +88,21  <at>  <at>  public class ClusterSessionListener exte
                 }
             } else {
                 ClusterManager mgr = (ClusterManager) managers.get(ctxname);
-                if (mgr != null)
+                if (mgr != null) {
(Continue reading)

mturk | 1 Nov 2011 08:01
Picon
Favicon
Gravatar

svn commit: r1195850 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Author: mturk
Date: Tue Nov  1 07:01:29 2011
New Revision: 1195850

URL: http://svn.apache.org/viewvc?rev=1195850&view=rev
Log:
Refactor main filter handler. Do not limit the size of header data (fixes BZ50233) by using jk_pool for huge headers

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1195850&r1=1195849&r2=1195850&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov  1 07:01:29 2011
 <at>  <at>  -167,7 +167,7  <at>  <at>  static char HTTP_WORKER_HEADER_INDEX[RES

 #define BAD_REQUEST     -1
 #define BAD_PATH        -2
-#define MAX_SERVERNAME  128
+#define MAX_SERVERNAME  1024
 #define MAX_INSTANCEID  32
 #define MAX_PACKET_SIZE 65536

 <at>  <at>  -444,6 +444,8  <at>  <at>  static struct error_reasons {
 #define JK_TOLOWER(x)   ((char)tolower((BYTE)(x)))
 #endif

+#define ISIZEOF(X)      (int)sizeof(X)
(Continue reading)

mturk | 1 Nov 2011 08:06
Picon
Favicon
Gravatar

svn commit: r1195851 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Author: mturk
Date: Tue Nov  1 07:06:33 2011
New Revision: 1195851

URL: http://svn.apache.org/viewvc?rev=1195851&view=rev
Log:
Use only valid port numbers

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1195851&r1=1195850&r2=1195851&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov  1 07:06:33 2011
 <at>  <at>  -1866,7 +1866,7  <at>  <at>  static DWORD handle_notify_event(PHTTP_F
     const char *worker = NULL;
     rule_extension_t *extensions;
     int worker_index = -1;
-    int port;
+    int port = 0;
     jk_pool_atom_t pbuf[HUGE_POOL_SIZE];
     jk_pool_t pool;

 <at>  <at>  -1944,9 +1944,9  <at>  <at>  static DWORD handle_notify_event(PHTTP_F
     len = ISIZEOF(szHB) - 1;    
     if (pfc->GetServerVariable(pfc, "SERVER_NAME", &szHB[1], &len) && len > 1) {
         len = ISIZEOF(szPB);
-        pfc->GetServerVariable(pfc, "SERVER_PORT", szPB, &len);
(Continue reading)

mturk | 1 Nov 2011 08:36
Picon
Favicon
Gravatar

svn commit: r1195856 - /tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Author: mturk
Date: Tue Nov  1 07:36:07 2011
New Revision: 1195856

URL: http://svn.apache.org/viewvc?rev=1195856&view=rev
Log:
Suppress size_t -> int warning

Modified:
    tomcat/jk/trunk/native/iis/jk_isapi_plugin.c

Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c
URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1195856&r1=1195855&r2=1195856&view=diff
==============================================================================
--- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Tue Nov  1 07:36:07 2011
 <at>  <at>  -2000,7 +2000,7  <at>  <at>  static DWORD handle_notify_event(PHTTP_F
         else if (uri_select_option == URI_SELECT_OPT_ESCAPED) {
             size_t elen  = strlen(uri) * 4;
             char *escuri = jk_pool_alloc(&pool, elen);
-            if (!escape_url(uri, escuri, elen)) {
+            if (!escape_url(uri, escuri, (int)elen)) {
                 jk_log(logger, JK_LOG_ERROR,
                        "[%s] re-encoding request exceeds maximum buffer size.",
                        uri);
 <at>  <at>  -2017,7 +2017,7  <at>  <at>  static DWORD handle_notify_event(PHTTP_F
         else if (uri_select_option == URI_SELECT_OPT_PROXY) {
             size_t clen  = strlen(uri) * 4;
             char *canuri = jk_pool_alloc(&pool, clen);
-            if (!jk_canonenc(uri, canuri, clen)) {
(Continue reading)

Bill Barker | 1 Nov 2011 09:53
Picon
Favicon

[GUMP <at> vmgump]: Project tomcat-tc7.0.x-validate (in module tomcat-7.0.x) failed

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 general <at> gump.apache.org.

Project tomcat-tc7.0.x-validate has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
    - tomcat-tc7.0.x-validate :  Tomcat 7.x, a web server implementing Java Servlet 3.0,
    ...

Full details are available at:
    http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were provided:
 -DEBUG- Dependency on checkstyle exists, no need to add for property checkstyle.jar.
 -INFO- Failed with reason build failed

The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-validate/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-validate.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 31 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true
-Dbuild.sysclasspath=only org.apache.tools.ant.Main
-Dgump.merge=/srv/gump/public/gump/work/merge.xml
(Continue reading)

Bill Barker | 1 Nov 2011 09:53
Picon
Favicon

[GUMP <at> vmgump]: Project tomcat-trunk-validate (in module tomcat-trunk) failed

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 general <at> gump.apache.org.

Project tomcat-trunk-validate has an issue affecting its community integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
    - tomcat-trunk-validate :  Tomcat 8.x, a web server implementing Java Servlet 3.1,
    ...

Full details are available at:
    http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were provided:
 -DEBUG- Dependency on checkstyle exists, no need to add for property checkstyle.jar.
 -INFO- Failed with reason build failed

The following work was performed:
http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html
Work Name: build_tomcat-trunk_tomcat-trunk-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 34 secs
Command Line: /usr/lib/jvm/java-6-openjdk/bin/java -Djava.awt.headless=true
-Dbuild.sysclasspath=only org.apache.tools.ant.Main
-Dgump.merge=/srv/gump/public/gump/work/merge.xml
(Continue reading)

kkolinko | 1 Nov 2011 10:47
Picon
Favicon

svn commit: r1195899 - /tomcat/trunk/build.xml

Author: kkolinko
Date: Tue Nov  1 09:47:42 2011
New Revision: 1195899

URL: http://svn.apache.org/viewvc?rev=1195899&view=rev
Log:
Fix checkstyle validation for startup/catalina.properties:
validation runs before compile and the file must be copied before validation runs.
Reconfigured the build so that copying occurs before validation.

Modified:
    tomcat/trunk/build.xml

Modified: tomcat/trunk/build.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1195899&r1=1195898&r2=1195899&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Tue Nov  1 09:47:42 2011
 <at>  <at>  -472,13 +472,15  <at>  <at> 
     </checkstyle>
   </target>

-  <target name="compile" depends="build-prepare,download-compile,validate">
-
+  <target name="compile-prepare">
     <!-- Add the builtin catalina.properties -->
     <copy todir="java/org/apache/catalina/startup"
           file="conf/catalina.properties" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
(Continue reading)

kkolinko | 1 Nov 2011 10:50
Picon
Favicon

svn commit: r1195900 - in /tomcat/tc7.0.x/trunk: ./ build.xml

Author: kkolinko
Date: Tue Nov  1 09:50:23 2011
New Revision: 1195900

URL: http://svn.apache.org/viewvc?rev=1195900&view=rev
Log:
Merged revision 1195899 from tomcat/trunk:
Fix checkstyle validation for startup/catalina.properties:
validation runs before compile and the file must be copied before validation runs.
Reconfigured the build so that copying occurs before validation.

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

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  1 09:50:23 2011
 <at>  <at>  -1 +1  <at>  <at> 
-/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1
 166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 ,1173241,1173256,1173288,1173333,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-118604
 5,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531
+/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1
 166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096
 ,1173241,1173256,1173288,1173333,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-118604
 5,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187755,1187
 775,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899
(Continue reading)

kkolinko | 1 Nov 2011 10:59
Picon
Favicon

svn commit: r1195905 - /tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Author: kkolinko
Date: Tue Nov  1 09:59:13 2011
New Revision: 1195905

URL: http://svn.apache.org/viewvc?rev=1195905&view=rev
Log:
Followup to r1195531
Use standard Collections.enumeration() wrapper instead of our Enumerator class.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java?rev=1195905&r1=1195904&r2=1195905&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/http/Parameters.java Tue Nov  1 09:59:13 2011
 <at>  <at>  -20,11 +20,11  <at>  <at>  import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Map;

-import org.apache.catalina.util.Enumerator;
 import org.apache.tomcat.util.buf.B2CConverter;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.CharChunk;
(Continue reading)


Gmane