[GUMP@vmgump]: Project tomcat-trunk-test (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 gene...@gump.apache.org. Project tomcat-trunk-test has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 10 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-trunk-test : 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-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-trunk-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-trunk-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-trunk/output/build/logs The following work was performed: http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/gump_work/build_tomcat-trunk_tomcat-trunk-test.html Work Name: build_tomcat-trunk_tomcat-trunk-test (Type: Build) Work ended in a state of : Failed Elapsed: 23 mins 27 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-24052012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-24052012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-24052012-native-src.tar.gz -Dexamples.sources.skip=true -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-trunk/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-24052012.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/ srv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-trunk/tomcat-deps/tomcat-dbcp-24052012.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-6-openjdk/lib/tools.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-trunk/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-trunk/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/servlet-api.jar:/srv/gump/public/workspace/tomcat-trunk/outp ut/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-trunk/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-trunk/tomcat-deps/tomcat-dbcp-24052012.jar:/srv/gump/public/workspac
[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 5 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: 23 mins 14 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-24052012.jar -Dcommons-daemon.native.src.tgz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-24052012-native-src.tar.gz -Dtomcat-native.tar.gz=/srv/gump/public/workspace/apache-commons/daemon/dist/bin/commons-daemon-24052012-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-24052012.jar -Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar -Dtest.accesslog=true -Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x -Dcommons-dbcp.home=/ srv/gump/public/workspace/commons-dbcp-1.x -Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-24052012.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/eclipse/plugins/org.eclipse.jdt.core_3.4.2/jdtcore.jar:/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-24052012.jar:/srv/gump/public/workspace/apache-commons/daemon/dist/commons-daemon-24052012.jar:/srv/gump/ public/workspace/junit/dist/junit-24052012.jar - [junit] at org.junit.r
[Bug 53285] New: Web app configuration fails when security-role-ref does not contain role-link
https://issues.apache.org/bugzilla/show_bug.cgi?id=53285 Priority: P2 Bug ID: 53285 Assignee: dev@tomcat.apache.org Summary: Web app configuration fails when security-role-ref does not contain role-link Severity: normal Classification: Unclassified OS: Windows XP Reporter: sjdav...@acm.org Hardware: PC Status: NEW Version: 7.0.27 Component: Catalina Product: Tomcat 7 Created attachment 28829 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28829&action=edit Sample WAR The element is optional content within . However, an application will fail to deploy if the optional element is missing. I've attached a sample WAR that highlights the problem. Note, the attached WAR will deploy ok in 6.0.35. Console output from running 7.0.27 embedded in Eclipse: INFO: Starting Servlet Engine: Apache Tomcat/7.0.27 24/05/2012 2:32:34 PM org.apache.tomcat.util.digester.Digester endElement SEVERE: End event threw exception Throwable occurred: java.lang.IllegalArgumentException: Can't convert argument: null at org.apache.tomcat.util.IntrospectionUtils.convert(IntrospectionUtils.java:966) at org.apache.tomcat.util.digester.CallMethodRule.end(CallMethodRule.java:476) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1825) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1201) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314) at java.util.concurrent.FutureTask.run(FutureTask.java:149) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919) at java.lang.Thread.run(Thread.java:736) 24/05/2012 2:32:34 PM org.apache.catalina.startup.ContextConfig parseWebXml SEVERE: Parse error in application web.xml file at jndi:/localhost/testApp/WEB-INF/web.xml Throwable occurred: java.lang.IllegalArgumentException: Can't convert argument: null at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687) at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719) at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1054) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537) at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1825) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1201) at org.apache.catalina.startup.ContextConfig.co
Re: svn commit: r1342010 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
On 05/23/2012 10:07 PM, ma...@apache.org wrote: Author: markt -apr_time_t*socket_ttl; -apr_interval_time_t max_ttl; +apr_time_t*socket_last_active; +apr_interval_time_t default_timeout; Think we should move both socket_last_active and socket_timeout to tcn_socket_t. They are always bound to socket and we won't have to allocate two additional arrays and copying won't be needed since they will be part of apr_pollfd's client_data Regards -- ^TM - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 --- Comment #6 from Marvin Addison --- Actually, it was leveraging the system property replacement feature in the docs you cited that led to this enhancement request. We were setting system properties in setenv.sh, but then discovered that had the very undesirable consequence of leaking sensitive data to anyone on the system via ps output. While I could have engineered a valve or something to set system properties more discretely, storing credentials in a global, long-term facility seemed less desirable than a more targeted solution. The patch here is about 20 lines and adds reasonable value. I hope you'll consider it. I'm happy to respond to feedback on the patch if that will increase the likelihood of acceptance. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 --- Comment #5 from Mark Thomas --- http://tomcat.apache.org/tomcat-7.0-doc/config/index.html Second paragraph. Lots of ways to set the property values for replacement. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 --- Comment #4 from Konstantin Kolinko --- http://wiki.apache.org/tomcat/FAQ/Password -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 --- Comment #3 from Marvin Addison --- I'm embarrassed if that's supported and I missed it. I took the time for a thoughtful code review of jdbc-pool and didn't see what I was looking for, so wrote a simple patch. If it's not too much trouble, I wonder if you'd quickly review the patch to see if similar functionality is supported. If so I'll follow up on list. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 --- Comment #2 from Marvin Addison --- Created attachment 28828 --> https://issues.apache.org/bugzilla/attachment.cgi?id=28828&action=edit Patch for externalized credentials in properties file. Attached patch for this feature made against jdbc-pool-1.2-SNAPSHOT. I've tested this against tomcat-7.0.27 and works as expected. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52055] ChunkedInputFilter is not recycled for servlet 3.0 asynchronous request
https://issues.apache.org/bugzilla/show_bug.cgi?id=52055 Mark Thomas changed: What|Removed |Added Status|REOPENED|NEEDINFO --- Comment #12 from Mark Thomas --- Full stack traces please. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52055] ChunkedInputFilter is not recycled for servlet 3.0 asynchronous request
https://issues.apache.org/bugzilla/show_bug.cgi?id=52055 Mark Thomas changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #11 from Mark Thomas --- Re-open to investigate -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Mark Thomas --- This is already supported. Ask on the users list if you need help with configuration. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53283] New: Add Support for Externalized Data Source Credentials
https://issues.apache.org/bugzilla/show_bug.cgi?id=53283 Priority: P2 Bug ID: 53283 Assignee: dev@tomcat.apache.org Summary: Add Support for Externalized Data Source Credentials Severity: enhancement Classification: Unclassified OS: Linux Reporter: marvin.addi...@gmail.com Hardware: PC Status: NEW Version: unspecified Component: jdbc-pool Product: Tomcat Modules For deployment environments where the pooled data source configuration is either complex, controlled, or both, it would be helpful to allow externalization of the data source credentials. For example, it would be straightforward to reference a properties file containing credentials. This would allow the context definition containing the pooled data source configuration to be invariant with respect to environment, which would simplify migration of the data source between hosts or tiers. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53074] [websocket] java.net.SocketTimeoutException: Read timed caused by server.xml' connectTimeout
https://issues.apache.org/bugzilla/show_bug.cgi?id=53074 --- Comment #6 from Mark Thomas --- Just a short progress update. I have committed a set of changes to the APR/native connector to permit per socket timeouts. It works with my simple tests but needs more testing and review by some proper C coders (which I am not). I also have a first draft of the changes to trunk to enable infinite timeouts for WebSocket connections. That also needs some testing. I should have something to commit in the next couple of days. -- 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: r1342029 - /tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
Author: markt Date: Wed May 23 20:27:40 2012 New Revision: 1342029 URL: http://svn.apache.org/viewvc?rev=1342029&view=rev Log: Simplify the poller by using the new per socket timeout to differentiate between connection and keepalive timeouts without using two pollers. 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=1342029&r1=1342028&r2=1342029&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/AprEndpoint.java Wed May 23 20:27:40 2012 @@ -1098,17 +1098,15 @@ public class AprEndpoint extends Abstrac // Need two pollsets since the socketTimeout and the keep-alive timeout // can have different values. private long connectionPollset = 0; -private long keepAlivePollset = 0; private long pool = 0; private long[] desc; private long[] addSocket; -private boolean[] addSocketKeepAlive; +private int[] addSocketTimeout; private volatile int addCount = 0; private boolean comet = true; -private boolean separateKeepAlive = false; protected volatile int keepAliveCount = 0; public int getKeepAliveCount() { return keepAliveCount; } @@ -1124,35 +1122,20 @@ public class AprEndpoint extends Abstrac protected void init() { pool = Pool.create(serverSockPool); int size = getMaxConnections() / pollerThreadCount; -int keepAliveTimeout = getKeepAliveTimeout(); int socketTimeout = socketProperties.getSoTimeout(); -if (keepAliveTimeout != socketTimeout && !comet) { -separateKeepAlive = true; -} connectionPollset = allocatePoller(size, pool, socketTimeout); -if (separateKeepAlive) { -keepAlivePollset = allocatePoller(size, pool, keepAliveTimeout); -} if (connectionPollset == 0 && size > 1024) { size = 1024; connectionPollset = allocatePoller(size, pool, socketTimeout); -if (separateKeepAlive) { -keepAlivePollset = -allocatePoller(size, pool, keepAliveTimeout); -} } if (connectionPollset == 0) { size = 62; connectionPollset = allocatePoller(size, pool, socketTimeout); -if (separateKeepAlive) { -keepAlivePollset = -allocatePoller(size, pool, keepAliveTimeout); -} } desc = new long[size * 2]; keepAliveCount = 0; addSocket = new long[size]; -addSocketKeepAlive = new boolean[size]; +addSocketTimeout= new int[size]; addCount = 0; } @@ -1169,11 +1152,8 @@ public class AprEndpoint extends Abstrac destroySocket(addSocket[i]); } } -// Close all sockets still in the pollers +// Close all sockets still in the poller closePollset(connectionPollset); -if (separateKeepAlive) { -closePollset(keepAlivePollset); -} Pool.destroy(pool); keepAliveCount = 0; addCount = 0; @@ -1222,7 +1202,11 @@ public class AprEndpoint extends Abstrac return; } addSocket[addCount] = socket; -addSocketKeepAlive[addCount] = keepAlive; +if (keepAlive) { +addSocketTimeout[addCount] = getKeepAliveTimeout(); +} else { +addSocketTimeout[addCount] = getSoTimeout(); +} addCount++; // TODO: interrupt poll ? this.notify(); @@ -1275,14 +1259,10 @@ public class AprEndpoint extends Abstrac int successCount = 0; try { for (int i = (addCount - 1); i >= 0; i--) { -int rv; -if (separateKeepAlive && addSocketKeepAlive[i]) { -rv = Poll.add(keepAlivePollset, -addSocket[i], Poll.APR_POLLIN); -} else { -rv = Poll.add(connectionPollset, -addSocket[i], Poll.APR_POLLIN); -} +int rv = Poll.addWith
svn commit: r1342027 - in /tomcat/trunk/java/org/apache: catalina/core/AprLifecycleListener.java tomcat/jni/Poll.java
Author: markt Date: Wed May 23 20:26:32 2012 New Revision: 1342027 URL: http://svn.apache.org/viewvc?rev=1342027&view=rev Log: Add the new per socket timeout method to the Java API and increase the minimum version so that it is available. Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java tomcat/trunk/java/org/apache/tomcat/jni/Poll.java Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1342027&r1=1342026&r2=1342027&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Wed May 23 20:26:32 2012 @@ -60,9 +60,9 @@ public class AprLifecycleListener protected static final int TCN_REQUIRED_MAJOR = 1; protected static final int TCN_REQUIRED_MINOR = 1; -protected static final int TCN_REQUIRED_PATCH = 17; +protected static final int TCN_REQUIRED_PATCH = 24; protected static final int TCN_RECOMMENDED_MINOR = 1; -protected static final int TCN_RECOMMENDED_PV = 22; +protected static final int TCN_RECOMMENDED_PV = 24; // -- Properties Modified: tomcat/trunk/java/org/apache/tomcat/jni/Poll.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/Poll.java?rev=1342027&r1=1342026&r2=1342027&view=diff == --- tomcat/trunk/java/org/apache/tomcat/jni/Poll.java (original) +++ tomcat/trunk/java/org/apache/tomcat/jni/Poll.java Wed May 23 20:26:32 2012 @@ -71,11 +71,8 @@ public class Poll { public static native int destroy(long pollset); /** - * Add a socket or to a pollset - * If you set client_data in the descriptor, that value - * will be returned in the client_data field whenever this - * descriptor is signaled in apr_pollset_poll(). - * @param pollset The pollset to which to add the descriptor + * Add a socket to a pollset with the default timeout. + * @param pollset The pollset to which to add the socket * @param sock The sockets to add * @param reqevents requested events */ @@ -83,6 +80,16 @@ public class Poll { int reqevents); /** + * Add a socket to a pollset with a specific timeout. + * @param pollset The pollset to which to add the socket + * @param sock The sockets to add + * @param reqevents requested events + * @param timeout requested timeout in microseconds (-1 for infinite) + */ +public static native int addWithTimeout(long pollset, long sock, +int reqevents, long timeout); + +/** * Remove a descriptor from a pollset * @param pollset The pollset from which to remove the descriptor * @param sock The socket to remove - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342025 - in /tomcat/native/branches/1.1.x: ./ native/include/tcn.h native/src/poll.c
Author: markt Date: Wed May 23 20:22:46 2012 New Revision: 1342025 URL: http://svn.apache.org/viewvc?rev=1342025&view=rev Log: Add per socket timeout support to the pollset Back port of r1342024 Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/include/tcn.h tomcat/native/branches/1.1.x/native/src/poll.c Propchange: tomcat/native/branches/1.1.x/ -- Merged /tomcat/native/trunk:r1342024 Modified: tomcat/native/branches/1.1.x/native/include/tcn.h URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/include/tcn.h?rev=1342025&r1=1342024&r2=1342025&view=diff == --- tomcat/native/branches/1.1.x/native/include/tcn.h (original) +++ tomcat/native/branches/1.1.x/native/include/tcn.h Wed May 23 20:22:46 2012 @@ -284,4 +284,6 @@ typedef struct { else if (F == 1) T = SOCK_DGRAM; \ else T = F +#define TCN_NO_SOCKET_TIMEOUT -2 + #endif /* TCN_H */ Modified: tomcat/native/branches/1.1.x/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342025&r1=1342024&r2=1342025&view=diff == --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 20:22:46 2012 @@ -41,6 +41,7 @@ typedef struct tcn_pollset { jlong *set; apr_pollfd_t *socket_set; apr_time_t*socket_last_active; +apr_interval_time_t *socket_timeout; apr_interval_time_t default_timeout; #ifdef TCN_DO_STATISTICS int sp_added; @@ -130,6 +131,8 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->socket_set); tps->socket_last_active = apr_palloc(p, size * sizeof(apr_time_t)); TCN_CHECK_ALLOCATED(tps->socket_last_active); +tps->socket_timeout = apr_palloc(p, size * sizeof(apr_interval_time_t)); +TCN_CHECK_ALLOCATED(tps->socket_timeout); tps->nelts = 0; tps->nalloc = size; tps->pool = p; @@ -158,15 +161,12 @@ TCN_IMPLEMENT_CALL(jint, Poll, destroy)( return (jint)apr_pollset_destroy(p->pollset); } -TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_STDARGS, jlong pollset, -jlong socket, jint reqevents) -{ -tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); -tcn_socket_t *s = J2P(socket, tcn_socket_t *); -apr_pollfd_t fd; +static apr_status_t do_add(tcn_pollset_t *p, tcn_socket_t *s, + apr_int16_t reqevents, + apr_interval_time_t socket_timeout) { -UNREFERENCED_STDARGS; -TCN_ASSERT(socket != 0); +apr_interval_time_t timeout = socket_timeout; +apr_pollfd_t fd; if (p->nelts == p->nalloc) { #ifdef TCN_DO_STATISTICS @@ -176,14 +176,19 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ } memset(&fd, 0, sizeof(apr_pollfd_t)); fd.desc_type = APR_POLL_SOCKET; -fd.reqevents = (apr_int16_t)reqevents; +fd.reqevents = reqevents; fd.desc.s= s->sock; fd.client_data = s; -if (p->default_timeout > 0) + +if (timeout == TCN_NO_SOCKET_TIMEOUT) { +timeout = p->default_timeout; +} +if (timeout > 0) p->socket_last_active[p->nelts] = apr_time_now(); else p->socket_last_active[p->nelts] = 0; +p->socket_timeout[p->nelts] = socket_timeout; p->socket_set[p->nelts] = fd; p->nelts++; #ifdef TCN_DO_STATISTICS @@ -193,6 +198,31 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ return (jint)apr_pollset_add(p->pollset, &fd); } +TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_STDARGS, jlong pollset, +jlong socket, jint reqevents) +{ +tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); +tcn_socket_t *s = J2P(socket, tcn_socket_t *); + +UNREFERENCED_STDARGS; +TCN_ASSERT(socket != 0); + +return (jint) do_add(p, s, (apr_int16_t)reqevents, TCN_NO_SOCKET_TIMEOUT); +} + +TCN_IMPLEMENT_CALL(jint, Poll, addWithTimeout)(TCN_STDARGS, jlong pollset, + jlong socket, jint reqevents, + jlong socket_timeout) +{ +tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); +tcn_socket_t *s = J2P(socket, tcn_socket_t *); + +UNREFERENCED_STDARGS; +TCN_ASSERT(socket != 0); + +return (jint) do_add(p, s, (apr_int16_t)reqevents, J2T(socket_timeout)); +} + static apr_status_t do_remove(tcn_pollset_t *p, const apr_pollfd_t *fd) { apr_int32_t i; @@ -216,6 +246,7 @@ static apr_status_t do_remove(tcn_pollse else { p->socket_set[dst] = p->socket_set[i]; p->socket_last_active[dst] = p->socket_last_active[i]; +p->socket_timeout[dst] = p->socket_timeout[i];
svn commit: r1342024 - in /tomcat/native/trunk/native: include/tcn.h src/poll.c
Author: markt Date: Wed May 23 20:22:03 2012 New Revision: 1342024 URL: http://svn.apache.org/viewvc?rev=1342024&view=rev Log: Add per socket timeout support to the pollset Modified: tomcat/native/trunk/native/include/tcn.h tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/include/tcn.h URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/include/tcn.h?rev=1342024&r1=1342023&r2=1342024&view=diff == --- tomcat/native/trunk/native/include/tcn.h (original) +++ tomcat/native/trunk/native/include/tcn.h Wed May 23 20:22:03 2012 @@ -283,4 +283,6 @@ typedef struct { else if (F == 1) T = SOCK_DGRAM; \ else T = F +#define TCN_NO_SOCKET_TIMEOUT -2 + #endif /* TCN_H */ Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342024&r1=1342023&r2=1342024&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 20:22:03 2012 @@ -41,6 +41,7 @@ typedef struct tcn_pollset { jlong *set; apr_pollfd_t *socket_set; apr_time_t*socket_last_active; +apr_interval_time_t *socket_timeout; apr_interval_time_t default_timeout; jboolean wakeable; #ifdef TCN_DO_STATISTICS @@ -168,6 +169,8 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->socket_set); tps->socket_last_active = apr_palloc(p, size * sizeof(apr_time_t)); TCN_CHECK_ALLOCATED(tps->socket_last_active); +tps->socket_timeout = apr_palloc(p, size * sizeof(apr_interval_time_t)); +TCN_CHECK_ALLOCATED(tps->socket_timeout); tps->nelts = 0; tps->nalloc = size; tps->pool = p; @@ -202,15 +205,12 @@ TCN_IMPLEMENT_CALL(jint, Poll, destroy)( return (jint)apr_pollset_destroy(p->pollset); } -TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_STDARGS, jlong pollset, -jlong socket, jint reqevents) -{ -tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); -tcn_socket_t *s = J2P(socket, tcn_socket_t *); -apr_pollfd_t fd; +static apr_status_t do_add(tcn_pollset_t *p, tcn_socket_t *s, + apr_int16_t reqevents, + apr_interval_time_t socket_timeout) { -UNREFERENCED_STDARGS; -TCN_ASSERT(socket != 0); +apr_interval_time_t timeout = socket_timeout; +apr_pollfd_t fd; if (p->nelts == p->nalloc) { #ifdef TCN_DO_STATISTICS @@ -220,14 +220,19 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ } memset(&fd, 0, sizeof(apr_pollfd_t)); fd.desc_type = APR_POLL_SOCKET; -fd.reqevents = (apr_int16_t)reqevents; +fd.reqevents = reqevents; fd.desc.s= s->sock; fd.client_data = s; -if (p->default_timeout > 0) + +if (timeout == TCN_NO_SOCKET_TIMEOUT) { +timeout = p->default_timeout; +} +if (timeout > 0) p->socket_last_active[p->nelts] = apr_time_now(); else p->socket_last_active[p->nelts] = 0; +p->socket_timeout[p->nelts] = socket_timeout; p->socket_set[p->nelts] = fd; p->nelts++; #ifdef TCN_DO_STATISTICS @@ -237,6 +242,31 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ return (jint)apr_pollset_add(p->pollset, &fd); } +TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_STDARGS, jlong pollset, +jlong socket, jint reqevents) +{ +tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); +tcn_socket_t *s = J2P(socket, tcn_socket_t *); + +UNREFERENCED_STDARGS; +TCN_ASSERT(socket != 0); + +return (jint) do_add(p, s, (apr_int16_t)reqevents, TCN_NO_SOCKET_TIMEOUT); +} + +TCN_IMPLEMENT_CALL(jint, Poll, addWithTimeout)(TCN_STDARGS, jlong pollset, + jlong socket, jint reqevents, + jlong socket_timeout) +{ +tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); +tcn_socket_t *s = J2P(socket, tcn_socket_t *); + +UNREFERENCED_STDARGS; +TCN_ASSERT(socket != 0); + +return (jint) do_add(p, s, (apr_int16_t)reqevents, J2T(socket_timeout)); +} + static apr_status_t do_remove(tcn_pollset_t *p, const apr_pollfd_t *fd) { apr_int32_t i; @@ -260,6 +290,7 @@ static apr_status_t do_remove(tcn_pollse else { p->socket_set[dst] = p->socket_set[i]; p->socket_last_active[dst] = p->socket_last_active[i]; +p->socket_timeout[dst] = p->socket_timeout[i]; dst++; } } @@ -334,18 +365,27 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN p->sp_poll++; #endif -if (ptime > 0 && p->default_timeout >= 0) { +if (ptime > 0) { now = apr_time_now(); /* Find the minimum timeout */ for (i = 0; i
svn commit: r1342021 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
Author: markt Date: Wed May 23 20:18:48 2012 New Revision: 1342021 URL: http://svn.apache.org/viewvc?rev=1342021&view=rev Log: Another rename Back port of r1342020 Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/src/poll.c Propchange: tomcat/native/branches/1.1.x/ -- Merged /tomcat/native/trunk:r1342020 Modified: tomcat/native/branches/1.1.x/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342021&r1=1342020&r2=1342021&view=diff == --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 20:18:48 2012 @@ -401,11 +401,11 @@ TCN_IMPLEMENT_CALL(jint, Poll, maintain) } TCN_IMPLEMENT_CALL(void, Poll, setTtl)(TCN_STDARGS, jlong pollset, - jlong ttl) + jlong default_timeout) { tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); UNREFERENCED_STDARGS; -p->default_timeout = J2T(ttl); +p->default_timeout = J2T(default_timeout); } TCN_IMPLEMENT_CALL(jlong, Poll, getTtl)(TCN_STDARGS, jlong pollset) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342020 - /tomcat/native/trunk/native/src/poll.c
Author: markt Date: Wed May 23 20:18:10 2012 New Revision: 1342020 URL: http://svn.apache.org/viewvc?rev=1342020&view=rev Log: Another rename Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342020&r1=1342019&r2=1342020&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 20:18:10 2012 @@ -445,11 +445,11 @@ TCN_IMPLEMENT_CALL(jint, Poll, maintain) } TCN_IMPLEMENT_CALL(void, Poll, setTtl)(TCN_STDARGS, jlong pollset, - jlong ttl) + jlong default_timeout) { tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); UNREFERENCED_STDARGS; -p->default_timeout = J2T(ttl); +p->default_timeout = J2T(default_timeout); } TCN_IMPLEMENT_CALL(jlong, Poll, getTtl)(TCN_STDARGS, jlong pollset) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342014 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
Author: markt Date: Wed May 23 20:14:52 2012 New Revision: 1342014 URL: http://svn.apache.org/viewvc?rev=1342014&view=rev Log: Follow up to r1342004 and r1342010. Missed a couple of changes. Back port of r1342013 Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/src/poll.c Propchange: tomcat/native/branches/1.1.x/ -- Merged /tomcat/native/trunk:r1342013 Modified: tomcat/native/branches/1.1.x/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342014&r1=1342013&r2=1342014&view=diff == --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 20:14:52 2012 @@ -99,7 +99,7 @@ void sp_poll_dump_statistics() TCN_IMPLEMENT_CALL(jlong, Poll, create)(TCN_STDARGS, jint size, jlong pool, jint flags, -jlong ttl) +jlong default_timeout) { apr_pool_t *p = J2P(pool, apr_pool_t *); apr_pollset_t *pollset = NULL; @@ -128,12 +128,12 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->set); tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); TCN_CHECK_ALLOCATED(tps->socket_set); -tps->socket_last_active = apr_palloc(p, size * sizeof(apr_interval_time_t)); +tps->socket_last_active = apr_palloc(p, size * sizeof(apr_time_t)); TCN_CHECK_ALLOCATED(tps->socket_last_active); tps->nelts = 0; tps->nalloc = size; tps->pool = p; -tps->default_timeout = J2T(ttl); +tps->default_timeout = J2T(default_timeout); #ifdef TCN_DO_STATISTICS sp_created++; apr_pool_cleanup_register(p, (const void *)tps, - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342013 - /tomcat/native/trunk/native/src/poll.c
Author: markt Date: Wed May 23 20:14:06 2012 New Revision: 1342013 URL: http://svn.apache.org/viewvc?rev=1342013&view=rev Log: Follow up to r1342003 and r1342008. Missed a couple of changes. Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342013&r1=1342012&r2=1342013&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 20:14:06 2012 @@ -100,7 +100,7 @@ void sp_poll_dump_statistics() TCN_IMPLEMENT_CALL(jlong, Poll, create)(TCN_STDARGS, jint size, jlong pool, jint flags, -jlong ttl) +jlong default_timeout) { apr_pool_t *p = J2P(pool, apr_pool_t *); apr_pollset_t *pollset = NULL; @@ -166,12 +166,12 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->set); tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); TCN_CHECK_ALLOCATED(tps->socket_set); -tps->socket_last_active = apr_palloc(p, size * sizeof(apr_interval_time_t)); +tps->socket_last_active = apr_palloc(p, size * sizeof(apr_time_t)); TCN_CHECK_ALLOCATED(tps->socket_last_active); tps->nelts = 0; tps->nalloc = size; tps->pool = p; -tps->default_timeout = J2T(ttl); +tps->default_timeout = J2T(default_timeout); #if defined(APR_POLLSET_WAKEABLE) if (f & APR_POLLSET_WAKEABLE) tps->wakeable = JNI_TRUE; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342010 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
Author: markt Date: Wed May 23 20:07:46 2012 New Revision: 1342010 URL: http://svn.apache.org/viewvc?rev=1342010&view=rev Log: Renames to make code clearer socket_ttl -> socket_last_active max_ttl -> default_timeout Back port of r1342008 Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/src/poll.c Propchange: tomcat/native/branches/1.1.x/ -- Merged /tomcat/native/trunk:r1342008 Modified: tomcat/native/branches/1.1.x/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342010&r1=1342009&r2=1342010&view=diff == --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 20:07:46 2012 @@ -40,8 +40,8 @@ typedef struct tcn_pollset { apr_pollset_t *pollset; jlong *set; apr_pollfd_t *socket_set; -apr_time_t*socket_ttl; -apr_interval_time_t max_ttl; +apr_time_t*socket_last_active; +apr_interval_time_t default_timeout; #ifdef TCN_DO_STATISTICS int sp_added; int sp_max_count; @@ -128,12 +128,12 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->set); tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); TCN_CHECK_ALLOCATED(tps->socket_set); -tps->socket_ttl = apr_palloc(p, size * sizeof(apr_interval_time_t)); -TCN_CHECK_ALLOCATED(tps->socket_ttl); +tps->socket_last_active = apr_palloc(p, size * sizeof(apr_interval_time_t)); +TCN_CHECK_ALLOCATED(tps->socket_last_active); tps->nelts = 0; tps->nalloc = size; tps->pool = p; -tps->max_ttl = J2T(ttl); +tps->default_timeout = J2T(ttl); #ifdef TCN_DO_STATISTICS sp_created++; apr_pool_cleanup_register(p, (const void *)tps, @@ -179,10 +179,10 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ fd.reqevents = (apr_int16_t)reqevents; fd.desc.s= s->sock; fd.client_data = s; -if (p->max_ttl > 0) -p->socket_ttl[p->nelts] = apr_time_now(); +if (p->default_timeout > 0) +p->socket_last_active[p->nelts] = apr_time_now(); else -p->socket_ttl[p->nelts] = 0; +p->socket_last_active[p->nelts] = 0; p->socket_set[p->nelts] = fd; p->nelts++; @@ -215,7 +215,7 @@ static apr_status_t do_remove(tcn_pollse } else { p->socket_set[dst] = p->socket_set[i]; -p->socket_ttl[dst] = p->socket_ttl[i]; +p->socket_last_active[dst] = p->socket_last_active[i]; dst++; } } @@ -225,14 +225,14 @@ static apr_status_t do_remove(tcn_pollse return apr_pollset_remove(p->pollset, fd); } -static void update_ttl(tcn_pollset_t *p, const apr_pollfd_t *fd, apr_time_t t) +static void update_last_active(tcn_pollset_t *p, const apr_pollfd_t *fd, apr_time_t t) { apr_int32_t i; for (i = 0; i < p->nelts; i++) { if (fd->desc.s == p->socket_set[i].desc.s) { -/* Found an instance of the fd: update ttl */ -p->socket_ttl[i] = t; +/* Found an instance of the fd: update last active time */ +p->socket_last_active[i] = t; break; } } @@ -290,18 +290,18 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN p->sp_poll++; #endif -if (ptime > 0 && p->max_ttl >= 0) { +if (ptime > 0 && p->default_timeout >= 0) { now = apr_time_now(); /* Find the minimum timeout */ for (i = 0; i < p->nelts; i++) { -apr_interval_time_t t = now - p->socket_ttl[i]; -if (t >= p->max_ttl) { +apr_interval_time_t t = now - p->socket_last_active[i]; +if (t >= p->default_timeout) { ptime = 0; break; } else { -ptime = TCN_MIN(p->max_ttl - t, ptime); +ptime = TCN_MIN(p->default_timeout - t, ptime); } } } @@ -340,7 +340,7 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN if (remove) do_remove(p, fd); else -update_ttl(p, fd, now); +update_last_active(p, fd, now); fd ++; } (*e)->SetLongArrayRegion(e, set, 0, num * 2, p->set); @@ -361,9 +361,9 @@ TCN_IMPLEMENT_CALL(jint, Poll, maintain) TCN_ASSERT(pollset != 0); /* Check for timeout sockets */ -if (p->max_ttl > 0) { +if (p->default_timeout > 0) { for (i = 0; i < p->nelts; i++) { -if ((now - p->socket_ttl[i]) >= p->max_ttl) { +if ((now - p->socket_last_active[i]) >= p->default_timeout) { fd = p->socket_set[i]; p->set[num++] = P2J(fd.client_data); } @
svn commit: r1342008 - /tomcat/native/trunk/native/src/poll.c
Author: markt Date: Wed May 23 20:06:26 2012 New Revision: 1342008 URL: http://svn.apache.org/viewvc?rev=1342008&view=rev Log: Renames to make code clearer socket_ttl -> socket_last_active max_ttl -> default_timeout Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342008&r1=1342007&r2=1342008&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 20:06:26 2012 @@ -40,8 +40,8 @@ typedef struct tcn_pollset { apr_pollset_t *pollset; jlong *set; apr_pollfd_t *socket_set; -apr_time_t*socket_ttl; -apr_interval_time_t max_ttl; +apr_time_t*socket_last_active; +apr_interval_time_t default_timeout; jboolean wakeable; #ifdef TCN_DO_STATISTICS int sp_added; @@ -166,12 +166,12 @@ TCN_IMPLEMENT_CALL(jlong, Poll, create)( TCN_CHECK_ALLOCATED(tps->set); tps->socket_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); TCN_CHECK_ALLOCATED(tps->socket_set); -tps->socket_ttl = apr_palloc(p, size * sizeof(apr_interval_time_t)); -TCN_CHECK_ALLOCATED(tps->socket_ttl); +tps->socket_last_active = apr_palloc(p, size * sizeof(apr_interval_time_t)); +TCN_CHECK_ALLOCATED(tps->socket_last_active); tps->nelts = 0; tps->nalloc = size; tps->pool = p; -tps->max_ttl = J2T(ttl); +tps->default_timeout = J2T(ttl); #if defined(APR_POLLSET_WAKEABLE) if (f & APR_POLLSET_WAKEABLE) tps->wakeable = JNI_TRUE; @@ -223,10 +223,10 @@ TCN_IMPLEMENT_CALL(jint, Poll, add)(TCN_ fd.reqevents = (apr_int16_t)reqevents; fd.desc.s= s->sock; fd.client_data = s; -if (p->max_ttl > 0) -p->socket_ttl[p->nelts] = apr_time_now(); +if (p->default_timeout > 0) +p->socket_last_active[p->nelts] = apr_time_now(); else -p->socket_ttl[p->nelts] = 0; +p->socket_last_active[p->nelts] = 0; p->socket_set[p->nelts] = fd; p->nelts++; @@ -259,7 +259,7 @@ static apr_status_t do_remove(tcn_pollse } else { p->socket_set[dst] = p->socket_set[i]; -p->socket_ttl[dst] = p->socket_ttl[i]; +p->socket_last_active[dst] = p->socket_last_active[i]; dst++; } } @@ -269,14 +269,14 @@ static apr_status_t do_remove(tcn_pollse return apr_pollset_remove(p->pollset, fd); } -static void update_ttl(tcn_pollset_t *p, const apr_pollfd_t *fd, apr_time_t t) +static void update_last_active(tcn_pollset_t *p, const apr_pollfd_t *fd, apr_time_t t) { apr_int32_t i; for (i = 0; i < p->nelts; i++) { if (fd->desc.s == p->socket_set[i].desc.s) { -/* Found an instance of the fd: update ttl */ -p->socket_ttl[i] = t; +/* Found an instance of the fd: update last active time */ +p->socket_last_active[i] = t; break; } } @@ -334,18 +334,18 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN p->sp_poll++; #endif -if (ptime > 0 && p->max_ttl >= 0) { +if (ptime > 0 && p->default_timeout >= 0) { now = apr_time_now(); /* Find the minimum timeout */ for (i = 0; i < p->nelts; i++) { -apr_interval_time_t t = now - p->socket_ttl[i]; -if (t >= p->max_ttl) { +apr_interval_time_t t = now - p->socket_last_active[i]; +if (t >= p->default_timeout) { ptime = 0; break; } else { -ptime = TCN_MIN(p->max_ttl - t, ptime); +ptime = TCN_MIN(p->default_timeout - t, ptime); } } } @@ -384,7 +384,7 @@ TCN_IMPLEMENT_CALL(jint, Poll, poll)(TCN if (remove) do_remove(p, fd); else -update_ttl(p, fd, now); +update_last_active(p, fd, now); fd ++; } (*e)->SetLongArrayRegion(e, set, 0, num * 2, p->set); @@ -405,9 +405,9 @@ TCN_IMPLEMENT_CALL(jint, Poll, maintain) TCN_ASSERT(pollset != 0); /* Check for timeout sockets */ -if (p->max_ttl > 0) { +if (p->default_timeout > 0) { for (i = 0; i < p->nelts; i++) { -if ((now - p->socket_ttl[i]) >= p->max_ttl) { +if ((now - p->socket_last_active[i]) >= p->default_timeout) { fd = p->socket_set[i]; p->set[num++] = P2J(fd.client_data); } @@ -426,7 +426,7 @@ TCN_IMPLEMENT_CALL(jint, Poll, maintain) } } } -else if (p->max_ttl == 0) { +else if (p->default_timeout == 0) { for (i = 0; i < p->nelts; i++) { fd = p->socket_set[i]; p->set[n
svn commit: r1342004 - in /tomcat/native/branches/1.1.x: ./ native/src/poll.c
Author: markt Date: Wed May 23 19:58:23 2012 New Revision: 1342004 URL: http://svn.apache.org/viewvc?rev=1342004&view=rev Log: socket_ttl is an absolute time, not an interval (not that it really matters, apr_int64_t is used for both types Back port of r1342003 Modified: tomcat/native/branches/1.1.x/ (props changed) tomcat/native/branches/1.1.x/native/src/poll.c Propchange: tomcat/native/branches/1.1.x/ -- Merged /tomcat/native/trunk:r1342003 Modified: tomcat/native/branches/1.1.x/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/branches/1.1.x/native/src/poll.c?rev=1342004&r1=1342003&r2=1342004&view=diff == --- tomcat/native/branches/1.1.x/native/src/poll.c (original) +++ tomcat/native/branches/1.1.x/native/src/poll.c Wed May 23 19:58:23 2012 @@ -40,7 +40,7 @@ typedef struct tcn_pollset { apr_pollset_t *pollset; jlong *set; apr_pollfd_t *socket_set; -apr_interval_time_t *socket_ttl; +apr_time_t*socket_ttl; apr_interval_time_t max_ttl; #ifdef TCN_DO_STATISTICS int sp_added; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342003 - /tomcat/native/trunk/native/src/poll.c
Author: markt Date: Wed May 23 19:56:19 2012 New Revision: 1342003 URL: http://svn.apache.org/viewvc?rev=1342003&view=rev Log: socket_ttl is an absolute time, not an interval (not that it really matters, apr_int64_t is used for both types Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342003&r1=1342002&r2=1342003&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 19:56:19 2012 @@ -40,7 +40,7 @@ typedef struct tcn_pollset { apr_pollset_t *pollset; jlong *set; apr_pollfd_t *socket_set; -apr_interval_time_t *socket_ttl; +apr_time_t*socket_ttl; apr_interval_time_t max_ttl; jboolean wakeable; #ifdef TCN_DO_STATISTICS - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1342000 - /tomcat/native/trunk/native/src/poll.c
Author: markt Date: Wed May 23 19:53:08 2012 New Revision: 1342000 URL: http://svn.apache.org/viewvc?rev=1342000&view=rev Log: Fix warning Modified: tomcat/native/trunk/native/src/poll.c Modified: tomcat/native/trunk/native/src/poll.c URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/poll.c?rev=1342000&r1=1341999&r2=1342000&view=diff == --- tomcat/native/trunk/native/src/poll.c (original) +++ tomcat/native/trunk/native/src/poll.c Wed May 23 19:53:08 2012 @@ -495,7 +495,7 @@ TCN_IMPLEMENT_CALL(jint, Poll, interrupt { tcn_pollset_t *p = J2P(pollset, tcn_pollset_t *); -UNREFERENCED(o); +UNREFERENCED_STDARGS; TCN_ASSERT(pollset != 0); return (jint)apr_pollset_wakeup(p->pollset); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53074] [websocket] java.net.SocketTimeoutException: Read timed caused by server.xml' connectTimeout
https://issues.apache.org/bugzilla/show_bug.cgi?id=53074 mike_mac changed: What|Removed |Added CC||mike_mac...@yahoo.com -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53281] Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http
https://issues.apache.org/bugzilla/show_bug.cgi?id=53281 saurabh changed: What|Removed |Added CC||saurabhsul...@yahoo.co.in -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53281] New: Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http
https://issues.apache.org/bugzilla/show_bug.cgi?id=53281 Priority: P2 Bug ID: 53281 Assignee: dev@tomcat.apache.org Summary: Tomcat returns garbage data with HTTP/0.9 200 OK header when SSL port is accessed using http Severity: enhancement Classification: Unclassified OS: Linux Reporter: saurabhsul...@yahoo.co.in Hardware: PC Status: NEW Version: 6.0.29 Component: Catalina Product: Tomcat 6 Steps to reproduce the issue: 1. Configure server.xml to have a single SSL HTTP/1.1 Connector on port 443. 2. Access your site using 'http' as shown below: http://localhost:443/ Tomcat will return some garbage characters and the header information will contain HTTP/0.9 200 OK Expected behavior: Tomcat should terminate the connection without returning any data or HTTP/1.1 400 Bad Request response. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 53173] maxConnections feature hangs the system
https://issues.apache.org/bugzilla/show_bug.cgi?id=53173 --- Comment #4 from Filip Hanik --- Just for documentation purposes, found the root cause of this problem, and it all makes sense now http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?r1=1127961&r2=1127962&; in r1127962 This change counts up connection before it has been validated to be working. Prior to this change, count up only occurred if a connection was valid and added to the poller. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52055] ChunkedInputFilter is not recycled for servlet 3.0 asynchronous request
https://issues.apache.org/bugzilla/show_bug.cgi?id=52055 --- Comment #10 from Sudhan Moghe --- Got this issue again. :( Earlier I was running with protocol="HTTP/1.1" This time I got error with protocol="org.apache.coyote.http11.Http11NioProtocol" Shall I reopen? I was running single client. That is one request at a time. Got exception in client and client closed socket. Got following exception is server. java.io.EOFException: Unexpected EOF read on the socket at org.apache.coyote.http11.InternalNioInputBuffer.readSocket(InternalNioInputBuffer.java:455) at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:808) at org.apache.coyote.http11.InternalNioInputBuffer$SocketInputBuffer.doRead(InternalNioInputBuffer.java:833) at org.apache.coyote.http11.filters.ChunkedInputFilter.readBytes(ChunkedInputFilter.java:271) at org.apache.coyote.http11.filters.ChunkedInputFilter.parseCRLF(ChunkedInputFilter.java:355) at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:147) at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346) at org.apache.coyote.Request.doRead(Request.java:422) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:431) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:200) This is expected. But looks like filters were not recycled before next request. Next request failed with java.io.IOException: Invalid CRLF at org.apache.coyote.http11.filters.ChunkedInputFilter.parseCRLF(ChunkedInputFilter.java:366) at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:147) at org.apache.coyote.http11.AbstractInputBuffer.doRead(AbstractInputBuffer.java:346) at org.apache.coyote.Request.doRead(Request.java:422) at org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:290) at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:431) at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:315) at org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:200) -- 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