[GUMP@vmgump-vm3]: Project tomcat-trunk-test-nio2 (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-nio2 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-trunk-test-nio2 : Tomcat 9.x, a web server implementing the Java Servlet 4.0, ... Full details are available at: http://vmgump-vm3.apache.org/tomcat-trunk/tomcat-trunk-test-nio2/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -DEBUG- Dependency on bnd exists, no need to add for property bndlib.jar. -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/logs-NIO2 -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs -WARNING- No directory [/srv/gump/public/workspace/tomcat-trunk/output/test-tmp-NIO2/logs] The following work was performed: http://vmgump-vm3.apache.org/tomcat-trunk/tomcat-trunk-test-nio2/gump_work/build_tomcat-trunk_tomcat-trunk-test-nio2.html Work Name: build_tomcat-trunk_tomcat-trunk-test-nio2 (Type: Build) Work ended in a state of : Failed Elapsed: 24 mins 36 secs Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Dbase.path=/srv/gump/public/workspace/tomcat-trunk/tomcat-build-libs -Dbnd.jar=/srv/gump/packages/bnd/bnd-4.0.0/biz.aQute.bnd-4.0.0.jar -Dsaaj-api.jar=/srv/gump/packages/saaj-api/saaj-api-1.3.5.jar -Djaxrpc-lib.jar=/srv/gump/packages/jaxrpc/geronimo-spec-jaxrpc-1.1-rc4.jar -Dtest.temp=output/test-tmp-NIO2 -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar -Djava.net.preferIPv4Stack=/srv/gump/public/workspace/tomcat-trunk/true -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar -Dexamples.sources.skip=true -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar -Dtest.openssl.path=/srv/gump/public/workspace/openssl-master/dest-20190220/bin/openssl -Dexecute .test.nio=false -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar -Dbndlib.jar=/srv/gump/packages/bnd/bndlib-4.0.0/biz.aQute.bndlib-4.0.0.jar -Dexecute.test.apr=false -Dwsdl4j-lib.jar=/srv/gump/packages/wsdl4j/wsdl4j-1.6.3.jar -Dtest.reports=output/logs-NIO2 -Dexecute.test.nio2=true -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar -Dtest.relaxTiming=true -Dtest.excludePerformance=true -Dtest.accesslog=true -Deasymock.jar=/srv/gump/public/workspace/easymock/core/target/easymock-4.1-SNAPSHOT.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-trunk] CLASSPATH: /usr/lib/jvm/java-8-oracle/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-junit4.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.ja r:/srv/gump/public/workspace/tomcat-trunk/output/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/websocket-api.jar:/srv/gump/public/workspace/tomcat-trunk/output/build/lib/jaspic-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/catalina-storeconfig.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/
[GUMP@vmgump-vm3]: Project tomcat-tc8.5.x-test-nio2 (in module tomcat-8.5.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-tc8.5.x-test-nio2 has an issue affecting its community integration. This issue affects 1 projects, and has been outstanding for 28 runs. The current state of this project is 'Failed', with reason 'Build Failed'. For reference only, the following projects are affected by this: - tomcat-tc8.5.x-test-nio2 : Tomcat 8.x, a web server implementing the Java Servlet 3.1, ... Full details are available at: http://vmgump-vm3.apache.org/tomcat-8.5.x/tomcat-tc8.5.x-test-nio2/index.html That said, some information snippets are provided here. The following annotations (debug/informational/warning/error messages) were provided: -INFO- Failed with reason build failed -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.5.x/output/logs-NIO2 -INFO- Project Reports in: /srv/gump/public/workspace/tomcat-8.5.x/output/test-tmp-NIO2/logs -WARNING- No directory [/srv/gump/public/workspace/tomcat-8.5.x/output/test-tmp-NIO2/logs] The following work was performed: http://vmgump-vm3.apache.org/tomcat-8.5.x/tomcat-tc8.5.x-test-nio2/gump_work/build_tomcat-8.5.x_tomcat-tc8.5.x-test-nio2.html Work Name: build_tomcat-8.5.x_tomcat-tc8.5.x-test-nio2 (Type: Build) Work ended in a state of : Failed Elapsed: 19 mins 10 secs Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true -Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml -Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar -Djava.net.preferIPv4Stack=/srv/gump/public/workspace/tomcat-8.5.x/true -Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar -Dtest.reports=output/logs-NIO2 -Dexecute.test.nio2=true -Dexamples.sources.skip=true -Dbase.path=/srv/gump/public/workspace/tomcat-8.5.x/tomcat-build-libs -Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar -Dtest.relaxTiming=true -Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar -Dtest.temp=output/test-tmp-NIO2 -Dtest.accesslog=true -Dexecute.test.nio=false -Dtest.openssl.path=/srv/gump/public/workspace/openssl-1.1.1/dest-20190220/bin/openssl -Dexe cute.test.bio=false -Dexecute.test.apr=false -Dtest.excludePerformance=true -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar -Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.jar -Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test [Working Directory: /srv/gump/public/workspace/tomcat-8.5.x] CLASSPATH: /usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-8.5.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-junit4.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-8.5.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/servlet-api.ja r:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/websocket-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/jaspic-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/catalina-storeconfig.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/bu ild/lib/tomcat-jni.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/tomcat-util.jar:/srv/gump/public/workspace/tomcat-8.5.x/output/build/lib/tomcat-util-scan.jar:/sr
svn commit: r1853917 - in /tomcat/tc8.5.x/trunk: java/org/apache/tomcat/util/net/Nio2Endpoint.java test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
Author: remm Date: Tue Feb 19 20:29:10 2019 New Revision: 1853917 URL: http://svn.apache.org/viewvc?rev=1853917&view=rev Log: Trigger a build. Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1853917&r1=1853916&r2=1853917&view=diff == --- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue Feb 19 20:29:10 2019 @@ -786,7 +786,6 @@ public class Nio2Endpoint extends Abstra synchronized (readCompletionHandler) { // Fill the read buffer as best we can. nRead = fillReadBuffer(block); - // Fill as much of the remaining byte array as possible with the // data that was just read if (nRead > 0) { @@ -796,7 +795,6 @@ public class Nio2Endpoint extends Abstra } else if (nRead == 0 && !block && ContainerThreadMarker.isContainerThread()) { readInterest = true; } - if (log.isDebugEnabled()) { log.debug("Socket: [" + this + "], Read: [" + nRead + "]"); } @@ -853,7 +851,6 @@ public class Nio2Endpoint extends Abstra if (log.isDebugEnabled()) { log.debug("Socket: [" + this + "], Read into buffer: [" + nRead + "]"); } - // Fill as much of the remaining byte array as possible with the // data that was just read if (nRead > 0) { Modified: tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1853917&r1=1853916&r2=1853917&view=diff == --- tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original) +++ tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Tue Feb 19 20:29:10 2019 @@ -48,10 +48,12 @@ import javax.servlet.http.HttpServletReq import javax.servlet.http.HttpServletResponse; import org.junit.Assert; +import org.junit.Assume; import org.junit.Ignore; import org.junit.Test; import org.apache.catalina.Context; +import org.apache.catalina.connector.Connector; import org.apache.catalina.startup.BytesStreamer; import org.apache.catalina.startup.TesterServlet; import org.apache.catalina.startup.Tomcat; @@ -93,6 +95,11 @@ public class TestNonBlockingAPI extends @Test public void testNonBlockingReadAsync() throws Exception { +Tomcat tomcat = getTomcatInstance(); +Connector connector = tomcat.getConnector(); +// Skip for NIO2 +Assume.assumeFalse("This test fails for NIO2", + /*connector.getProtocolHandlerClassName().contains("Nio2")*/false); doTestNonBlockingRead(false, true); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1853916 - /tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
Author: remm Date: Tue Feb 19 20:28:24 2019 New Revision: 1853916 URL: http://svn.apache.org/viewvc?rev=1853916&view=rev Log: Trigger a build Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1853916&r1=1853915&r2=1853916&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue Feb 19 20:28:24 2019 @@ -804,7 +804,6 @@ public class Nio2Endpoint extends Abstra synchronized (readCompletionHandler) { // Fill the read buffer as best we can. nRead = fillReadBuffer(block); - // Fill as much of the remaining byte array as possible with the // data that was just read if (nRead > 0) { @@ -814,7 +813,6 @@ public class Nio2Endpoint extends Abstra } else if (nRead == 0 && !block && ContainerThreadMarker.isContainerThread()) { readInterest = true; } - if (log.isDebugEnabled()) { log.debug("Socket: [" + this + "], Read: [" + nRead + "]"); } @@ -871,7 +869,6 @@ public class Nio2Endpoint extends Abstra if (log.isDebugEnabled()) { log.debug("Socket: [" + this + "], Read into buffer: [" + nRead + "]"); } - // Fill as much of the remaining byte array as possible with the // data that was just read if (nRead > 0) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in on tomcat-85-trunk
The Buildbot has detected a new failure on builder tomcat-85-trunk while building . Full details are available at: https://ci.apache.org/builders/tomcat-85-trunk/builds/1655 Buildbot URL: https://ci.apache.org/ Buildslave for this Build: silvanus_ubuntu Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-85-commit' triggered this build Build Source Stamp: [branch tomcat/tc8.5.x/trunk] 1853907 Blamelist: remm BUILD FAILED: failed compile_1 Sincerely, -The Buildbot - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1853907 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/coyote/ java/org/apache/tomcat/util/net/ test/org/apache/catalina/nonblocking/ webapps/docs/
Author: remm Date: Tue Feb 19 18:15:18 2019 New Revision: 1853907 URL: http://svn.apache.org/viewvc?rev=1853907&view=rev Log: 63182: Avoid extra notifications when using non container threads on read causing thread safety problems. Tentative fix, but the pattern is clearly causing a thread safety problem there. Also move ContainerMarkerThread, but leave the old location around for compatibility. Added: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java - copied unchanged from r1853886, tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java Modified: tomcat/tc8.5.x/trunk/ (props changed) tomcat/tc8.5.x/trunk/java/org/apache/coyote/ContainerThreadMarker.java tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java tomcat/tc8.5.x/trunk/test/org/apache/catalina/nonblocking/TesterAjpNonBlockingClient.java tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc8.5.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Feb 19 18:15:18 2019 @@ -1,2 +1,2 @@ /tomcat/tc8.0.x/trunk:1809644 -/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739492,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409 ,1741501,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744149,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745535,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747 404,1747506,1747536,1747924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1 756289,1756408-1756410,1756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611
mod_jk regression (?) with ipv6/ipv6 handling and prefer_ivp6 option not working
Hello tomcat developers, we noticed some wrong behavior (as i understand) it with the ipv6 support inside mod_jk when connecting to tomcat ajp connector. Sending to -dev list as i debugged mod_jk sources and i think the logic added for the prefer_ipv6 option does not work in one case, as i have prototype patch. I mentioned regression (?) in the subject as us updating from very old 1.2.37 mod_jk version (shipped in Ubuntu 14.04) are running into unpredictable behavior and the prefer_iv6 not working in our case. In short we see 2 behaviors both when defining host in JKWorkersFile as "localhost" 1.) In one machine type 100% of the cases mod_jk resolves the name to ::1 instead of 127.0.0.1 ignoring the prefer_ipv6 default value of 0 2.) In 2nd machine type we see unpredictable behavior with it sometimes resolving to ::1 and other times to 127.0.0.1 Details on our setup: - Ubuntu 18.04 LTS - tomcat 8.5.30-1ubuntu1.4 (From ubuntu 18.04 packaging) - OpenJDK 10 - Tocat conf/server.xml defining Connector as follow: That has effect of tomcat only listening on 127.0.0.1 and not on ::1 at the same time. That is maybe why issue is hidden for most users as having connector without address restriction make it listen on 8009 port on both ip's. - mod_jk version 1.2.43-1 (frmo ubuntu 18.04 packaging) with worker defined as: worker.ajp13_worker.port=8009 worker.ajp13_worker.host=localhost worker.ajp13_worker.type=ajp13 Looking at native/common/jk_connect.c jk_resolve method on how that prefer_ipv6 which in our case has no effect works seems like: - call to apr_sockaddr_info_get is expected to sometimes return multiple ip's (i.e. for hostname 'localhost') - logic inside jk_resolve implements the preference for ipv4/ipv6 selecting one of the values Debugging our our machine (1.( above) shows the apr call to always only return a single value ::1 already. So prefer_ipv6 has nothing to choose from. Checking apr header for that apr_sockaddr_info_get shows it being called with family=APR_UNSPEC * @param family The address family to use, or APR_UNSPEC if the system should * decide. However that function has extra optional flags argument (not used by mod_jk) to submit ipv4/ipv6 preference to mod_jk: * @param flags Special processing flags: * * APR_IPV4_ADDR_OK first query for IPv4 addresses; only look * for IPv6 addresses if the first query failed; * only valid if family is APR_UNSPEC and hostname * isn't NULL; mutually exclusive with * APR_IPV6_ADDR_OK * APR_IPV6_ADDR_OK first query for IPv6 addresses; only look * for IPv4 addresses if the first query failed; * only valid if family is APR_UNSPEC and hostname * isn't NULL and APR_HAVE_IPV6; mutually exclusive * with APR_IPV4_ADDR_OK * Small patch to pass down prefer_ipv6 value to that flags argument fixes the problem for me as then the apr-call returns still single ip-address entry but matching the preference. As values of prefer_ivp6. Small code needed to translate values to match apr expectation. if (prefer_ipv6) { flags = APR_IPV6_ADDR_OK; } else { flags = APR_IPV4_ADDR_OK; } That is my first dive to mod_jk/apr sourcecode. So while that small change seems to fix our wrong behavior not sure about side-effects. I can produce a clean patch if what i found out so far makes sense to you. Open questions: - When exactly that api-call returns ipv4/ipv6 values - For that case 1.) known difference between working/failing environment is /etc/hosts content working when only single entry with 127.0.0.1 for 'localhost' Failing with 2 entries for the name for both 127.0.0.1 and also ::1 - However that case 2: Randomly failing has is happening inside same system without and config changes but by restarting Apache several times being enough to trigger it. For any missing/unclear details please just let me know. I am also around in #tomcat for any direct questions. That case 1. ) 100% failing is custom Ubuntu installer CD which shows the issue when used i.e. inside Virtualbox. I can share ISO-image or image where issue can be seen if that is helpful. Thanks, Stefan Huehner - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: InsecureHttp Headers
On February 19, 2019 12:54:49 PM UTC, Nitin Kadam wrote: >Hello Team > >How we can add Content Security Headers and HSTS header in Tomcat >Apache >7.0.79 installed on Windows 2012 R2 server That is a question for the users list, not the dev list. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1853886 - in /tomcat/trunk: java/org/apache/coyote/ java/org/apache/tomcat/util/net/ test/org/apache/catalina/nonblocking/ webapps/docs/
Author: remm Date: Tue Feb 19 14:58:00 2019 New Revision: 1853886 URL: http://svn.apache.org/viewvc?rev=1853886&view=rev Log: 63182: Avoid extra notifications when using non container threads on read causing thread safety problems. Tentative fix, but the pattern is clearly causing a thread safety problem there. Also move ContainerMarkerThread, but leave the old location around for compatibility. Added: tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java - copied, changed from r1853866, tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java Modified: tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java?rev=1853886&r1=1853885&r2=1853886&view=diff == --- tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java (original) +++ tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java Tue Feb 19 14:58:00 2019 @@ -24,22 +24,15 @@ package org.apache.coyote; */ public class ContainerThreadMarker { -private static final ThreadLocal marker = new ThreadLocal<>(); - public static boolean isContainerThread() { -Boolean flag = marker.get(); -if (flag == null) { -return false; -} else { -return flag.booleanValue(); -} +return org.apache.tomcat.util.net.ContainerThreadMarker.isContainerThread(); } public static void set() { -marker.set(Boolean.TRUE); +org.apache.tomcat.util.net.ContainerThreadMarker.set(); } public static void clear() { -marker.set(Boolean.FALSE); +org.apache.tomcat.util.net.ContainerThreadMarker.clear(); } } Copied: tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java (from r1853866, tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java?p2=tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java&p1=tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java&r1=1853866&r2=1853886&rev=1853886&view=diff == --- tomcat/trunk/java/org/apache/coyote/ContainerThreadMarker.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/ContainerThreadMarker.java Tue Feb 19 14:58:00 2019 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.coyote; +package org.apache.tomcat.util.net; /** * Used to mark threads that have been allocated by the container to process Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1853886&r1=1853885&r2=1853886&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Tue Feb 19 14:58:00 2019 @@ -811,7 +811,7 @@ public class Nio2Endpoint extends Abstra socketBufferHandler.configureReadBufferForRead(); nRead = Math.min(nRead, len); socketBufferHandler.getReadBuffer().get(b, off, nRead); -} else if (nRead == 0 && !block) { +} else if (nRead == 0 && !block && ContainerThreadMarker.isContainerThread()) { readInterest = true; } @@ -876,7 +876,7 @@ public class Nio2Endpoint extends Abstra // data that was just read if (nRead > 0) { nRead = populateReadBuffer(to); -} else if (nRead == 0 && !block) { +} else if (nRead == 0 && !block && ContainerThreadMarker.isContainerThread()) { readInterest = true; } } Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1853886&r1=1853885&r2=1853886&view=diff == --- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original) +++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Tue Feb 19 14:58:00 2019 @@ -48,12 +48,10 @@ im
InsecureHttp Headers
Hello Team How we can add Content Security Headers and HSTS header in Tomcat Apache 7.0.79 installed on Windows 2012 R2 server -- Regards nitin
Access to thread pool task queue size via JMX
Hi, Currently Tomcat's thread pool implementation, which is under org.apache.tomcat.util.net.AbstractEndpoint, does not expose task queue size via JMX, while in org.apache.catalina.core.StandardThreadExecutor it can be accessed via JMX. The background is that I am involved with a project to auto scale web application and the size of task queue is helpful to make the decision. Therefore I propose to expose it via JMX. The implementation could be adding a simple method to org.apache.tomcat.util.net.AbstractEndpoint: public int getThreadPoolTaskQueueSize() { if (executor!=null) { if (executor instanceof ThreadPoolExecutor) { return ((ThreadPoolExecutor)executor).getQueue().size(); } else if (executor instanceof StandardThreadExecutor) { return ((StandardThreadExecutor)executor).getQueueSize(); } else { return -1; } } else { return -2; } } Another issue is that the default implementation of task queue is hard coded to be infinite, I think it is better to make it configurable, just like what StandardThreadExecutor does. But I think it worth discussion in another thread. Comments welcome. -- Best Regards! Huxing - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org