synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Senduran (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SYNAPSE-1015) Message building fails at high concurrency when the outsequence is content aware
Date Mon, 23 May 2016 18:42:12 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15296852#comment-15296852
] 

Senduran commented on SYNAPSE-1015:
-----------------------------------

Reason for this is, Pipe class has two variables(inBufferInputMode, outBufferInputMode) which
are corresponding to its buffer and outputBuffer's read/write flag. 
And setting the read / write mode is happening by passing the AtomicBoolean and buffer. Even
though we have used compare and set. at high concurrency this does not behave as expected.
Making the buffer self contained with its corresponding read / write flag eliminates this
issue. 

As a fix I have wrapped the ByteBuffer with an atomic boolean (called ControlledByteBuffer),
and using it instead of bytebuffer, setting to read mode / write mode  logic is written in
controlledByteBuffer. 

> Message building fails at high concurrency when the outsequence is content aware 
> ---------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-1015
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-1015
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core, Transports
>    Affects Versions: 2.1
>            Reporter: Senduran
>            Assignee: Hiranya Jayathilaka
>
> When invoke the following proxy at a concurrency (around 200) 
> {code:xml}
> <proxy xmlns="http://ws.apache.org/ns/synapse"
>        name="HelloProxy"
>        transports="https,http"
>        statistics="disable"
>        trace="disable"
>        startOnLoad="true">
>    <target>
>       <inSequence>
>          <send>
>             <endpoint>
>                <address uri="http://localhost:9765/services/HelloService/"/>
>             </endpoint>
>          </send>
>       </inSequence>
>       <outSequence>
>          <enrich>
>             <source type="inline" clone="true">
>                <sss xmlns="">a</sss>
>             </source>
>             <target type="property" property="bar"/>
>          </enrich>
>          <send/>
>       </outSequence>
>    </target>
>    <publishWSDL uri="http://localhost:9765/services/HelloService?wsdl"/>
>    <description/>
> </proxy>
> {code}
> Following exception occurs after a while,
> {code}
> 2016-05-23 23:51:09,455 [-] [PassThroughMessageProcessor-30] ERROR RelayUtils Error while
building PassThrough stream
> org.apache.axiom.om.DeferredParsingException: com.ctc.wstx.exc.WstxUnexpectedCharException:
Illegal character (NULL, unicode 0) encountered: not valid in any content
>  at [row,col {unknown-source}]: [1,1]
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:184)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj:96)
> 	at org.apache.axiom.om.impl.llom.OMDocumentImpl.buildNext(OMDocumentImpl.java:1)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$coreGetFirstChild(CoreParentNodeSupport.aj:113)
> 	at org.apache.axiom.om.impl.llom.OMDocumentImpl.coreGetFirstChild(OMDocumentImpl.java:1)
> 	at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$coreGetFirstChild(CoreParentNodeSupport.aj)
> 	at org.apache.axiom.core.CoreDocumentSupport.ajc$interMethod$org_apache_axiom_core_CoreDocumentSupport$org_apache_axiom_core_CoreDocument$coreGetDocumentElement(CoreDocumentSupport.aj:42)
> 	at org.apache.axiom.om.impl.llom.OMDocumentImpl.coreGetDocumentElement(OMDocumentImpl.java:1)
> 	at org.apache.axiom.om.impl.common.AxiomDocumentSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomDocumentSupport$org_apache_axiom_om_impl_intf_AxiomDocument$getOMDocumentElement(AxiomDocumentSupport.aj:32)
> 	at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:1)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:557)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:553)
> 	at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:53)
> 	at org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:114)
> 	at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:146)
> 	at org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:86)
> 	at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:62)
> 	at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:114)
> 	at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:230)
> 	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:444)
> 	at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:221)
> 	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:169)
> 	at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:221)
> 	at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character (NULL, unicode
0) encountered: not valid in any content
>  at [row,col {unknown-source}]: [1,1]
> 	at com.ctc.wstx.sr.StreamScanner.constructNullCharException(StreamScanner.java:630)
> 	at com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:660)
> 	at com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:651)
> 	at com.ctc.wstx.sr.BasicStreamReader.readSpacePrimary(BasicStreamReader.java:4965)
> 	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2008)
> 	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1134)
> 	at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
> 	at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:34)
> 	at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:666)
> 	... 28 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message