I have a piece of code that consumes a queue.

Then the following happens:
* A message arrives to the consumer (HandleBasicDeliver)
* At the same time (up to fractions of a millisecond) I'm doing
IModel.Close() on this model, which completes ok.
* I open another channel on this connection, which works fine.
* That one consumer never gets a HandleModelShutdown() or OnCancel()
event, and in fact the consumer remains visible in the management
interface for many hours after these events, holding the
unacknowledged message.

I'm using RabbitMQ 2.6.1 and the .NET client 2.6.0.0.

What can I do to diagnose this?
Can this be a bug in the .NET client, or am I misusing it?
I have a RabbitMQ log, I have a memory dump of my .NET client process.

--
Eugene Kirpichov
Principal Engineer, Mirantis Inc. http://www.mirantis.com/
Editor, http://fprog.ru/

Search Discussions

  • Eugene Kirpichov at Sep 19, 2011 at 8:26 pm
    Some more information from the memory dump:
    Some of the fields of the "runaway" consumer (the one that belongs to
    the model that wasn't closed) are as follows:

    m_model = null (though other consumers have it null too)
    m_running = 1
    m_shutdownReason = null
    waiter = null
    shutdownHandler = null
    queueSize = 1

    Hope this helps the diagnosis. I'll try to take a closer look at the
    Client's code tomorrow.
    On Mon, Sep 19, 2011 at 9:44 PM, Eugene Kirpichov wrote:
    I have a piece of code that consumes a queue.

    Then the following happens:
    * A message arrives to the consumer (HandleBasicDeliver)
    * At the same time (up to fractions of a millisecond) I'm doing
    IModel.Close() on this model, which completes ok.
    * I open another channel on this connection, which works fine.
    * That one consumer never gets a HandleModelShutdown() or OnCancel()
    event, and in fact the consumer remains visible in the management
    interface for many hours after these events, holding the
    unacknowledged message.

    I'm using RabbitMQ 2.6.1 and the .NET client 2.6.0.0.

    What can I do to diagnose this?
    Can this be a bug in the .NET client, or am I misusing it?
    I have a RabbitMQ log, I have a memory dump of my .NET client process.

    --
    Eugene Kirpichov
    Principal Engineer, Mirantis Inc. http://www.mirantis.com/
    Editor, http://fprog.ru/


    --
    Eugene Kirpichov
    Principal Engineer, Mirantis Inc. http://www.mirantis.com/
    Editor, http://fprog.ru/
  • Emile Joubert at Sep 20, 2011 at 10:14 am
    Hi Eugene,
    On 19/09/11 18:44, Eugene Kirpichov wrote:
    I have a piece of code that consumes a queue.

    Then the following happens:
    * A message arrives to the consumer (HandleBasicDeliver)
    * At the same time (up to fractions of a millisecond) I'm doing
    IModel.Close() on this model, which completes ok.
    Are you closing the model from inside HandleBasicDeliver() ?
    Can you provide a minimal piece of code that triggers the problem?
    Can you reproduce this problem reliably, or does it fail only a fraction
    of the time?
    * I open another channel on this connection, which works fine.
    * That one consumer never gets a HandleModelShutdown() or OnCancel()
    event, and in fact the consumer remains visible in the management
    interface for many hours after these events, holding the
    unacknowledged message.

    I'm using RabbitMQ 2.6.1 and the .NET client 2.6.0.0.

    What can I do to diagnose this?
    Establishing the connection through the Tracer
    (http://www.rabbitmq.com/examples.html#tracer) or using a network
    analyser like Wireshark can help to diagnose protocol problems, but as a
    library user you shouldn't need to do this.
    Can this be a bug in the .NET client, or am I misusing it?
    I have a RabbitMQ log, I have a memory dump of my .NET client process.
    I don't expect the logfiles to be much help, because they don't record
    consumers subscribing to queues. If there are any entries around the
    relevant time then please send them.



    -Emile
  • Alfonso Pantoja at Sep 20, 2011 at 10:49 am
    Hi Eugene,

    On 19 sep, 19:44, Eugene Kirpichov wrote:

    in fact the consumer remains visible in the management
    interface for many hours after these events, holding the
    unacknowledged message.
    Are you using heartbeat property for the connection?
    In my opinion using that parameter should avoid that persistent
    connection on the server.



    Regards,
  • Eugene Kirpichov at Sep 20, 2011 at 11:29 am
    To not provoke false worrying, I'm notifying the community that I'm
    already not that sure that this is a bug in the client - might be
    somewhere in my code.

    I think so because examining the memory dump has shown that not even
    the first line of the Close() method has been executed - the one that
    subscribes to SessionShutdown.

    I'll keep you tuned when I know more.

    On Tue, Sep 20, 2011 at 2:49 PM, Alfonso Pantoja
    wrote:
    Hi Eugene,

    On 19 sep, 19:44, Eugene Kirpichov wrote:

    in fact the consumer remains visible in the management
    interface for many hours after these events, holding the
    unacknowledged message.
    Are you using heartbeat property for the connection?
    In my opinion using that parameter should avoid that persistent
    connection on the server.



    Regards,

    _______________________________________________
    rabbitmq-discuss mailing list
    rabbitmq-discuss at lists.rabbitmq.com
    https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


    --
    Eugene Kirpichov
    Principal Engineer, Mirantis Inc. http://www.mirantis.com/
    Editor, http://fprog.ru/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprabbitmq-discuss @
categoriesrabbitmq
postedSep 19, '11 at 5:44p
activeSep 20, '11 at 11:29a
posts5
users3
websiterabbitmq.com
irc#rabbitmq

People

Translate

site design / logo © 2022 Grokbase