[
https://issues.apache.org/jira/browse/QPID-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keith Wall reopened QPID-4503:
------------------------------
Assignee: Keith Wall (was: Robbie Gemmell)
There is a second race condition in the transaction timeout feature that can
cause a spurious idle warning (or spurious idle closes).
It is a race between the housekeeper and a newly begun transaction and causes
the last activity time of the previous transaction to be used rather than the
current one. It produces a spurious alert with an apparently genuine
millisecond value e.g.
CHN-1008 : Idle Transaction : 5,007 ms
(for the case where the previous transaction was active approximately 5 seconds
ago)
The issue is when a transaction commits (or rolls-back), the
transactionUpdateTime is not reset to zero. This means that as the next
transaction begins (whichsets the transactionStartTime *then* updates the
transactionUpdateTime), there exists a window of time where the
transactionStartTime refers to the new transaction while the
transactionUpdateTime exists to the previous transaction. If the housekeeper
happens to run in the intervening moment, a spurious message will result.
{noformat}
+ Housekeeper observes txn2 startTime
and txn1 updateTime!!!
|
|
10 15 |
| | v
-----------------------------------------------------------> time
^ ^ ^ ^
txn1 send txn1 commit txn2 send txn2 commit
^ ^ ^ ^ ^
| | | | |
| | | | txUpdateTime set
| | | |
| | | txStartTime set
| | txStartTime clear
| txUpdateTime set
txStartTime set
{noformat}
> Producer transaction timeout detection feature may produce spurious open/idle
> alerts and close client connections/sessions without good cause
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-4503
> URL: https://issues.apache.org/jira/browse/QPID-4503
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: 0.12, 0.14, 0.16, 0.18, 0.20
> Reporter: Keith Wall
> Assignee: Keith Wall
> Fix For: 0.21
>
> Attachments: QPID-4503_repro.tar.bz2
>
>
> There is a race condition in AMQChannel#checkTransactionStatus (and
> ServerSession#checkTransactionStatus) which can lead to spurious open/idle
> alerts and needlessly closed client connections (0-8..0-9-1) or client
> sessions (0-10).
> When the defect manifests, the alert generated incorrectly identifies the
> transaction as being open since Jan 1, 1970. eg. 1,355,281,641,112 ms
> e.g.
> {noformat}
> [con:11(guest@/127.0.0.1:47276/test)/ch:2] CHN-1007 : Open Transaction :
> 1,355,281,641,112 ms
> {noformat}
> This defect affects only users who have configured the transaction timeout
> feature (as described
> http://qpid.apache.org/books/trunk/AMQP-Messaging-Broker-Java-Book/html/Java-Broker-Runtime-Producer-Transaction-Timeout.html).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]