Bug 1410869 - [GSS](6.4.z) AsyncContext.complete() blocks sometimes as long as the DEFAULT_CONNECTION_TIMEOUT
Summary: [GSS](6.4.z) AsyncContext.complete() blocks sometimes as long as the DEFAULT_...
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.4.11,6.4.12
Hardware: Unspecified
OS: Unspecified
Target Milestone: CR1
: EAP 6.4.15
Assignee: Fedor Gavrilov
QA Contact: Radim Hatlapatka
Depends On:
Blocks: 1423507 eap6415-payload 1427196
TreeView+ depends on / blocked
Reported: 2017-01-06 16:23 UTC by Aaron Ogburn
Modified: 2020-06-11 13:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-05-19 08:06:36 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2850191 0 None None None 2017-02-08 16:46:37 UTC

Description Aaron Ogburn 2017-01-06 16:23:45 UTC
Description of problem:

For a small number of asynchronous http requests, invoking AsyncContext.complete() blocks the current thread, sometimes for as long as the timeout set in "org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT". For instance:

"pool-5-thread-3" prio=6 tid=0x000000000b3f9800 nid=0x11f0 waiting for monitor entry [0x000000000e5bf000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1149)
        - waiting to lock <0x00000000eb88a8b8> (a org.apache.coyote.http11.Http11Processor)
        at org.apache.coyote.Request.action(Request.java:360)
        at org.apache.catalina.connector.Request.wakeup(Request.java:2601)
        at org.apache.catalina.connector.Request$AsyncContextImpl.complete(Request.java:3419)
        at com.cgi.dsp.async.servlet.AsyncReadServlet$1.run(AsyncReadServlet.java:69)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
        - <0x00000000eda09618> (a java.util.concurrent.ThreadPoolExecutor$Worker)

The thread which holds the Http11Processor lock 0x00000000eb88a8b8,

"http-" daemon prio=6 tid=0x000000000b3f3800 nid=0x22b0 runnable [0x000000000df3f000]
   java.lang.Thread.State: RUNNABLE
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(Unknown Source)
        at java.net.SocketInputStream.read(Unknown Source)
        at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:713)
        at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:351)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:819)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656)
        - locked <0x00000000eb88a8b8> (a org.apache.coyote.http11.Http11Processor)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:921)
        at java.lang.Thread.run(Unknown Source)

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

EAP 6.4.11 & 6.4.12

Actual results:

AsyncContext.complete() may block for long periods due to pending Http11Processor.process calls on the same processor.

Expected results:

AsyncContext.complete() is not blocked by InternalInputBuffer.parseRequestLine.

Additional info:

This is introduced by the synchronization added to fix bz-1370182.  The issue is avoided when using the NIO connector.

Comment 25 Michael Cada 2017-02-23 11:23:07 UTC
Failed QA.

r2682 did not make it to JBossWeb 7.5.21.Final-redhat-1

Comment 29 Michael Cada 2017-04-26 11:43:44 UTC
Verified with EAP 6.4.15.CP.CR2

Comment 30 Petr Penicka 2017-05-19 08:06:36 UTC
Released on May 18 as part of EAP 6.4.15.

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