You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Kim van der Riet (JIRA)" <ji...@apache.org> on 2017/06/02 17:26:04 UTC

[jira] [Comment Edited] (QPID-7809) Python 0-10 messaging driver does not handle heartbeat timeouts, "assert rcv.received < rcv.impending" occurs

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

Kim van der Riet edited comment on QPID-7809 at 6/2/17 5:25 PM:
----------------------------------------------------------------

Proposed fix.

When a heartbeat timeout occurs the {{qpid.messaging.Driver}} object closes its {{qpid.messaging.Engine}} instance and schedules a reconnection. But in order for a connection to be made, the {{_transport}} object must be set to {{None}}. In addition, no check is made when {{qpid.messaging.Driver.readable()}} is called that the engine is not closed, and this allows operations (such as message transfers) to be performed on the closed engine. In the case of a message transfer, this results in a Python exception {{assert rcv.received < rcv.impending}}.

This patch sets both the engine and the transport to {{None}} when the engine is closed (by calling {{st_closed()}}. Additional checks are made at various Driver calls that the engine instance is not {{None}} to prevent operations occurring before a connection is reestablished.


was (Author: kpvdr):
Proposed fix.

When a heartbeat timeout occurs the {{Driver}} object closes its {{Engine}} instance and schedules a reconnection. But in order for a connection to be made, the {{Transport}} object must be set to {{None}}. In addition, no check is made when {{Driver.readable()}} is called that the engine is not closed, and this allows operations (such as message transfers) to be performed on the closed engine. In the case of a message transfer, this results in a Python exception {{assert rcv.received < rcv.impending}}.

This patch sets both the engine and the transport to {{None}} when the engine is closed (by calling {{st_closed()}}. Additional checks are made at various Driver calls that the engine instance is not {{None}} to prevent operations occurring before a connection is reestablished.

> Python 0-10 messaging driver does not handle heartbeat timeouts, "assert rcv.received < rcv.impending" occurs
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-7809
>                 URL: https://issues.apache.org/jira/browse/QPID-7809
>             Project: Qpid
>          Issue Type: Bug
>          Components: Python Client
>            Reporter: Kim van der Riet
>         Attachments: BZ1444206.patch
>
>
> When using the older Qpid Python messaging client (AMQP 0-10), a heartbeat timeout event results in the client never reconnecting to the broker. In addition, attempts to transfer messages after the heartbeat timeout result in a Python exception {{"assert rcv.received < rcv.impending"}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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