[
https://issues.apache.org/activemq/browse/SM-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43889#action_43889
]
Krzysztof Sobolewski commented on SM-512:
-----------------------------------------
I don't really agree there is no real bug here, because it violates the
principle of least surprise. I tripped on the same problem and spent about two
days of investigation before I found the cause and reached this report. I think
that a deadlock resulting from a compliant use is a bug no matter what.
But I agree that it might be tricky to fix. How about, for example, setting the
exchage state to SYNC_STATE_SYNC_SENT before returning if the same thread is
executing both sides of the conversation (let's call it super-synchronous)?
I'm basing it on the observation that in
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(MessageExchange,
long) there is:
if (me.getSyncState() !=
MessageExchangeImpl.SYNC_STATE_SYNC_RECEIVED) {
waitForExchange(me, me, timeout, "sendSync");
} else {
and the call to waitForExchange() calls me.wait() which waits for itself (and
thus deadlocks).
> sendsync from a service to another service seems to cause a deadlock under
> load
> -------------------------------------------------------------------------------
>
> Key: SM-512
> URL: https://issues.apache.org/activemq/browse/SM-512
> Project: ServiceMix
> Issue Type: Bug
> Affects Versions: 3.0-M2
> Environment: Windows 2003, Intel 2.8 xeon processor. Java 1.5 3.0-M2
> Reporter: anand somani
> Assignee: Guillaume Nodet
> Fix For: 3.0
>
> Attachments: test.zip
>
>
> We have 2 services A and B. A makes sync requests to B. We have a JMS client
> that feeds requests to A and that triggers a sync request to B. We are trying
> to push some 5000 requests (not sequential). Now
> With st flow - A gets all the responses from B and we are good
> with Seda flow - A gets some responses from B (sometimes none) and then
> all the threads are blocked (seen using JMX) on syncsend(), looks like B has
> no threads to service requests.
> with JMS flow ( A and B on different VMs), we see the similar behavior
> as with seda flow
> With async requests everything works just fine. We have tried increasing seda
> capacity and workmanager thread count, that did not help. I am attaching
> service A and B code along with configuration files
> Also it would be nice to have all the tunable features documented with some
> explaination somewhere ( I could not find it anywhere)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.