jira-importer opened a new issue, #1142:
URL: https://github.com/apache/httpcomponents-core/issues/1142

   **[Tom 
McSorley](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=tjmcsorley)**
 opened 
**[HTTPCORE-155](https://issues.apache.org/jira/browse/HTTPCORE-155?redirect=false)**
 and commented
   
   I'm issuing a second HTTP Request on a connection that has very recently 
returned a null for the submitRequest() call...  this 2nd request is being 
issued approximately 500ms after the submitRequest() null is returned... so the 
connection has just been established, an HTTP Request/Response-200 cycle has 
completed just prior to this 2nd request being issued.  I'm seeing unusually 
long delays in the requestOutput() call (verified by surrounding timing 
prints)... that can range anywhere from a few milliseconds on up to 60 
seconds...  It eventually unwinds, and then the submitRequest() is called... 
this 2nd request is dispatched and works fine... but, it is delayed 
considerably...  Is this a known issue and is there a possible work-around?
   
   Here's the JVM related thread information:
   
   The thread being delayed and stuck in the requestOutput() call for a long 
time (mostly longer than 5 seconds):
   3XMTHREADINFO      "pool-2-thread-5" TID:0x2AEECE00, j9thread_t:0x2A7189A8, 
state:B, prio=5
   3XMTHREADINFO1            (native thread ID:0x1B44, native priority:0x5, 
native policy:UNKNOWN)
   4XESTACKTRACE          at 
sun/nio/ch/SelectionKeyImpl.interestOps(SelectionKeyImpl.java:60)
   4XESTACKTRACE          at 
org/apache/http/impl/nio/reactor/IOSessionImpl.setEvent(IOSessionImpl.java:113)
   4XESTACKTRACE          at 
org/apache/http/impl/nio/NHttpConnectionBase.requestOutput(NHttpConnectionBase.java:158)
   .... (non important stack information removed)
   4XESTACKTRACE          at 
java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
   4XESTACKTRACE          at java/lang/Thread.run(Thread.java:735)
   
   Here's the monitor that this thread is blocked and waiting on:
   2LKMONINUSE      sys_mon_t:0x2A708AF8 infl_mon_t: 0x2A708B30:
   3LKMONOBJECT       sun/nio/ch/Util$1@00B09208/00B09214: Flat locked by "I/O 
dispatcher 7" (0x2A208E00), entry count 1
   3LKWAITERQ            Waiting to enter:
   3LKWAITER                "pool-2-thread-5" (0x2AEECE00)
   
   And here's the thread that currently has this monitor locked:
   3XMTHREADINFO      "I/O dispatcher 7" TID:0x2A208E00, j9thread_t:0x2A6EC73C, 
state:R, prio=5
   3XMTHREADINFO1            (native thread ID:0x830, native priority:0x5, 
native policy:UNKNOWN)
   4XESTACKTRACE          at 
sun/nio/ch/WindowsSelectorImpl$SubSelector.poll0(Native Method)
   4XESTACKTRACE          at 
sun/nio/ch/WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:308(Compiled
 Code))
   4XESTACKTRACE          at 
sun/nio/ch/WindowsSelectorImpl$SubSelector.access$500(WindowsSelectorImpl.java(Compiled
 Code))
   4XESTACKTRACE          at 
sun/nio/ch/WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:162(Compiled 
Code))
   4XESTACKTRACE          at 
sun/nio/ch/SelectorImpl.lockAndDoSelect(SelectorImpl.java:69(Compiled Code))
   4XESTACKTRACE          at 
sun/nio/ch/SelectorImpl.select(SelectorImpl.java:80(Compiled Code))
   4XESTACKTRACE          at 
org/apache/http/impl/nio/reactor/AbstractIOReactor.execute(AbstractIOReactor.java:121)
   4XESTACKTRACE          at 
org/apache/http/impl/nio/reactor/BaseIOReactor.execute(BaseIOReactor.java:70)
   4XESTACKTRACE          at 
org/apache/http/impl/nio/reactor/AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:318)
   4XESTACKTRACE          at java/lang/Thread.run(Thread.java:735)
   
   I should also note that we're attempting to use 1000 client instances on 
this single system... each with potentially 2 active connections 
simultaneously... there is also virtually no CPU load (i.e. less then 5%) on 
this system...
   
   
   ---
   
   **Affects:** 4.0-beta1
   
   **Attachments:**
   - 
[AbstractIOReactor.diff](https://issues.apache.org/jira/secure/attachment/12395422/AbstractIOReactor.diff)
 (_10.51 kB_)
   - 
[AbstractIOReactor.java](https://issues.apache.org/jira/secure/attachment/12395379/AbstractIOReactor.java)
 (_15.00 kB_)
   - 
[brush_up_1.09-03-20](https://issues.apache.org/jira/secure/attachment/12402653/brush_up_1.09-03-20)
 (_8.82 kB_)
   - 
[HTTPCORE-155.patch](https://issues.apache.org/jira/secure/attachment/12402500/HTTPCORE-155.patch)
 (_19.32 kB_)
   - 
[IOSessionImpl.diff](https://issues.apache.org/jira/secure/attachment/12395424/IOSessionImpl.diff)
 (_5.80 kB_)
   - 
[IOSessionImpl.java](https://issues.apache.org/jira/secure/attachment/12395381/IOSessionImpl.java)
 (_8.59 kB_)
   - 
[javacore.20081203.153723.32300.0001.txt](https://issues.apache.org/jira/secure/attachment/12395282/javacore.20081203.153723.32300.0001.txt)
 (_349.93 kB_)
   - 
[myoutput.txt](https://issues.apache.org/jira/secure/attachment/12396902/myoutput.txt)
 (_4.85 kB_)
   - 
[patch.08-12-17.tar.gz](https://issues.apache.org/jira/secure/attachment/12396285/patch.08-12-17.tar.gz)
 (_6.87 kB_)
   - 
[patch.08-12-18.tar.gz](https://issues.apache.org/jira/secure/attachment/12396405/patch.08-12-18.tar.gz)
 (_7.24 kB_)
   - 
[patch.08-12-22.tar.gz](https://issues.apache.org/jira/secure/attachment/12396581/patch.08-12-22.tar.gz)
 (_7.24 kB_)
   - 
[patch.08-12-30.tar.gz](https://issues.apache.org/jira/secure/attachment/12396930/patch.08-12-30.tar.gz)
 (_7.35 kB_)
   - 
[patch.09-03-18.tar.gz](https://issues.apache.org/jira/secure/attachment/12402492/patch.09-03-18.tar.gz)
 (_15.56 kB_)
   - 
[summary_patch.09-03-18](https://issues.apache.org/jira/secure/attachment/12402502/summary_patch.09-03-18)
 (_15.14 kB_)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to