DO NOT REPLY [Bug 51881] Server incorrectly parses incoming HTTP requests and loses them
https://issues.apache.org/bugzilla/show_bug.cgi?id=51881 --- Comment #9 from Konstantin Kolinko 2011-09-28 07:07:12 UTC --- Can you test with 7.0.22 release candidate? The download link is in the VOTE thread on dev@. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 40530] Tomcat Service startup fails when installed into localized path
https://issues.apache.org/bugzilla/show_bug.cgi?id=40530 Alexey Grishkov changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID | -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 40530] Tomcat Service startup fails when installed into localized path
https://issues.apache.org/bugzilla/show_bug.cgi?id=40530 --- Comment #2 from Alexey Grishkov 2011-09-28 07:48:03 UTC --- I also had this problem on tomcat 6.0.20. I installed it on Russian and Japanese machines and got the error. I found that java itself work fine, i.e if we try to run java class with classpath contained non-ASCII symbols (I used jdk 1.6.0_26). But it work only if PC have proper system locale (Russian or Japanese in my cases). Then I discovered that there was the similar problem in https://issues.apache.org/jira/browse/DAEMON-87 and it was solved, but it seems that is not the case. I found also that the problem was in the tomcat's procrun daemon that converts the classpath and other java options to UTF-8, but it seems that java requires ones in current system encoding, so I tried to convert them to ANSI encoding and tomcat started to works. So please check my suggestion. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 40530] Tomcat Service startup fails when installed into localized path
https://issues.apache.org/bugzilla/show_bug.cgi?id=40530 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||INVALID --- Comment #3 from Mark Thomas 2011-09-28 07:51:09 UTC --- If the issue is with Commons Daemon, you'll need to raise a bug against that project. Tomcat picks up new versions of Daemon as they become available. It would be very helpful if your report for daemon included specific examples as that will make it easier to test. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51881] Server incorrectly parses incoming HTTP requests and loses them
https://issues.apache.org/bugzilla/show_bug.cgi?id=51881 --- Comment #10 from Mark Thomas 2011-09-28 08:53:19 UTC --- Thanks for the additional detail. I can see the problem now. It dies reproduce with the 7.0.22 tag. I am currently trying to track down the root cause. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51905] New: Infinite loop when shutting down AprEndpoint
https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 Bug #: 51905 Summary: Infinite loop when shutting down AprEndpoint Product: Tomcat 6 Version: 6.0.33 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: knst.koli...@gmail.com Classification: Unclassified If unlocking the acceptor during AprEndpoint shutdown fails, it enters an infinite loop, printing endpoint.warn.unlockAcceptorFailed message (Acceptor thread [{0}] failed to unlock. Forcing hard socket shutdown.) It was reported on users@ mailing lists, http://tomcat.markmail.org/thread/xo2jolyr44ijuu34 It might be caused by a firewall preventing Tomcat from connecting to its own HTTP port. I can reproduce it if I turn the unlockAccept() method in endpoint into an noop (e.g. by adding "if(true){ return; }"), both in 6.0 and in trunk. In 6.0 this bug was introduced in r1065945 and affects 6.0.32 and 6.0.33. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.22
On 27.09.2011 23:36, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.22 release is now available for voting. > > It can be obtained from: > http://people.apache.org/~markt/dev/tomcat-7/v7.0.22/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/ > > The proposed 7.0.21 release is: > > [ ] Broken - do not release > [ ] Beta - go ahead and release as 7.0.22 Beta > [X] Stable - go ahead and release as 7.0.22 Stable It would be nice though to know your final analysis of BZ 51881 (Server incorrectly parses incoming HTTP requests and loses them) before publising the release. - MD5 OK - signatures OK - key in KEYS file - gz and zip for src and bin consistent - src consistent with svn tag Except for the following minor points (no regression): - The files we copy before building, e.g. catalina.properties and jdbc-pool.xml are of course not in svn for the cp target location, but they are there in the src bundles. - line ends of modules/jdbc-pool/resources/MANIFEST.MF differ between svn and gz although eol-style is set correctly. - builds fine - build result looks consistent with binaries - no checkstyle complaints - no Javadoc errors - Unit tests run OK for BIO, NIO and APR Not a single test failure - JMX MBean-Comparison small expected differences: - keepAliveTimeout changed from "-1" to "2" in HTTP MBeans for ThreadPool, ProtocolHandler and Connector (at least for BIO) - New attribute "usePolling" in ThreadPool MBean - logging MBean changes due to Digester logger rename Build and tests were done using Java 1.6.0_26, OS was Solaris 10 Sparc, tcnative was 1.1.22 based on APR 1.4.5 and OpenSSL 0.9.8r. Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1176799 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: kkolinko Date: Wed Sep 28 09:35:59 2011 New Revision: 1176799 URL: http://svn.apache.org/viewvc?rev=1176799&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 Skip attempt to shutdown AprEndpoint acceptor threads if the server socket has been already forcefully closed. Reduce waiting timeout from 30s to 10s. I think if things go wrong 10s is enough to wait. If it were waiting 30s - the JVM itself might be forcefully closed by service wrapper as unresponsive. - it must print something to the logs, otherwise it looks odd. Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1176799&r1=1176798&r2=1176799&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Sep 28 09:35:59 2011 @@ -652,8 +652,8 @@ public class AprEndpoint extends Abstrac running = false; unlockAccept(); for (int i = 0; i < acceptors.length; i++) { -long s = System.currentTimeMillis() + 3; -while (acceptors[i].isAlive()) { +long s = System.currentTimeMillis() + 1; +while (acceptors[i].isAlive() && serverSock != 0) { try { acceptors[i].interrupt(); acceptors[i].join(1000); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[GUMP@vmgump]: Project tomcat-tc7.0.x-test (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 gene...@gump.apache.org. Project tomcat-tc7.0.x-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 8 runs. 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-test : 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-test/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp-src.jar. -DEBUG- Dependency on commons-daemon exists, no need to add for property commons-daemon.native.src.tgz. -DEBUG- Dependency on commons-daemon exists, no need to add for property tomcat-native.tar.gz. -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property tomcat-dbcp.home. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-7.0.x/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-7.0.x/tomcat-tc7.0.x-test/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test.html Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test (Type: Build) Work ended in a state of : Failed Elapsed: 29 mins 54 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 -Djunit.jar=/srv/gump/public/workspace/junit/dist/junit-28092011.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28092011-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-28092011-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps -Djdt.jar=/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-28092011.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/srv/gump/public/worksp ace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-28092011.jar test [Working Directory: /srv/gump/public/workspace/tomcat-7.0.x] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/outp ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/packages/javamail-1.4/mail.jar:/srv/gump/packages/javamail-1.4/lib/mailapi.jar:/srv/gump/packages/jaf-1.1ea/activation.jar:/srv/gump/packages/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7. 0.x/tomcat-deps/tomcat-dbcp-28092011.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-28092011.jar:/srv/gump/public/worksp
svn commit: r1176801 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/util/net/AprEndpoint.java webapps/docs/changelog.xml
Author: kkolinko Date: Wed Sep 28 09:48:32 2011 New Revision: 1176801 URL: http://svn.apache.org/viewvc?rev=1176801&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 Merged revision 1176799 from tomcat/trunk: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 Skip attempt to shutdown AprEndpoint acceptor threads if the server socket has been already forcefully closed. Reduce waiting timeout from 30s to 10s. I think if things go wrong 10s is enough to wait. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Sep 28 09:48:32 2011 @@ -1 +1 @@ -/tomcat/trunk: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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256,1173288 ,117,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,1175713,1175889,1175896,1175907,1176584,1176590 +/tomcat/trunk: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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256,1173288 ,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799 Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java?rev=1176801&r1=1176800&r2=1176801&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed Sep 28 09:48:32 2011 @@ -652,8 +652,8 @@ public class AprEndpoint extends Abstrac running = false; unlockAccept(); for (int i = 0; i < acceptors.length; i++) { -long s = System.currentTimeMillis() + 3; -while (acceptors[i].isAlive()) { +long s = System.currentTimeMillis() + 1; +while (acceptors[i].isAlive() && serverSock != 0) { try { acceptors[i].interrupt(); acceptors[i].join(1000); 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=1176801&r1=1176800&r2=1176801&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Sep 28 09:
svn commit: r1176806 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: kkolinko Date: Wed Sep 28 09:58:56 2011 New Revision: 1176806 URL: http://svn.apache.org/viewvc?rev=1176806&view=rev Log: vote and 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=1176806&r1=1176805&r2=1176806&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Wed Sep 28 09:58:56 2011 @@ -91,9 +91,15 @@ PATCHES PROPOSED TO BACKPORT: Ensure requests with multiple errors do not result in multiple access log entries. http://people.apache.org/~markt/patches/2011-09-27-bug51872-tc6.patch - +1: markt + +1: markt, kkolinko -1: +* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 + Fix infinite loop in AprEndpoint shutdown if acceptor unlock + fails. Reduce timeout before forcefully closing the socket from 30s to 10s. + http://svn.apache.org/viewvc?rev=1176799&view=rev + +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
Re: [GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
2011/9/28 Bill Barker : > 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 tomcat-tc7.0.x-test has an issue affecting its community integration. > This issue affects 1 projects, > and has been outstanding for 8 runs. > 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-test : 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-test/index.html Test org.apache.catalina.tribes.group.TestGroupChannelMemberArrival FAILED TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt Testcase: testMemberArrival took 4.38 sec FAILED Checking member arrival length expected:<9> but was:<11> junit.framework.AssertionFailedError: Checking member arrival length expected:<9> but was:<11> at org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.testMemberArrival(TestGroupChannelMemberArrival.java:77) The same failure as was observed by Gump in trunk yesterday. Again BIO fails, but NIO runs OK. > Checking member arrival length expected:<9> but was:<11> In failed trunk test it was > Checking member arrival length expected:<9> but was:<19> So, it received more data than were expected? Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51905] Infinite loop when shutting down AprEndpoint
https://issues.apache.org/bugzilla/show_bug.cgi?id=51905 --- Comment #1 from Konstantin Kolinko 2011-09-28 10:06:17 UTC --- Fixed in trunk and 7.0, will be in 7.0.23. Proposed for 6.0. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1176833 - /tomcat/trunk/webapps/examples/jsp/index.html
Author: kkolinko Date: Wed Sep 28 11:45:22 2011 New Revision: 1176833 URL: http://svn.apache.org/viewvc?rev=1176833&view=rev Log: In the examples application: Add links to the FORM Auth, Servlet 3.0 Async and Comet examples. Modified: tomcat/trunk/webapps/examples/jsp/index.html Modified: tomcat/trunk/webapps/examples/jsp/index.html URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/jsp/index.html?rev=1176833&r1=1176832&r2=1176833&view=diff == --- tomcat/trunk/webapps/examples/jsp/index.html (original) +++ tomcat/trunk/webapps/examples/jsp/index.html Wed Sep 28 11:45:22 2011 @@ -374,5 +374,81 @@ ght=24 width=24 align=TOP> + +Other Examples + + + + FORM Authentication + + Execute + + + + + Example that demonstrates protecting a resource and +using Form-Based authentication. To access the page the user must +have role of either "tomcat" or "role1". By default no user +is configured to have these roles. + + + + Servlet 3.0 Asynchronous processing examples +Examples that demonstrate using Servlet 3.0 asynchronous +request processing API. + + + async0 + + Execute + + + + + async1 + + Execute + + + + + async2 + + Execute + + + + + async3 + + Execute + + + + + stockticker + + Execute + + + + + + Comet processing example +Example that demonstrates asynchronous request processing +using Comet API. See "Advanced IO" chapter in the +User Guide for details. It works only with connectors that support +Comet processing (APR or NIO +HTTP connectors). + + + Comet Chat + + Execute + + + + + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.22
On 28/09/2011 10:24, Rainer Jung wrote: > On 27.09.2011 23:36, Mark Thomas wrote: >> The proposed Apache Tomcat 7.0.22 release is now available for voting. >> >> It can be obtained from: >> http://people.apache.org/~markt/dev/tomcat-7/v7.0.22/ >> The svn tag is: >> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/ >> >> The proposed 7.0.21 release is: >> >> [ ] Broken - do not release >> [ ] Beta - go ahead and release as 7.0.22 Beta >> [X] Stable - go ahead and release as 7.0.22 Stable > > It would be nice though to know your final analysis of BZ 51881 (Server > incorrectly parses incoming HTTP requests and loses them) before > publising the release. I'm getting closer. It is, as the OP suggested, a problem with handling async closes of comet connections (where a request on thread A triggers the close of the comet request on thread B). I haven't quite got to the bottom of it yet but so far the indications are this isn't something that we'll need to do an immediate 7.0.23 for. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51910] New: NPE in comet processing when shutting down Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=51910 Bug #: 51910 Summary: NPE in comet processing when shutting down Tomcat Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: knst.koli...@gmail.com Classification: Unclassified I've hit it when testing 7.0.22 RC. 1. Configure Tomcat with NIO connector 2. Start Tomcat and open Comet chat example http://localhost:8080/examples/jsp/chat/index.jsp 3. Type some Nickname and press button to start chat The chat log will be in the second frame at the lower half of the page. 4. While chat log is active (Browser shows page as being loaded), shut down Tomcat. 5. Observe NPE in the logs: 28.09.2011 15:55:32 org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["http-nio-8080"] 28.09.2011 15:55:33 org.apache.catalina.connector.CoyoteAdapter event SEVERE: null java.lang.NullPointerException at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:354) at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:192) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:245) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:138) at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:211) at org.apache.coyote.http11.Http11NioProcessor.event(Http11NioProcessor.java:131) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1554) at org.apache.tomcat.util.net.NioEndpoint.processSocket(NioEndpoint.java:717) at org.apache.tomcat.util.net.NioEndpoint$Poller.cancelledKey(NioEndpoint.java:1026) at org.apache.tomcat.util.net.NioEndpoint$Poller.processKey(NioEndpoint.java:1169) at org.apache.tomcat.util.net.NioEndpoint$Poller.timeout(NioEndpoint.java:1352) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1085) at java.lang.Thread.run(Thread.java:662) 28.09.2011 15:55:33 org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["ajp-bio-8009"] -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1176851 - /tomcat/tc7.0.x/trunk/
Author: kkolinko Date: Wed Sep 28 12:39:00 2011 New Revision: 1176851 URL: http://svn.apache.org/viewvc?rev=1176851&view=rev Log: Update mergeinfo: mark r1156115 as merged, because this change has been applied in r1156111. Modified: tomcat/tc7.0.x/trunk/ (props changed) Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Sep 28 12:39:00 2011 @@ -1 +1 @@ -/tomcat/trunk: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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256,1173288 ,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799 +/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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256 ,1173288,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51912] New: Failures in org.apache.coyote.http11.TestInternalInputBuffer with NIO + debug logging
https://issues.apache.org/bugzilla/show_bug.cgi?id=51912 Bug #: 51912 Summary: Failures in org.apache.coyote.http11.TestInternalInputBuffer with NIO + debug logging Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: knst.koli...@gmail.com Classification: Unclassified I encountered the following while testing 7.0.22 RC. To reproduce: 1. Replace conf/logging.properties with the following: === handlers = 1catalina.org.apache.juli.FileHandler .handlers = 1catalina.org.apache.juli.FileHandler 1catalina.org.apache.juli.FileHandler.level = FINE 1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 1catalina.org.apache.juli.FileHandler.prefix = catalina. 1catalina.org.apache.juli.FileHandler.bufferSize=2 .level=FINE === Note that level=FINE enables debug logging. 2. Run testsuite for NIO + org.apache.coyote.http11.TestInternalInputBuffer by adding the following to build.properties: execute.test.bio=false execute.test.nio=true execute.test.apr=false test.entry=org.apache.coyote.http11.TestInternalInputBuffer 3. The test fails: == Testsuite: org.apache.coyote.http11.TestInternalInputBuffer Tests run: 7, Failures: 2, Errors: 0, Time elapsed: 50,357 sec Testcase: testBug48839 took 9,594 sec Testcase: testBug51557NoColon took 1,217 sec FAILED junit.framework.AssertionFailedError: at org.apache.coyote.http11.TestInternalInputBuffer.testBug51557NoColon(TestInternalInputBuffer.java:137) Testcase: testBug51557Separators took 22,807 sec Testcase: testBug51557Ctl took 13,104 sec FAILED junit.framework.AssertionFailedError: at org.apache.coyote.http11.TestInternalInputBuffer.doTestBug51557Char(TestInternalInputBuffer.java:216) at org.apache.coyote.http11.TestInternalInputBuffer.testBug51557Ctl(TestInternalInputBuffer.java:160) Testcase: testBug51557Continuation took 1,248 sec Testcase: testBug51557BoundaryStart took 1,185 sec Testcase: testBug51557BoundaryEnd took 1,186 sec == 4. It is the only test in testsuite that is failing in this logging configuration. The rest of testsuite did run successfully. This test also succeeds when it is run with BIO or APR. Only NIO fails. In the log file the following exception occurs 3 times: == 28.09.2011 17:50:38 org.apache.coyote.http11.AbstractHttp11Processor process FINE: Error parsing HTTP request header java.lang.StringIndexOutOfBoundsException: String index out of range: -40 at java.lang.String.checkBounds(String.java:397) at java.lang.String.(String.java:482) at org.apache.coyote.http11.InternalNioInputBuffer.skipLine(InternalNioInputBuffer.java:672) at org.apache.coyote.http11.InternalNioInputBuffer.parseHeader(InternalNioInputBuffer.java:526) at org.apache.coyote.http11.InternalNioInputBuffer.parseHeaders(InternalNioInputBuffer.java:435) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:905) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1550) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) == It is caused by debug logging in org.apache.coyote.http11.InternalNioInputBuffer.skipLine(InternalNioInputBuffer.java:672) 671if (log.isDebugEnabled()) { 672log.debug(sm.getString("iib.invalidheader", new String(buf, 673headerData.start, 674headerData.lastSignificantChar - headerData.start + 1, 675DEFAULT_CHARSET))); 676} InternalInputBuffer and InternalAprInputBuffer have similar debug logging in their skipLine() methods, but they do not fail. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 51910] NPE in comet processing when shutting down Tomcat
https://issues.apache.org/bugzilla/show_bug.cgi?id=51910 --- Comment #1 from Konstantin Kolinko 2011-09-28 14:32:54 UTC --- It is reproducible with APR connector as well. === INFO: Stopping ProtocolHandler ["http-apr-8080"] 28.09.2011 18:31:25 org.apache.catalina.connector.CoyoteAdapter event SEVERE: null java.lang.NullPointerException at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:354) at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:192) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:245) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.valves.ValveBase.event(ValveBase.java:226) at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:138) at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:211) at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:133) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:513) at org.apache.tomcat.util.net.AprEndpoint$SocketEventProcessor.run(AprEndpoint.java:1869) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 28.09.2011 18:31:25 org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["ajp-apr-8009"] === -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.22
2011/9/28 Mark Thomas : > The proposed Apache Tomcat 7.0.22 release is now available for voting. > > It can be obtained from: > http://people.apache.org/~markt/dev/tomcat-7/v7.0.22/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/ > > The proposed 7.0.21 release is: > > [ ] Broken - do not release > [ ] Beta - go ahead and release as 7.0.22 Beta > [x] Stable - go ahead and release as 7.0.22 Stable > While testing I have encountered two issues, but I do not see them as showstoppers. Added to Bugzilla as https://issues.apache.org/bugzilla/show_bug.cgi?id=51910 https://issues.apache.org/bugzilla/show_bug.cgi?id=51912 Except the issue described by BZ 51912, all the rest of testsuite did run for me successfully with all three of BIO, NIO, APR connectors on WinXP, JDK 6u26. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
On 28.09.2011 12:05, Konstantin Kolinko wrote: > 2011/9/28 Bill Barker : >> 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 tomcat-tc7.0.x-test has an issue affecting its community integration. >> This issue affects 1 projects, >> and has been outstanding for 8 runs. >> 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-test : 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-test/index.html > > Test org.apache.catalina.tribes.group.TestGroupChannelMemberArrival FAILED > > > TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt > Testcase: testMemberArrival took 4.38 sec > FAILED > Checking member arrival length expected:<9> but was:<11> > junit.framework.AssertionFailedError: Checking member arrival length > expected:<9> but was:<11> > at > org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.testMemberArrival(TestGroupChannelMemberArrival.java:77) > > > The same failure as was observed by Gump in trunk yesterday. > Again BIO fails, but NIO runs OK. > >> Checking member arrival length expected:<9> but was:<11> > > In failed trunk test it was >> Checking member arrival length expected:<9> but was:<19> > > So, it received more data than were expected? Hmmm, I just saw the first failure for TC 7 (7.0.21) in a possibly related test, though I'm getting less data than expected: TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.APR.txt Testcase: testCoord1 took 11.927 sec FAILED Message count expected to be equal. expected:<8> but was:<0> junit.framework.AssertionFailedError: Message count expected to be equal. expected:<8> but was:<0> Regards, Rainer - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1176902 - /tomcat/jk/trunk/native/common/jk_lb_worker.c
Author: rjung Date: Wed Sep 28 14:45:46 2011 New Revision: 1176902 URL: http://svn.apache.org/viewvc?rev=1176902&view=rev Log: Fix decay_load for lb method "Next": if one lb_value was "0", the special rule for curmin==0 led to a wrong new curmin. Choose a separate marker variable instead of a special value. Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1176902&r1=1176901&r2=1176902&view=diff == --- tomcat/jk/trunk/native/common/jk_lb_worker.c (original) +++ tomcat/jk/trunk/native/common/jk_lb_worker.c Wed Sep 28 14:45:46 2011 @@ -625,6 +625,7 @@ static jk_uint64_t decay_load(lb_worker_ unsigned int i; jk_uint64_t curmax = 0; jk_uint64_t curmin = 0; +int no_curmin = JK_TRUE; lb_sub_worker_t *w; ajp_worker_t *aw; @@ -651,7 +652,8 @@ static jk_uint64_t decay_load(lb_worker_ * defined by mapping rules here. */ if (JK_WORKER_USABLE(w->s->state, w->activation)) { -if (curmin == 0 || w->s->lb_value < curmin) { +if (w->s->lb_value < curmin || no_curmin == JK_TRUE) { +no_curmin = JK_FALSE; curmin = w->s->lb_value; } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.22
On 09/27/2011 11:36 PM, Mark Thomas wrote: The proposed 7.0.21 release is: [ ] Broken - do not release [ ] Beta - go ahead and release as 7.0.22 Beta [x] Stable - go ahead and release as 7.0.22 Stable Do an usual set of tests on win32/win64 and linux Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1176975 - /tomcat/tc7.0.x/trunk/
Author: kkolinko Date: Wed Sep 28 17:34:23 2011 New Revision: 1176975 URL: http://svn.apache.org/viewvc?rev=1176975&view=rev Log: Add revision number for 7.0.22 tag to subclipse:tags property Modified: tomcat/tc7.0.x/trunk/ (props changed) Propchange: tomcat/tc7.0.x/trunk/ -- --- subclipse:tags (original) +++ subclipse:tags Wed Sep 28 17:34:23 2011 @@ -24,3 +24,4 @@ 1146504,TOMCAT_7_0_19,/tomcat/tc7.0.x/tags/TOMCAT_7_0_19,tag 1155255,TOMCAT_7_0_20,/tomcat/tc7.0.x/tags/TOMCAT_7_0_20,tag 1162976,TOMCAT_7_0_21,/tomcat/tc7.0.x/tags/TOMCAT_7_0_21,tag +1176597,TOMCAT_7_0_22,/tomcat/tc7.0.x/tags/TOMCAT_7_0_22,tag - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.22
Mark, On 9/27/2011 5:36 PM, Mark Thomas wrote: > The proposed Apache Tomcat 7.0.22 release is now available for voting. > > It can be obtained from: > http://people.apache.org/~markt/dev/tomcat-7/v7.0.22/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_22/ > > The proposed 7.0.21 release is: > > [ ] Broken - do not release > [ ] Beta - go ahead and release as 7.0.22 Beta > [X] Stable - go ahead and release as 7.0.22 Stable + MD5 sums match. - GPG verifies with a key that Mark appears to use for nothing else, no key signers :( + Source builds properly + All unit tests pass + Javadoc builds with no complaints + Works with casual testing of my own webapps -chris signature.asc Description: OpenPGP digital signature
Re: [GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
2011/9/28 Konstantin Kolinko : > 2011/9/28 Bill Barker : >> 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 tomcat-tc7.0.x-test has an issue affecting its community integration. >> This issue affects 1 projects, >> and has been outstanding for 8 runs. >> 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-test : 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-test/index.html > > Test org.apache.catalina.tribes.group.TestGroupChannelMemberArrival FAILED > > > TEST-org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.BIO.txt > Testcase: testMemberArrival took 4.38 sec > FAILED > Checking member arrival length expected:<9> but was:<11> > junit.framework.AssertionFailedError: Checking member arrival length > expected:<9> but was:<11> > at > org.apache.catalina.tribes.group.TestGroupChannelMemberArrival.testMemberArrival(TestGroupChannelMemberArrival.java:77) > > > The same failure as was observed by Gump in trunk yesterday. > Again BIO fails, but NIO runs OK. > >> Checking member arrival length expected:<9> but was:<11> > > In failed trunk test it was >> Checking member arrival length expected:<9> but was:<19> > > So, it received more data than were expected? > Huh. I found the cause. The test itself is broken. The test has nested class TestMbrListener implements MembershipListener that is used to handle notifications about added and disappeared members. Those notifications arrive asynchronously. Such as this one: (org.apache.catalina.tribes.membership.McastServiceImpl : t = new Runnable() { @Override public void run() { String name = Thread.currentThread().getName(); try { Thread.currentThread().setName("Membership-MemberAdded."); service.memberAdded(m); }finally { Thread.currentThread().setName(name); } } }; executor.execute(t); ) The TestMbrListener stores its data in ArrayList. The error here is that access to this ArrayList is not synchronized, but several notifications can invoke the listener concurrently at the same time. Thus ArrayList becomes corrupted and reports wrong value for its size(). Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1177050 - /tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java
Author: kkolinko Date: Wed Sep 28 20:36:42 2011 New Revision: 1177050 URL: http://svn.apache.org/viewvc?rev=1177050&view=rev Log: Improve TestGroupChannelMemberArrival 1. Add synchronization when accessing TestMbrListener.members. This should fix the failures observed by Gump. 2. Remove unused method #clear(). 3. Improve messages printed to System.out during the test: - Add timestamps - Add hash code of threads (because thread names are not unique: They all are either "Membership-MemberAdded." or "Membership-MemberDisappeared."). - Add current length of members list 4. Print messages when memberAdded()/memberDisappeared() performed no work. That is if notification arrives twice for the same Member. I have not observed such events when running the tests. Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java?rev=1177050&r1=1177049&r2=1177050&view=diff == --- tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java (original) +++ tomcat/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java Wed Sep 28 20:36:42 2011 @@ -41,13 +41,6 @@ public class TestGroupChannelMemberArriv channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII")); listeners[i] = new TestMbrListener( ("Listener-" + (i + 1))); channels[i].addMembershipListener(listeners[i]); - -} -} - -public void clear() { -for (int i = 0; i < channels.length; i++) { -listeners[i].members.clear(); } } @@ -70,11 +63,24 @@ public class TestGroupChannelMemberArriv }; threads[i] = t; } -for (int i=0; i=0; i-- ) assertEquals("Checking member arrival length",channels.length-1,listeners[i].members.size()); +System.out.println(System.currentTimeMillis() ++ " All channels started."); +for (int i = listeners.length - 1; i >= 0; i--) { +TestMbrListener listener = listeners[i]; +synchronized (listener.members) { +assertEquals("Checking member arrival length (" + listener.name ++ ")", channels.length - 1, listener.members.size()); +} +} +System.out.println(System.currentTimeMillis() ++ " Members arrival counts checked."); } @After @@ -96,31 +102,55 @@ public class TestGroupChannelMemberArriv this.name = name; } -public ArrayList members = new ArrayList(); +public ArrayList members = new ArrayList(1); + @Override public void memberAdded(Member member) { -if (!members.contains(member)) { -members.add(member); -try { -System.out.println(name + ":member added[" + new String(member.getPayload(), "ASCII") + "; Thread:"+Thread.currentThread().getName()+"]"); -} catch (Exception x) { -System.out.println(name + ":member added[unknown]"); +String msg; +int count; +synchronized (members) { +if (!members.contains(member)) { +members.add(member); +msg = "member added"; +} else { +msg = "member added called, but member is already in the list"; } +count = members.size(); } +report(msg, member, count); } @Override public void memberDisappeared(Member member) { -if (members.contains(member)) { -members.remove(member); -try { -System.out.println(name + ":member disappeared[" + new String(member.getPayload(), "ASCII") + "; Thread:"+Thread.currentThread().getName()+"]"); -} catch (Exception x) { -System.out.println(name + ":member disappeared[unknown]"); +String msg; +int count; +synchronized (members) { +if (members.contains(member)) { +members.remove(member); +msg = "member disappeared"; +} else { +msg = "member disappeared called, but there is no such member in the list"; } +count = members.size(); } +report(msg, member, count); } +private void report(String event, Member member, int count) { +StringBuilder message = new StringBuilder(100); +message.append(System.currentTimeMillis()).ap
svn commit: r1177053 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java
Author: kkolinko Date: Wed Sep 28 20:39:07 2011 New Revision: 1177053 URL: http://svn.apache.org/viewvc?rev=1177053&view=rev Log: Merged revision 1177050 from tomcat/trunk: Improve TestGroupChannelMemberArrival 1. Add synchronization when accessing TestMbrListener.members. This should fix the failures observed by Gump. 2. Remove unused method #clear(). 3. Improve messages printed to System.out during the test 4. Print messages when memberAdded()/memberDisappeared() performed no work. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Sep 28 20:39:07 2011 @@ -1 +1 @@ -/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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256 ,1173288,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799 +/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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256 ,1173288,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java?rev=1177053&r1=1177052&r2=1177053&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/TestGroupChannelMemberArrival.java Wed Sep 28 20:39:07 2011 @@ -41,13 +41,6 @@ public class TestGroupChannelMemberArriv channels[i].getMembershipService().setPayload( ("Channel-" + (i + 1)).getBytes("ASCII")); listeners[i] = new TestMbrListener( ("Listener-" + (i + 1))); channels[i].addMembershipListener(listeners[i]); - -} -} - -public void clear() { -for (int i = 0; i < channels.length; i++) { -listeners[i].members.clear(); } } @@ -70,11 +63,24 @@ public class TestGroupChannelMemberArriv }; threads[i] = t; } -for (int i=0; i=0; i-- ) assertEquals("Checking member arrival length",channels.length-1,listeners[i].members.size()); +System.out.println(System.currentTimeMillis() ++ " All channels started."); +for (int i = listeners.le
svn commit: r1177060 - /tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java
Author: kkolinko Date: Wed Sep 28 21:03:09 2011 New Revision: 1177060 URL: http://svn.apache.org/viewvc?rev=1177060&view=rev Log: Improve TestNonBlockingCoordinator: - Format code for better readbility. - In testCoord1() change how equality is tested. Read expected value from 0th member, instead of (i-1)th. They all should be the same. - Remove unneeded main() method. Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java Modified: tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java?rev=1177060&r1=1177059&r2=1177060&view=diff == --- tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java (original) +++ tomcat/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java Wed Sep 28 21:03:09 2011 @@ -30,15 +30,14 @@ public class TestNonBlockingCoordinator private GroupChannel[] channels = null; private NonBlockingCoordinator[] coordinators = null; -private int channelCount = 10; -private Thread[] threads = null; +private final int channelCount = 10; @Before public void setUp() throws Exception { System.out.println("Setup"); channels = new GroupChannel[channelCount]; coordinators = new NonBlockingCoordinator[channelCount]; -threads = new Thread[channelCount]; +Thread[] threads = new Thread[channelCount]; for ( int i=0; i
svn commit: r1177062 - in /tomcat/tc7.0.x/trunk: ./ test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java
Author: kkolinko Date: Wed Sep 28 21:05:21 2011 New Revision: 1177062 URL: http://svn.apache.org/viewvc?rev=1177062&view=rev Log: Merged revision 1177060 from tomcat/trunk: Improve TestNonBlockingCoordinator: - Format code for better readbility. - In testCoord1() change how equality is tested. Read expected value from 0th member, instead of (i-1)th. They all should be the same. - Remove unneeded main() method. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Sep 28 21:05:21 2011 @@ -1 +1 @@ -/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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256 ,1173288,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050 +/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,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096,1173241,1173256 ,1173288,117,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,1175713,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060 Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java?rev=1177062&r1=1177061&r2=1177062&view=diff == --- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java (original) +++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/group/interceptors/TestNonBlockingCoordinator.java Wed Sep 28 21:05:21 2011 @@ -30,15 +30,14 @@ public class TestNonBlockingCoordinator private GroupChannel[] channels = null; private NonBlockingCoordinator[] coordinators = null; -private int channelCount = 10; -private Thread[] threads = null; +private final int channelCount = 10; @Before public void setUp() throws Exception { System.out.println("Setup"); channels = new GroupChannel[channelCount]; coordinators = new NonBlockingCoordinator[channelCount]; -threads = new Thread[channelCount]; +Thread[] threads = new Thread[channelCount]; for ( int i=0; i
Re: [GUMP@vmgump]: Project tomcat-tc7.0.x-test (in module tomcat-7.0.x) failed
2011/9/28 Rainer Jung : > > Hmmm, I just saw the first failure for TC 7 (7.0.21) in a possibly > related test, though I'm getting less data than expected: > > TEST-org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.APR.txt > > Testcase: testCoord1 took 11.927 sec > FAILED > Message count expected to be equal. expected:<8> but was:<0> > junit.framework.AssertionFailedError: Message count expected to be > equal. expected:<8> but was:<0> > Regarding TestNonBlockingCoordinator: I do not have time to investigate it further, but 1. The test itself succeeds for me 2. It does not use ArrayList etc., all information is retrieved from tribes classes. 3. I observed funny messages in the logs from tribes classes with this test. The test itself did not fail. Such as: 1) ConcurrentModificationException === [junit] 29.09.2011 0:58:20 org.apache.catalina.tribes.transport.nio.NioReceiver stopListening [junit] SEVERE: Unable to close cluster receiver selector. [junit] java.util.ConcurrentModificationException [junit] at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [junit] at java.util.HashMap$KeyIterator.next(HashMap.java:828) [junit] at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1010) [junit] at org.apache.catalina.tribes.transport.nio.NioReceiver.closeSelector(NioReceiver.java:373) [junit] at org.apache.catalina.tribes.transport.nio.NioReceiver.stopListening(NioReceiver.java:356) [junit] at org.apache.catalina.tribes.transport.nio.NioReceiver.stop(NioReceiver.java:86) [junit] at org.apache.catalina.tribes.group.ChannelCoordinator.internalStop(ChannelCoordinator.java:203) [junit] at org.apache.catalina.tribes.group.ChannelCoordinator.stop(ChannelCoordinator.java:115) [junit] at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:178) [junit] at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:178) [junit] at org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator.stop(NonBlockingCoordinator.java:476) [junit] at org.apache.catalina.tribes.group.ChannelInterceptorBase.stop(ChannelInterceptorBase.java:178) [junit] at org.apache.catalina.tribes.group.GroupChannel.stop(GroupChannel.java:438) [junit] at org.apache.catalina.tribes.group.interceptors.TestNonBlockingCoordinator.tearDown(TestNonBlockingCoordinator.java:124) === (During tearDown()) - All Gump runs (7.0,8.0 x BIO,NIO) show it as well. 2) NullPinterException while reading data from NioChannel - If I remember it correctly. I cannot reproduce now and I do not have a stacktrace. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1177125 - /tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java
Author: kkolinko Date: Thu Sep 29 00:29:35 2011 New Revision: 1177125 URL: http://svn.apache.org/viewvc?rev=1177125&view=rev Log: Improve MimeHeaders.toString() (is used only for debugging): if there are several headers with the same name, print all of them. Modified: tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java Modified: tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java?rev=1177125&r1=1177124&r2=1177125&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/MimeHeaders.java Thu Sep 29 00:29:35 2011 @@ -143,7 +143,10 @@ public class MimeHeaders { Enumeration e = names(); while (e.hasMoreElements()) { String n = e.nextElement(); -pw.println(n + " = " + getHeader(n)); +Enumeration ev = values(n); +while (ev.hasMoreElements()) { +pw.println(n + " = " + ev.nextElement()); +} } return sw.toString(); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1177152 - in /tomcat/trunk/java/org/apache/coyote/http11: InternalAprInputBuffer.java InternalInputBuffer.java InternalNioInputBuffer.java
Author: kkolinko Date: Thu Sep 29 02:13:50 2011 New Revision: 1177152 URL: http://svn.apache.org/viewvc?rev=1177152&view=rev Log: No functional change. Simplify code and add comments: - unwrapped nested if(). - s/while()/if()/ where it has only one iteration. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1177152&r1=1177151&r2=1177152&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Thu Sep 29 02:13:50 2011 @@ -340,11 +340,11 @@ public class InternalAprInputBuffer exte chr = buf[pos]; -if ((chr == Constants.CR) || (chr == Constants.LF)) { -if (chr == Constants.LF) { -pos++; -return false; -} +if (chr == Constants.CR) { +// Skip +} else if (chr == Constants.LF) { +pos++; +return false; } else { break; } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java?rev=1177152&r1=1177151&r2=1177152&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalInputBuffer.java Thu Sep 29 02:13:50 2011 @@ -296,11 +296,11 @@ public class InternalInputBuffer extends chr = buf[pos]; -if ((chr == Constants.CR) || (chr == Constants.LF)) { -if (chr == Constants.LF) { -pos++; -return false; -} +if (chr == Constants.CR) { +// Skip +} else if (chr == Constants.LF) { +pos++; +return false; } else { break; } Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1177152&r1=1177151&r2=1177152&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Thu Sep 29 02:13:50 2011 @@ -48,9 +48,42 @@ public class InternalNioInputBuffer exte // -- Constants -enum HeaderParseStatus {DONE, HAVE_MORE_HEADERS, NEED_MORE_DATA} -enum HeaderParsePosition {HEADER_START, HEADER_NAME, HEADER_VALUE, -HEADER_MULTI_LINE, HEADER_SKIPLINE} +enum HeaderParseStatus { +DONE, HAVE_MORE_HEADERS, NEED_MORE_DATA +} + +enum HeaderParsePosition { +/** + * Start of a new header. A CRLF here means that there are no more + * headers. Any other character starts a header name. + */ +HEADER_START, +/** + * Reading a header name. All characters of header are HTTP_TOKEN_CHAR. + * Header name is followed by ':'. No whitespace is allowed. + * Any non-HTTP_TOKEN_CHAR (this includes any whitespace) encountered + * before ':' will result in the whole line being ignored. + */ +HEADER_NAME, +/** + * Reading the header value. We come into this state by two ways: + * a) just after the ':' on the first line of the header, b) on the + * start of a new line when it is known that it starts with SP or HT. + */ +HEADER_VALUE, +/** + * Before reading a new line of a header. Once the next byte is peeked, + * the state changes without advancing our position. The state becomes + * either HEADER_VALUE (if that first byte is SP or HT), or HEADER_START + * (otherwise). + */ +HEADER_MULTI_LINE, +/** + * Reading all bytes until the next CRLF. The line is being ignored. + */ +HEADER_SKIPLINE +} + // --- Constructors @@ -483,11 +516,11 @@ public class InternalNioInputBuffer exte chr = buf[pos]; -if ((chr == Constants.CR) || (chr == Constants.LF)) { -
DO NOT REPLY [Bug 51912] IOOB exception in InternalNioInputBuffer when debug logging is enabled
https://issues.apache.org/bugzilla/show_bug.cgi?id=51912 Konstantin Kolinko changed: What|Removed |Added Summary|Failures in |IOOB exception in |org.apache.coyote.http11.Te |InternalNioInputBuffer when |stInternalInputBuffer with |debug logging is enabled |NIO + debug logging | -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1177160 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Author: kkolinko Date: Thu Sep 29 04:33:26 2011 New Revision: 1177160 URL: http://svn.apache.org/viewvc?rev=1177160&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51912 Fix several small issues in Header processing in Nio HTTP connector: - Split HEADER_VALUE state into HEADER_VALUE_START and HEADER_VALUE. The first one skips leading whitespace, the second one - does not. - Trim trailing tabs as well as spaces. RFC-2616 Ch.4.2 says that both are LWS and both can be ignored. - Always trim whitespace from last line. - Fix initial value of lastSignificantChar when calling skipLine(). It fixes BZ 51912. Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1177160&r1=1177159&r2=1177160&view=diff == --- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original) +++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Thu Sep 29 04:33:26 2011 @@ -66,16 +66,23 @@ public class InternalNioInputBuffer exte */ HEADER_NAME, /** - * Reading the header value. We come into this state by two ways: - * a) just after the ':' on the first line of the header, b) on the - * start of a new line when it is known that it starts with SP or HT. + * Skipping whitespace before text of header value starts, either on the + * first line of header value (just after ':') or on subsequent lines + * when it is known that subsequent line starts with SP or HT. + */ +HEADER_VALUE_START, +/** + * Reading the header value. We are inside the value. Either on the + * first line or on any subsequent line. We come into this state from + * HEADER_VALUE_START after the first non-SP/non-HT byte is encountered + * on the line. */ HEADER_VALUE, /** * Before reading a new line of a header. Once the next byte is peeked, * the state changes without advancing our position. The state becomes - * either HEADER_VALUE (if that first byte is SP or HT), or HEADER_START - * (otherwise). + * either HEADER_VALUE_START (if that first byte is SP or HT), or + * HEADER_START (otherwise). */ HEADER_MULTI_LINE, /** @@ -549,25 +556,28 @@ public class InternalNioInputBuffer exte } } -if (buf[pos] == Constants.COLON) { -headerParsePos = HeaderParsePosition.HEADER_VALUE; +chr = buf[pos]; +if (chr == Constants.COLON) { +headerParsePos = HeaderParsePosition.HEADER_VALUE_START; headerData.headerValue = headers.addValue(buf, headerData.start, pos - headerData.start); -} else if (!HTTP_TOKEN_CHAR[buf[pos]]) { +pos++; +// Mark the current buffer position +headerData.start = pos; +headerData.realPos = pos; +headerData.lastSignificantChar = pos; +break; +} else if (!HTTP_TOKEN_CHAR[chr]) { // If a non-token header is detected, skip the line and // ignore the header +headerData.lastSignificantChar = pos; return skipLine(); } -chr = buf[pos]; + +// chr is next byte of header name. Convert to lowercase. if ((chr >= Constants.A) && (chr <= Constants.Z)) { buf[pos] = (byte) (chr - Constants.LC_OFFSET); } - pos++; -if ( headerParsePos == HeaderParsePosition.HEADER_VALUE ) { -// Mark the current buffer position -headerData.start = pos; -headerData.realPos = pos; -} } // Skip the line and ignore the header @@ -579,36 +589,34 @@ public class InternalNioInputBuffer exte // Reading the header value (which can be spanned over multiple lines) // -boolean eol = false; - -while (headerParsePos == HeaderParsePosition.HEADER_VALUE || +while (headerParsePos == HeaderParsePosition.HEADER_VALUE_START || + headerParsePos == HeaderParsePosition.HEADER_VALUE || headerParsePos == HeaderParsePosition.HEADER_MULTI_LINE) { -if ( headerParsePos == HeaderParsePosition.HEADER_VALUE ) { - -boolean space = true; +if ( headerParsePos == HeaderParsePosition.HEADER_VALUE_START ) { // Skipping spaces -while (space) { - +while (true) { // Read new