Bug 1090103 - NIO can improperly lead to request/response objects being used concurrently
Summary: NIO can improperly lead to request/response objects being used concurrently
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER3
: EAP 6.3.0
Assignee: Rémy Maucherat
QA Contact: Radim Hatlapatka
Russell Dickenson
URL:
Whiteboard:
Depends On: 1091974
Blocks: 1093718 1103891
TreeView+ depends on / blocked
 
Reported: 2014-04-22 15:16 UTC by Aaron Ogburn
Modified: 2018-12-05 18:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:40:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBWEB-297 0 Major Open NIO can improperly lead to request/response objects being used concurrently 2018-12-30 15:59:41 UTC

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


Note You need to log in before you can comment on or make changes to this bug.