Bug 1426264

Summary: [GSS](6.4.z) o.a.c.http11.InternalNioOutputBuffer.sendAck may improperly loop in the event of an exception
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: WebAssignee: Petr Jurak <pjurak>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hatlapatka <rhatlapa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.4.13CC: bmaxwell, mcada, msochure, pjurak, rmaucher, rnetuka
Target Milestone: CR1   
Target Release: EAP 6.4.15   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-19 08:04:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1419353, 1426611, 1427196    
Attachments:
Description Flags
bz1426264reproducer.zip none

Description Aaron Ogburn 2017-02-23 14:59:28 UTC
Description of problem:

o.a.c.http11.InternalNioOutputBuffer.sendAck can cause a high CPU loop:

   sun.nio.ch.WindowsAsynchronousSocketChannelImpl.write0 line: not available [native method]
   sun.nio.ch.WindowsAsynchronousSocketChannelImpl.access$900 line: 43 
   sun.nio.ch.WindowsAsynchronousSocketChannelImpl$WriteTask.run line: 778 
   sun.nio.ch.WindowsAsynchronousSocketChannelImpl.implWrite line: 916 
   sun.nio.ch.AsynchronousSocketChannelImpl.write line: 382 
   sun.nio.ch.AsynchronousSocketChannelImpl.write line: 387 
   org.apache.tomcat.util.net.NioChannel.writeBytes line: 919 
   org.apache.coyote.http11.InternalNioOutputBuffer.blockingWrite line: 314 
   org.apache.coyote.http11.InternalNioOutputBuffer.sendAck line: 352


It appears NioChannel.writeBytes is raising an exception. InternalNioOutputBuffer.blockingWrite swallows that exception and returns 0, and the sendAck loop continues endlessly then over those repeated actions.


Version-Release number of selected component (if applicable):

7.5.20


How reproducible:


Steps to Reproduce:
1.Hit exception in NioChannel.writeBytes during InternalNioOutputBuffer.sendAc

Will see if there's a way to force that more deterministically

Actual results:


InternalNioOutputBuffer.sendAck hits high CPU loops in the event of an exception from NioChannel.writeBytes

Expected results:

InternalNioOutputBuffer.sendAck does not hit high CPU loop


Additional info:

Comment 2 Aaron Ogburn 2017-02-24 13:56:35 UTC
Created attachment 1257229 [details]
bz1426264reproducer.zip

Comment 3 Michael Cada 2017-04-18 09:08:21 UTC
Verified with EAP 6.4.15.CP.CR2

Comment 4 Petr Penicka 2017-05-19 08:04:41 UTC
Released on May 18 as part of EAP 6.4.15.