Bug 1090103

Summary: NIO can improperly lead to request/response objects being used concurrently
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: WebAssignee: Rémy Maucherat <rmaucher>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hatlapatka <rhatlapa>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.2.2CC: dosoudil, jclere, kkhan
Target Milestone: ER3   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-28 15:40:48 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: 1091974    
Bug Blocks: 1093718, 1103891    

Description Aaron Ogburn 2014-04-22 15:16:25 UTC
Description of problem:

Using NIO with async servlets can improperly lead to a processor and its request/response objects being used by multiple threads to process different requests at once. The problem arises in Http11NioProtocol.event().

If two events occur on the same channel and execute this at the same time, it'll lead to this issue if they result in a SocketState other than LONG. When that happens, they both offer the same processor to recycledProcessors in the finally block. Later on, two different requests can then poll the same processor at once from reycledProcessors; a processor should only ever have one entry in recycledProcessors.

It looks like we need to synch the Http11NioProtocol.event() call or the NioEndpoint.ChannelProcessor.run().

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

7.2.2.Final

Comment 1 Jean-frederic Clere 2014-04-24 06:23:15 UTC
Fixed by r2405: requires a patch or a next jbossweb tag.

Comment 3 Rémy Maucherat 2014-04-25 13:45:05 UTC
Thanks :)

Comment 4 Jean-frederic Clere 2014-04-28 11:46:24 UTC
the new jbossweb tag (7.4.2.Final) also has the fix.

Comment 5 Kabir Khan 2014-04-28 21:12:06 UTC
Solved by component upgrade. Since the upgrade also fixes https://bugzilla.redhat.com/show_bug.cgi?id=1091849 which is a beta blocker, am resolving this one for ER3

Comment 6 Radim Hatlapatka 2014-05-06 09:58:40 UTC
Verified in EAP 6.3.0.ER3