Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9482

ejb remote client hangs on undertow default worker pool exhaustion

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 10.1.0.Final
    • Remoting
    • None
    • Hide

      >Steps to reproduce

      • get 2 jboss instances: destination and client
      • setup ejb-remoting according to article "https://docs.jboss.org/author/display/WFLY10/EJB+invocations+from+a+remote+server+instance"
      • install to destination .ear with remotely accessible slsb, doing Thread.sleep(1000)
      • install to client .war with servlet calling method
      • make lot (>300) of concurrent get request to servlet using some bench tool (e.g. https://github.com/wg/wrk)

      >Actual results
      Servlet hang, all threads waiting for responses like this:

      "default task-40" #331 prio=5 os_prio=0 tid=0x00007f2d7c256800 nid=0x1bf6 in Object.wait() [0x00007f2ca2db2000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	at java.lang.Object.wait(Object.java:502)
      	at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:413)
      	locked <0x00000000d6253958> (a java.lang.Object)
      	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:204)
      	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183)
      	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146)
      	at com.sun.proxy.$Proxy253.process(Unknown Source)
      

      > Expected result:
      No hang

      > Additional info

      AFAICU ejb-client need spare thread in default xnio worker to process responses. all threads occupied by processing of servlet requests. No thread to make following

      EJBClientInvocationContext.resultReady(EJBReceiverInvocationContext$ResultProducer) line: 313	
      EJBReceiverInvocationContext.resultReady(EJBReceiverInvocationContext$ResultProducer) line: 73	
      ChannelAssociation.resultReady(short, EJBReceiverInvocationContext$ResultProducer) line: 241	
      MethodInvocationResponseHandler.processMessage(InputStream) line: 82	
      ChannelAssociation.processResponse(InputStream) line: 395	
      ChannelAssociation$ResponseReceiver.handleMessage(Channel, MessageInputStream) line: 507	
      RemoteConnectionChannel$5.run() line: 456	
      EndpointImpl$TrackingExecutor$1.run() line: 731	
      XnioWorker$TaskPool(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1142	
      ThreadPoolExecutor$Worker.run() line: 617	
      Thread.run() line: 745
      
      Show
      >Steps to reproduce get 2 jboss instances: destination and client setup ejb-remoting according to article "https://docs.jboss.org/author/display/WFLY10/EJB+invocations+from+a+remote+server+instance" install to destination .ear with remotely accessible slsb, doing Thread.sleep(1000) install to client .war with servlet calling method make lot (>300) of concurrent get request to servlet using some bench tool (e.g. https://github.com/wg/wrk ) >Actual results Servlet hang, all threads waiting for responses like this: "default task-40" #331 prio=5 os_prio=0 tid=0x00007f2d7c256800 nid=0x1bf6 in Object.wait() [0x00007f2ca2db2000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at org.jboss.ejb.client.EJBClientInvocationContext.awaitResponse(EJBClientInvocationContext.java:413) locked <0x00000000d6253958> (a java.lang.Object) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:204) at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:183) at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:146) at com.sun.proxy.$Proxy253.process(Unknown Source) > Expected result: No hang > Additional info AFAICU ejb-client need spare thread in default xnio worker to process responses. all threads occupied by processing of servlet requests. No thread to make following EJBClientInvocationContext.resultReady(EJBReceiverInvocationContext$ResultProducer) line: 313 EJBReceiverInvocationContext.resultReady(EJBReceiverInvocationContext$ResultProducer) line: 73 ChannelAssociation.resultReady(short, EJBReceiverInvocationContext$ResultProducer) line: 241 MethodInvocationResponseHandler.processMessage(InputStream) line: 82 ChannelAssociation.processResponse(InputStream) line: 395 ChannelAssociation$ResponseReceiver.handleMessage(Channel, MessageInputStream) line: 507 RemoteConnectionChannel$5.run() line: 456 EndpointImpl$TrackingExecutor$1.run() line: 731 XnioWorker$TaskPool(ThreadPoolExecutor).runWorker(ThreadPoolExecutor$Worker) line: 1142 ThreadPoolExecutor$Worker.run() line: 617 Thread.run() line: 745

            flaviarnn Flavia Rainone
            ivagulin Igor Vagulin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: