Petals BC SOAP

NPE in provider mode under a high load

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 4.1
  • Fix Version/s: 4.2.0
  • Component/s: None
  • Security Level: Public
  • Description:
    Hide

    Under a high load, the following NPE occurs after an exhaustion of the service client pool:

    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,255 Service client pool is exhausted ('http://localhost:8088/EchoSOAPBinding, http://www.w3.org/2004/08/wsdl/in-out, {http://act.org/}echoString')
    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,258 Catch an exception on the WS invocation : Can't create or get an Axis service client from the pool
    javax.jbi.messaging.MessagingException: Can't create or get an Axis service client from the pool
    	at org.ow2.petals.binding.soap.SoapComponentContext.borrowServiceClient(SoapComponentContext.java:596)
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.call(SOAPCaller.java:258)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.invokeCaller(JBIListener.java:132)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.onJBIMessage(JBIListener.java:156)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:637)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:372)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:234)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
    	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1174)
    	at org.ow2.petals.binding.soap.SoapComponentContext.borrowServiceClient(SoapComponentContext.java:584)
    	... 10 more
    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,331 Catch an exception on the WS invocation : null
    java.lang.NullPointerException
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.updateClient(SOAPCaller.java:585)
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.call(SOAPCaller.java:265)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.invokeCaller(JBIListener.java:132)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.onJBIMessage(JBIListener.java:156)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:637)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:372)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:234)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)

    Reproducer, with a service proxy based on the BC SOAP

    • configure the BC SOAP with:
      <ns2:acceptor-pool-size>2</ns2:acceptor-pool-size>
      <ns2:processor-pool-size>2</ns2:processor-pool-size>
      <ns2:processor-max-pool-size>4</ns2:processor-max-pool-size>
    • using SOAPUI, send several requests concurrently (~15 requests should be sufficient to get the error)
    Show
    Under a high load, the following NPE occurs after an exhaustion of the service client pool:
    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,255 Service client pool is exhausted ('http://localhost:8088/EchoSOAPBinding, http://www.w3.org/2004/08/wsdl/in-out, {http://act.org/}echoString')
    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,258 Catch an exception on the WS invocation : Can't create or get an Axis service client from the pool
    javax.jbi.messaging.MessagingException: Can't create or get an Axis service client from the pool
    	at org.ow2.petals.binding.soap.SoapComponentContext.borrowServiceClient(SoapComponentContext.java:596)
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.call(SOAPCaller.java:258)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.invokeCaller(JBIListener.java:132)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.onJBIMessage(JBIListener.java:156)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:637)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:372)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:234)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
    	at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1174)
    	at org.ow2.petals.binding.soap.SoapComponentContext.borrowServiceClient(SoapComponentContext.java:584)
    	... 10 more
    [Petals.Container.Components.petals-bc-soap]-WARNING 2012-04-05 17:08:31,331 Catch an exception on the WS invocation : null
    java.lang.NullPointerException
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.updateClient(SOAPCaller.java:585)
    	at org.ow2.petals.binding.soap.listener.outgoing.SOAPCaller.call(SOAPCaller.java:265)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.invokeCaller(JBIListener.java:132)
    	at org.ow2.petals.binding.soap.listener.outgoing.JBIListener.onJBIMessage(JBIListener.java:156)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processInOutAsProvider(MessageExchangeProcessor.java:637)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.processAsProvider(MessageExchangeProcessor.java:372)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.process(MessageExchangeProcessor.java:234)
    	at org.ow2.petals.component.framework.process.MessageExchangeProcessor.run(MessageExchangeProcessor.java:177)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:662)
    Reproducer, with a service proxy based on the BC SOAP
    • configure the BC SOAP with:
      <ns2:acceptor-pool-size>2</ns2:acceptor-pool-size>
      <ns2:processor-pool-size>2</ns2:processor-pool-size>
      <ns2:processor-max-pool-size>4</ns2:processor-max-pool-size>
    • using SOAPUI, send several requests concurrently (~15 requests should be sufficient to get the error)
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Tue, 10 Apr 2012 - 15:44:59 +0200 - edited

According to the Javadoc of the library commons-pool:1.6 about the method borrowObject:

The behaviour of this method when the pool has been exhausted is not strictly specified (although it may be specified by implementations). Older versions of this method would return null to indicate exhaustion, newer versions are encouraged to throw a NoSuchElementException.

So, as we use commons-pool:1.5.5 , it seems to me that the problem occurs because the returned value null is not managed.

Show
Christophe DENEUX added a comment - Tue, 10 Apr 2012 - 15:44:59 +0200 - edited According to the Javadoc of the library commons-pool:1.6 about the method borrowObject:
The behaviour of this method when the pool has been exhausted is not strictly specified (although it may be specified by implementations). Older versions of this method would return null to indicate exhaustion, newer versions are encouraged to throw a NoSuchElementException.
So, as we use commons-pool:1.5.5 , it seems to me that the problem occurs because the returned value null is not managed.
Hide
Christophe DENEUX added a comment - Tue, 10 Apr 2012 - 16:13:38 +0200

Fixed in trunk

Show
Christophe DENEUX added a comment - Tue, 10 Apr 2012 - 16:13:38 +0200 Fixed in trunk

People

Dates

  • Created:
    Thu, 5 Apr 2012 - 17:37:22 +0200
    Updated:
    Tue, 10 Apr 2012 - 16:13:38 +0200
    Resolved:
    Tue, 10 Apr 2012 - 16:13:38 +0200