Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
10.10.1.1
-
None
-
High Value Fix, Known fix
-
Performance, Seen in production
Description
NetworkServerControlImpl.ensureDataInBuffer missing check for return -1 (EOF) from 'clientIs.read'. When read returns -1 thread consumes 100% CPU. Method NetworkServerControlImpl.fillReplyBuffer correctly throw exception.
Fix: add two lines:
private void ensureDataInBuffer(int minimumBytesNeeded) throws Exception
{
// make sure the buffer is large enough
while ((replyBufferCount - replyBufferPos) < minimumBytesNeeded)
{
try
catch (IOException e)
{ clientSocketError(e); } }
}
StackTrace:
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.read(Unknown Source:-1)
at org.apache.derby.impl.drda.NetworkServerControlImpl.ensureDataInBuffer(Unknown Source:-1)
at org.apache.derby.impl.drda.NetworkServerControlImpl.readLDString(Unknown Source:-1)
at org.apache.derby.impl.drda.NetworkServerControlImpl.readStringReply(Unknown Source:-1)
at org.apache.derby.impl.drda.NetworkServerControlImpl.runtimeInfo(Unknown Source:-1)
at org.apache.derby.drda.NetworkServerControl.getRuntimeInfo(Unknown Source:-1)
at com.crcdata.dbadmin.server.DerbyEngine.getRuntimeInfo(DerbyEngine.java:134)
at com.crcdata.dbadmin.server.DerbyEngine$DerbyServerMonitorTask.run(DerbyEngine.java:305)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source:-1)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source:-1)
at java.util.concurrent.FutureTask.run(Unknown Source:-1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source:-1)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source:-1)
at java.lang.Thread.run(Unknown Source:-1)
Attachments
Attachments
Issue Links
- is related to
-
DERBY-6456 Infinite loop in NetworkServerControlImpl when reply >= 32k
- Closed