[Bug 60524] NPE in SlowQueryReport in tomcat-jdbc-7.0.68

2017-01-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60524

--- Comment #3 from WangZhengcong  ---
Created attachment 34584
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34584&action=edit
java version

hope to find the NPE

-- 
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 60524] NPE in SlowQueryReport in tomcat-jdbc-7.0.68

2017-01-04 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=60524

WangZhengcong  changed:

   What|Removed |Added

 Status|NEEDINFO|NEW

--- Comment #4 from WangZhengcong  ---
(In reply to Felix Schumacher from comment #2)
> Can you give a bit more details on your setup, like jdk/jre, cluster setup,
> is this reproducable, ...?
> 
> It is a bit of a mystery to me, that the npe is happening there, as we are
> copying the data from a ConcurrentHashMap, which explicitly does not allow
> null values. My first idea was to filter null values from the copied list,
> but it feels wrong without knowing the real issue.

Please see my reply, the java version shown below

-- 
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: r1777313 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 13:53:13 2017
New Revision: 1777313

URL: http://svn.apache.org/viewvc?rev=1777313&view=rev
Log:
Back-port cleanup to simplify following back-ports

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

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777313&r1=1777312&r2=1777313&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed 
Jan  4 13:53:13 2017
@@ -207,7 +207,10 @@ public class NioEndpoint extends Abstrac
  * Cache for SocketProcessor objects
  */
 protected ConcurrentLinkedQueue processorCache = new 
ConcurrentLinkedQueue() {
+private static final long serialVersionUID = 1L;
 protected AtomicInteger size = new AtomicInteger(0);
+
+@Override
 public boolean offer(SocketProcessor sc) {
 sc.reset(null,null);
 boolean offer = 
socketProperties.getProcessorCache()==-1?true:size.get() keyCache = new 
ConcurrentLinkedQueue() {
+private static final long serialVersionUID = 1L;
 protected AtomicInteger size = new AtomicInteger(0);
+
+@Override
 public boolean offer(KeyAttachment ka) {
 ka.reset();
 boolean offer = 
socketProperties.getKeyCache()==-1?true:size.get() eventCache = new 
ConcurrentLinkedQueue() {
+private static final long serialVersionUID = 1L;
 protected AtomicInteger size = new AtomicInteger(0);
+
+@Override
 public boolean offer(PollerEvent pe) {
 pe.reset();
 boolean offer = 
socketProperties.getEventCache()==-1?true:size.get() nioChannels = new 
ConcurrentLinkedQueue() {
+private static final long serialVersionUID = 1L;
 protected AtomicInteger size = new AtomicInteger(0);
 protected AtomicInteger bytes = new AtomicInteger(0);
+
+@Override
 public boolean offer(NioChannel socket) {
 boolean offer = 
socketProperties.getBufferPool()==-1?true:size.get() 0 ? 
selector.selectedKeys().iterator() : null;
+Iterator iterator = keyCount > 0 ? 
selector.selectedKeys().iterator() : null;
 // Walk through the collection of ready keys and dispatch
 // any active event.
 while (iterator != null && iterator.hasNext()) {
-SelectionKey sk = (SelectionKey) iterator.next();
+SelectionKey sk = iterator.next();
 KeyAttachment attachment = 
(KeyAttachment)sk.attachment();
 // Attachment may be null if another thread has called
 // cancelledKey()
@@ -1785,7 +1806,7 @@ public class NioEndpoint extends Abstrac
 sc = attachment.getChannel();
 sc.setSendFile(true);
 //ssl channel is slightly different
-WritableByteChannel wc =(WritableByteChannel) ((sc instanceof 
SecureNioChannel)?sc:sc.getIOChannel());
+WritableByteChannel wc = ((sc instanceof 
SecureNioChannel)?sc:sc.getIOChannel());
 
 //we still have data in the buffer
 if (sc.getOutboundRemaining()>0) {
@@ -1998,7 +2019,7 @@ public class NioEndpoint extends Abstrac
 public void awaitReadLatch(long timeout, TimeUnit unit) throws 
InterruptedException { awaitLatch(readLatch,timeout,unit);}
 public void awaitWriteLatch(long timeout, TimeUnit unit) throws 
InterruptedException { awaitLatch(writeLatch,timeout,unit);}
 
-public long getLastRegistered() { return lastRegistered; };
+public long getLastRegistered() { return lastRegistered; }
 public void setLastRegistered(long reg) { lastRegistered = reg; }
 
 public void setSendfileData(SendfileData sf) { this.sendfileData = sf;}
@@ -2430,6 +2451,7 @@ public class NioEndpoint extends Abstrac
 this.endpoint = ep;
 }
 
+@Override
 public boolean offer(Runnable o) {
 //we can't do any checks
 if (parent==null) return super.offer(o);



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



svn commit: r1777315 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 13:58:15 2017
New Revision: 1777315

URL: http://svn.apache.org/viewvc?rev=1777315&view=rev
Log:
Back-port reformatting to simplify following back-ports

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

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777315&r1=1777314&r2=1777315&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed 
Jan  4 13:58:15 2017
@@ -998,7 +998,10 @@ public class NioEndpoint extends Abstrac
 pollers[i].destroy();
 pollers[i] = null;
 }
-try { stopLatch.await(selectorTimeout+100,TimeUnit.MILLISECONDS); 
} catch (InterruptedException ignore ) {}
+try {
+stopLatch.await(selectorTimeout+100,TimeUnit.MILLISECONDS);
+} catch (InterruptedException ignore) {
+}
 }
 eventCache.clear();
 keyCache.clear();
@@ -1833,7 +1836,10 @@ public class NioEndpoint extends Abstrac
 log.debug("Send file complete for:"+sd.fileName);
 }
 attachment.setSendfileData(null);
-try {sd.fchannel.close();}catch(Exception ignore){}
+try {
+sd.fchannel.close();
+} catch (Exception ignore) {
+}
 // For calls from outside the Poller, the caller is
 // responsible for registering the socket for the
 // appropriate event(s) if sendfile completes.
@@ -1957,9 +1963,23 @@ public class NioEndpoint extends Abstrac
 error = false;
 lastRegistered = 0;
 sendfileData = null;
-if ( readLatch!=null ) try {for (int i=0; 
i<(int)readLatch.getCount();i++) readLatch.countDown();}catch (Exception 
ignore){}
+if (readLatch != null) {
+try {
+for (int i = 0; i < (int) readLatch.getCount(); i++) {
+readLatch.countDown();
+}
+} catch (Exception ignore){
+}
+}
 readLatch = null;
-if ( writeLatch!=null ) try {for (int i=0; 
i<(int)writeLatch.getCount();i++) writeLatch.countDown();}catch (Exception 
ignore){}
+if (writeLatch != null) {
+try {
+for (int i = 0; i < (int) writeLatch.getCount(); i++) {
+writeLatch.countDown();
+}
+} catch (Exception ignore){
+}
+}
 writeLatch = null;
 cometNotify = false;
 cometOps = SelectionKey.OP_READ;



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



svn commit: r1777316 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 14:01:16 2017
New Revision: 1777316

URL: http://svn.apache.org/viewvc?rev=1777316&view=rev
Log:
Back-port log message fixes to reduce diff to 7.0.x

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

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777316&r1=1777315&r2=1777316&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed 
Jan  4 14:01:16 2017
@@ -1833,7 +1833,7 @@ public class NioEndpoint extends Abstrac
 }
 if ( sd.length <= 0 && sc.getOutboundRemaining()<=0) {
 if (log.isDebugEnabled()) {
-log.debug("Send file complete for:"+sd.fileName);
+log.debug("Send file complete for: "+sd.fileName);
 }
 attachment.setSendfileData(null);
 try {
@@ -1859,7 +1859,7 @@ public class NioEndpoint extends Abstrac
 }
 } else {
 if (log.isDebugEnabled()) {
-log.debug("OP_WRITE for sendfile:" + sd.fileName);
+log.debug("OP_WRITE for sendfile: " + sd.fileName);
 }
 if (event) {
 add(attachment.getChannel(),SelectionKey.OP_WRITE);



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



svn commit: r1777319 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 14:05:06 2017
New Revision: 1777319

URL: http://svn.apache.org/viewvc?rev=1777319&view=rev
Log:
Back-port fix for IDE warning (also reduces diff to 7.0.x)

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

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?rev=1777319&r1=1777318&r2=1777319&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java Wed 
Jan  4 14:05:06 2017
@@ -1802,7 +1802,9 @@ public class NioEndpoint extends Abstrac
 cancelledKey(sk,SocketStatus.ERROR,false);
 return false;
 }
-sd.fchannel = new FileInputStream(f).getChannel();
+@SuppressWarnings("resource") // Closed when channel is 
closed
+FileInputStream fis = new FileInputStream(f);
+sd.fchannel = fis.getChannel();
 }
 
 //configure output channel



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



svn commit: r1777326 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/tomcat/util/net/NioChannel.java java/org/apache/tomcat/util/net/NioEndpoint.java java/org/apache/tomcat/util/net/SecureNioChannel.ja

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 14:55:53 2017
New Revision: 1777326

URL: http://svn.apache.org/viewvc?rev=1777326&view=rev
Log:
Backport some sendfile related clean-up from 7.0.x

Modified:
tomcat/tc6.0.x/trunk/   (props changed)
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SecureNioChannel.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc6.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan  4 14:55:53 2017
@@ -1,4 +1,4 @@
-/tomcat/tc7.0.x/trunk:1190476,1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1348992,1354866,1371298,1371302,1371620,1402110,1409014,1413553,1413557,1413563,1430083,1438415,1446641-1446660,1447013,1453106,1453119,1484919,1486877,1498342,1500065,1503852,1505844,1513151,1521040,1524796,1526470,1536524,1539176-1539177,1544469,1544473,1552805,1558894,1558917,1560812,1561368,1561382,1561386,1561552,1561561,1561636,1561641,1561643,1561737,1562748,1564317,1564417,1568922,1570163,1577328,1577464-1577465,1578814,1586659,1586897,1586960,1588199,1588997,1589740,1589851,1589997,1590019,1590028,1590337,1590492,1590651,1590838,1590845,1590848,1590912,1593262,1593288,1593371,1593835,1594230,1595174,1595366,1600956,1601333,1601856,1601909,1609079,1609606,1617364,1617374,1617433,1617457-1617458,1624249,1626579,1627420,1627469,1632586,1637686,1637711,1640675,1642045,1643515,1643540,1643572,1643585-1643586,1643642,1643647,1644019,1648817,1656301,1658815,1659523,1659564,1664001
 
,1664176,1665087,1666762,1666968,1666989,1668541,1668635,1669802,1676557,1681183,1681841,1681865,1681867,1685829,1693109,1694293,1694433,1694875,1696381,1701945,1710353,1712656,1713873,1714000,1714005,1714540,1715213,1716221,1716417,1717107,1717210,1717212,1720236,1720398,1720443,1720464,1721814,1721883,1722645,1722801,1723151,1724435,1724553,1724675,1724797,1724806,1725931,1726631,1726808,1726813,1726815,1726817,1726819,1726917,1726919,1726922-1726924,1727031,1727034,1727043,1727158,1727672,1727903,1728450,1729363,1731010,1731119,1731956,1731978,1732362,1732674-1732675,1733942,1734116,1734134,1734532,1737249,1737253,1737968,1738049,1738186,1739778,1741178,1741184,1741193,1741211,1741218,1741228,1741235,1742281,1743121,1743142,1743649,1744061,1744129,1744155,1744241,1744383,1744689,1745230,1746942,1746994,1749377,1750018,1750980,1751066,1754114,1754147,1754728,1754880,1754891,1754898,1754902,1756030,1756417,1756420,1756423,1756942,1757275,1757284,1757503,1758490,1758495,1759567,1761
 
631,1761748,1762772,1763236,1763415,1763580,1765593,1765598,1767374,1767675-1767676,1771211,1772177,1772262,1772270,1773421,1774139,1774252,1774321,1774323,1774325,1774345,1777016
+/tomcat/tc7.0.x/trunk:1190476,1224802,1243045,1298635,1304471,1311997,1312007,1331772,1333164,1333176,1348992,1354866,1371298,1371302,1371620,1402110,1409014,1413553,1413557,1413563,1430083,1438415,1446641-1446660,1447013,1453106,1453119,1484919,1486877,1498342,1500065,1503852,1505844,1513151,1521040,1524796,1526470,1536524,1539176-1539177,1544469,1544473,1552805,1558894,1558917,1560812,1561368,1561382,1561386,1561552,1561561,1561636,1561641,1561643,1561737,1562748,1564317,1564417,1568922,1570163,1577328,1577464-1577465,1578814,1586659,1586897,1586960,1588199,1588997,1589740,1589851,1589997,1590019,1590028,1590337,1590492,1590651,1590838,1590845,1590848,1590912,1593262,1593288,1593371,1593835,1594230,1595174,1595366,1600956,1601333,1601856,1601909,1609079,1609606,1617364,1617374,1617433,1617457-1617458,1624249,1626579,1627420,1627469,1632586,1637686,1637711,1640675,1642045,1643515,1643540,1643572,1643585-1643586,1643642,1643647,1644019,1648817,1656301,1658815,1659523,1659564,1664001
 
,1664176,1665087,1666762,1666968,1666989,1668541,1668635,1669802,1676557,1681183,1681841,1681865,1681867,1685829,1693109,1694293,1694433,1694875,1696381,1701945,1704482,1710353,1712656,1713873,1714000,1714005,1714540,1715213,1716221,1716417,1717107,1717210,1717212,1720236,1720398,1720443,1720464,1721814,1721883,1722645,1722801,1723151,1724435,1724553,1724675,1724797,1724806,1725931,1726631,1726808,1726813,1726815,1726817,1726819,1726917,1726919,1726922-1726924,1727031,1727034,1727043,1727158,1727672,1727903,1728450,1729363,1731010,1731119,1731956,1731978,1732362,1732674-1732675,1733942,1734116,1734134,1734532,1737249,1737253,1737968,1738049,1738186,1739778,1741178,1741184,1741193,1741211,1741218,1741228,1741235,1742281,1743121,1743142,1743649,1744061,1744129,1744155,1744241,1744383,1744689,1745230,1746942,1746994,1749377,1750018,1750980,1751066,1754114,1754147,1754728,1754880,1754891,1754898,1754902,1756030,1756417,1756420,1756423,1756942,1757275,1757284,1757503,1758490,1758495,1759
 
567,1761631,1761748,1762772,1763236,1763415,1763580,1765593,1765598,1767374,1767675-1767676,1771211,177

svn commit: r1777328 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 14:57:15 2017
New Revision: 1777328

URL: http://svn.apache.org/viewvc?rev=1777328&view=rev
Log:
Remove unused field

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java?rev=1777328&r1=1777327&r2=1777328&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioChannel.java Wed 
Jan  4 14:57:15 2017
@@ -48,8 +48,6 @@ public class NioChannel implements ByteC
 
 protected Poller poller;
 
-protected boolean sendFile = false;
-
 public NioChannel(SocketChannel channel, ApplicationBufferHandler 
bufHandler) throws IOException {
 this.sc = channel;
 this.bufHandler = bufHandler;
@@ -180,4 +178,4 @@ public class NioChannel implements ByteC
 public boolean flushOutbound() throws IOException {
 return false;
 }
-}
+}
\ No newline at end of file



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



svn commit: r1777342 - in /tomcat/tc6.0.x/trunk/java/org/apache: coyote/http11/Http11NioProcessor.java coyote/http11/Http11NioProtocol.java tomcat/util/net/NioEndpoint.java tomcat/util/net/SendfileSta

2017-01-04 Thread markt
Author: markt
Date: Wed Jan  4 16:51:21 2017
New Revision: 1777342

URL: http://svn.apache.org/viewvc?rev=1777342&view=rev
Log:
Align implementation of Poller.processSendFile() in 6.0.x with 7.0.x
Back-port additional changes required to support this.

Added:
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/SendfileState.java
  - copied unchanged from r1777213, 
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SendfileState.java
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1777342&r1=1777341&r2=1777342&view=diff
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java 
Wed Jan  4 16:51:21 2017
@@ -82,7 +82,7 @@ public class Http11NioProcessor implemen
 protected SSLSupport sslSupport;
 
 private int maxCookieCount = 200;
-
+
 /*
  * Tracks how many internal filters are in the filter library so they
  * are skipped when looking for pluggable filters.
@@ -162,6 +162,13 @@ public class Http11NioProcessor implemen
 
 
 /**
+ * Flag that indicates that send file processing is in progress and that 
the
+ * socket should not be returned to the poller (where a poller is used).
+ */
+protected boolean sendfileInProgress = false;
+
+
+/**
  * HTTP/1.1 flag.
  */
 protected boolean http11 = true;
@@ -796,7 +803,7 @@ public class Http11NioProcessor implemen
 error = false;
 keepAlive = true;
 comet = false;
-
+sendfileInProgress = false;
 
 int keepAliveLeft = maxKeepAliveRequests;
 long soTimeout = endpoint.getSoTimeout();
@@ -928,20 +935,11 @@ public class Http11NioProcessor implemen
 outputBuffer.nextRequest();
 }
 
-// Do sendfile as needed: add socket to sendfile and end
-if (sendfileData != null && !error) {
-KeyAttachment ka = (KeyAttachment)socket.getAttachment(false);
-ka.setSendfileData(sendfileData);
-sendfileData.keepAlive = keepAlive;
-SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
-//do the first write on this thread, might as well
-openSocket = 
socket.getPoller().processSendfile(key,ka,true,true);
-break;
-}
-
-
 rp.setStage(org.apache.coyote.Constants.STAGE_KEEPALIVE);
 
+if (breakKeepAliveLoop(socket)) {
+break;
+}
 }
 
 rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
@@ -953,15 +951,47 @@ public class Http11NioProcessor implemen
 } else {
 return SocketState.LONG;
 }
+} else if (sendfileInProgress) {
+return SocketState.SENDFILE;
 } else {
-if ( recycle ) recycle();
-//return (openSocket) ? (SocketState.OPEN) : SocketState.CLOSED;
+if (recycle) {
+recycle();
+}
 return (openSocket) ? (recycle?SocketState.OPEN:SocketState.LONG) 
: SocketState.CLOSED;
 }
 
 }
 
 
+private boolean breakKeepAliveLoop(NioChannel socket) {
+// Do sendfile as needed: add socket to sendfile and end
+if (sendfileData != null && !error) {
+KeyAttachment ka = (KeyAttachment)socket.getAttachment(false);
+ka.setSendfileData(sendfileData);
+sendfileData.keepAlive = keepAlive;
+SelectionKey key = 
socket.getIOChannel().keyFor(socket.getPoller().getSelector());
+//do the first write on this thread, might as well
+switch (socket.getPoller().processSendfile(key, ka, true)) {
+case DONE:
+// If sendfile is complete, no need to break keep-alive loop
+sendfileData = null;
+return false;
+case PENDING:
+sendfileInProgress = true;
+return true;
+case ERROR:
+// Write failed
+if (log.isDebugEnabled()) {
+log.debug(sm.getString("http11processor.sendfile.error"));
+}
+error = true;
+return true;
+}
+}
+return false;
+}
+
+
 public void endRequest() {
 
 // Finish the handling of the request
@@ -1261,7 +1291,7 @@ public class Http11NioProcessor implemen
 t

[GUMP@vmgump-vm3]: Project tomcat-tc8.0.x-validate (in module tomcat-8.0.x) failed

2017-01-04 Thread 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-tc8.0.x-validate has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 4 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc8.0.x-validate :  Tomcat 8.x, a web server implementing the Java 
Servlet 3.1,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-8.0.x/tomcat-tc8.0.x-validate/index.html

That said, some information snippets are provided here.

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



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-8.0.x/tomcat-tc8.0.x-validate/gump_work/build_tomcat-8.0.x_tomcat-tc8.0.x-validate.html
Work Name: build_tomcat-8.0.x_tomcat-tc8.0.x-validate (Type: Build)
Work ended in a state of : Failed
Elapsed: 17 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only org.apache.tools.ant.Main 
-Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-8.0.x/tomcat-build-libs 
-Dcheckstyle.jar=/srv/gump/public/workspace/checkstyle/target/checkstyle-7.5-SNAPSHOT.jar
 -Dexecute.validate=true validate 
[Working Directory: /srv/gump/public/workspace/tomcat-8.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/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/checkstyle/target/checkstyle-7.5-SNAPSHOT.jar:/srv/gump/packages/antlr/antlr-3.1.3.jar:/srv/gump/public/workspace/apache-commons/beanutils/dist/commons-beanutils-20170105.jar:/srv/gump/packages/commons-collections3/commons-collections-3.2.1.jar:/srv/gump/public/workspace/apache-commons/cli/target/commons-cli-1.4-SNAPSHOT.jar:/srv/gump/public/workspace/commons-lang-trunk/target/commons-lang3-3.6-SNAPSHOT.jar
 
:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-20170105.jar:/srv/gump/public/workspace/apache-commons/logging/target/commons-logging-api-20170105.jar:/srv/gump/public/workspace/google-guava/guava/target/guava-21.0-SNAPSHOT.jar
-
Buildfile: /srv/gump/public/workspace/tomcat-8.0.x/build.xml

build-prepare:
   [delete] Deleting directory 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/temp
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/build/temp

compile-prepare:

download-validate:

testexist:
 [echo] Testing  for 
/srv/gump/public/workspace/checkstyle/target/checkstyle-7.5-SNAPSHOT.jar

setproxy:

downloadfile:

validate:
[mkdir] Created dir: 
/srv/gump/public/workspace/tomcat-8.0.x/output/res/checkstyle
[checkstyle] Running Checkstyle 7.5-SNAPSHOT on 3015 files
[checkstyle] [ERROR] 
/srv/gump/public/workspace/tomcat-8.0.x/webapps/docs/changelog.xml:52: Line 
matches the illegal pattern '\s+$'. [RegexpSingleline]

BUILD FAILED
/srv/gump/public/workspace/tomcat-8.0.x/build.xml:550: Got 1 errors and 0 
warnings.

Total time: 17 seconds
-

To subscribe to this information via syndicated feeds:
- RSS: http://vmgump-vm3.apache.org/tomcat-8.0.x/tomcat-tc8.0.x-validate/rss.xml
- Atom: 
http://vmgump-vm3.apache.org/tomcat-8.0.x/tomcat-tc8.0.x-validate/atom.xml

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

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

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



svn commit: r1777425 - in /tomcat/tc8.0.x/trunk: ./ webapps/docs/changelog.xml

2017-01-04 Thread violetagg
Author: violetagg
Date: Thu Jan  5 07:22:10 2017
New Revision: 1777425

URL: http://svn.apache.org/viewvc?rev=1777425&view=rev
Log:
ws police

Modified:
tomcat/tc8.0.x/trunk/   (props changed)
tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan  5 07:22:10 2017
@@ -1,2 +1,2 @@
 
/tomcat/tc8.5.x/trunk:1735042,1737966,1743139-1743140,1744151,1747537,1747925,1748002,1754614,1754643,1762124,1762183,1762203,1763792,1772948,1777014
-/tomcat/trunk:1636524,1637156,1637176,1637188,1637331,1637684,1637695,1637890,1637892,1638720-1638725,1639653,1640010,1640083-1640084,1640088,1640275,1640322,1640347,1640361,1640365,1640403,1640410,1640652,1640655-1640658,1640688,1640700-1640883,1640903,1640976,1640978,1641000,1641026,1641038-1641039,1641051-1641052,1641058,1641064,1641300,1641369,1641374,1641380,1641486,1641634,1641656-1641692,1641704,1641707-1641718,1641720-1641722,1641735,1641981,1642233,1642280,1642554,1642564,1642595,1642606,1642668,1642679,1642697,1642699,1642766,1643002,1643045,1643054-1643055,1643066,1643121,1643128,1643206,1643209-1643210,1643216,1643249,1643270,1643283,1643309-1643310,1643323,1643365-1643366,1643370-1643371,1643465,1643474,1643536,1643570,1643634,1643649,1643651,1643654,1643675,1643731,1643733-1643734,1643761,1643766,1643814,1643937,1643963,1644017,1644169,1644201-1644203,1644321,1644323,1644516,1644523,1644529,1644535,1644730,1644768,1644784-1644785,1644790,1644793,1644815,1644884,1644886
 
,1644890,1644892,1644910,1644924,1644929-1644930,1644935,1644989,1645011,1645247,1645355,1645357-1645358,1645455,1645465,1645469,1645471,1645473,1645475,1645486-1645488,1645626,1645641,1645685,1645743,1645763,1645951-1645953,1645955,1645993,1646098-1646106,1646178,1646220,1646302,1646304,1646420,1646470-1646471,1646476,1646559,1646717-1646723,1646773,1647026,1647042,1647530,1647655,1648304,1648815,1648907,1649973,1650081,1650365,1651116,1651120,1651280,1651470,1652938,1652970,1653041,1653471,1653550,1653574,1653797,1653815-1653816,1653819,1653840,1653857,1653888,1653972,1654013,1654030,1654050,1654123,1654148,1654159,1654513,1654515,1654517,1654522,1654524,1654725,1654735,1654766,1654785,1654851-1654852,1654978,1655122-1655124,1655126-1655127,1655129-1655130,1655132-1655133,1655312,1655351,1655438,1655441,1655454,168,1656087,1656299,1656319,1656331,1656345,1656350,1656590,1656648-1656650,1656657,1657041,1657054,1657374,1657492,1657510,1657565,1657580,1657584,1657586,1657589,1657
 
592,1657607,1657609,1657682,1657907,1658207,1658734,1658781,1658790,1658799,1658802,1658804,1658833,1658840,1658966,1659043,1659053,1659059,1659174,1659184,1659188-1659189,1659216,1659263,1659293,1659304,1659306-1659307,1659382,1659384,1659428,1659471,1659486,1659505,1659516,1659521,1659524,1659559,1659562,1659803,1659806,1659814,1659833,1659862,1659905,1659919,1659948,1659967,1659983-1659984,1660060,1660074,1660077,1660133,1660168,1660331-1660332,1660353,1660358,1660924,1661386,1661770,1661867,1661972,1661990,1662200,1662308-1662309,1662548,1662614,1662696,1662736,1662985,1662988-1662989,1663264,1663277,1663298,1663534,1663562,1663676,1663715,1663754,1663768,1663772,1663781,1663893,1663995,1664143,1664163,1664174,1664301,1664317,1664347,1664657,1664659,1664710,1664863-1664864,1664866,1665085,1665292,1665559,1665653,1665661,1665672,1665694,1665697,1665736,1665779,1665976-1665977,1665980-1665981,1665985-1665986,1665989,1665998,1666004,1666008,1666013,1666017,1666024,1666116,1666386-1
 
666387,1666494,1666496,1666552,1666569,1666579,137,149,1666757,1666966,1666972,1666985,1666995,1666997,1667292,1667402,1667406,1667546,1667615,1667630,1667636,1667688,1667764,1667871,1668026,1668135,1668193,1668593,1668596,1668630,1668639,1668843,1669353,1669370,1669451,1669800,1669838,1669876,1669882,1670394,1670433,1670591,1670598-1670600,1670610,1670631,1670719,1670724,1670726,1670730,1670940,1671112,1672272,1672284,1673754,1674294,1675461,1675486,1675594,1675830,1676231,1676250-1676251,1676364,1676381,1676393,1676479,1676525,1676552,1676615,1676630,1676634,1676721,1676926,1676943,1677140,1677802,1678011,1678162,1678174,1678339,1678426-1678427,1678694,1678701,1679534,1679708,1679710,1679716,1680034,1680246,1681056,1681123,1681138,1681280,1681283,1681286,1681450,1681697,1681699,1681701,1681729,1681770,1681779,1681793,1681807,1681837-1681838,1681854,1681862,1681958,1682028,1682033,1682311,1682315,1682317,1682320,1682324,1682330,1682842,1684172,1684366,1684383,1684526-168452
 
7,1684549-1684550,1685556,1685591,1685739,1685744,1685772,1685816,1685826,1685891,1687242,1687261,1687268,1687340,1687544,1687551,1688563,1688841,1688878,165,1688896,1688901,1689345-1689346,1689357,1689656,1689675-1689677,1689679,1689687,1689825,1689856,1689918,1690011,1690021,1690054,1690080,1690209,1691134,1691487,1691813,1692744-1692747,1692849,1692894,1692896,1693088,1693105,1693429,1