[
https://issues.apache.org/jira/browse/AMQCPP-755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evan Ward updated AMQCPP-755:
-----------------------------
Description:
# the library in FailoverTransport::handleTransportFailure takes a lock
(FailoverTransfor.reconnectMutex)
# then calls application code to notify the disconnection
(transportInterrupted())
# then the called application code attempts to send message with the
notification
# then in FailoverTransport::oneway line 458 the library waits on the lock it
already owns (FailoverTransfor.reconnectMutex)
The result is the library will never send message and never attempt to
reconnect.
Expected behavior is that the activemq-cpp library reconnects, then sends the
message.
One way to fix would be to ensure all locks are released before calling
application code. Another possible fix would be to use re-entrant aware waiting.
was:
# the library in FailoverTransport::handleTransportFailure takes a lock
(FailoverTransfor.reconnectMutex)
# then calls application code to notify the disconnection
(transportInterrupted())
# then the called application code attempts to send message with the
notification
# then in FailoverTransport::oneway line 458 the library waits on the lock it
already owns (FailoverTransfor.reconnectMutex)
The result is the library will never send message and never attempt to
reconnect.
> Deadlock in FailoverTransport handleTransportFailure and oneway
> ---------------------------------------------------------------
>
> Key: AMQCPP-755
> URL: https://issues.apache.org/jira/browse/AMQCPP-755
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Transports
> Affects Versions: 3.9.5
> Reporter: Evan Ward
> Assignee: Timothy A. Bish
> Priority: Major
>
> # the library in FailoverTransport::handleTransportFailure takes a lock
> (FailoverTransfor.reconnectMutex)
> # then calls application code to notify the disconnection
> (transportInterrupted())
> # then the called application code attempts to send message with the
> notification
> # then in FailoverTransport::oneway line 458 the library waits on the lock
> it already owns (FailoverTransfor.reconnectMutex)
> The result is the library will never send message and never attempt to
> reconnect.
> Expected behavior is that the activemq-cpp library reconnects, then sends the
> message.
> One way to fix would be to ensure all locks are released before calling
> application code. Another possible fix would be to use re-entrant aware
> waiting.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact