I've tried to reproduce this behavior without luck.

Could you get a few things for reference?

1. A broker trace: qpidd --trace 

2. A stack trace from the stuck windows process.
   Using SysInternals ProcessExplorer: double click the hanging process.
   In the Threads tab you can choose each thread and show its stack.

Thanks,
Chuck

----- "Chris Howard" <[email protected]> wrote:

> From: "Chris Howard" <[email protected]>
> To: [email protected]
> Sent: Friday, September 10, 2010 6:30:11 AM GMT -05:00 US/Canada Eastern
> Subject: C# messaging client failing to close connection
>
> Hi,
> 
> I am using qpid 0.7 (built from source a few weeks ago). I have a C# 
> client that uses the messaging API.  It connects to the broker like
> so:
> 
> Connection connection = new Connection(this.engineArguments.Url);
> connection.SetOption("username", this.engineArguments.Username);
> connection.SetOption("password", this.engineArguments.Password);
> connection.SetOption("reconnect", true);
> connection.Open();
> this.session = connection.CreateSession();
> 
> A number of message are then sent/received, and then, some time later,
> I 
> call the Close() method on the connection object. However, the Close()
> 
> method never returns, and the process hangs indefinitely.
> 
> My first thought was that one or more of the messages that were sent 
> could still be outstanding, so I added some code to close the session
> first:
> 
> if (this.session != null)
> {
>      this.session.Sync(true);
>      this.session.Close();
> }
> 
> connection.Close();
> 
> The session closes OK, but the call to connection.Close() still
> hangs.
> 
> I then tried removing the following line:
> 
> connection.SetOption("reconnect", true);
> 
> Now the connection.Close() method does return. However, the code then
> 
> hangs at a different location on the GC thread during program shut
> down.
> 
> // cpp\bindings\qpid\dotnet\src\Message.cpp, line 150
> 
> // Destroys kept
> // TODO: add lock
> void Message::Cleanup()
> {
>      if (NULL != messagep)
>      {
>          delete messagep; // hangs on this line
>          messagep = NULL;
>      }
> }
> 
> Can anyone suggest what may be happening here. Let me know if I can 
> provide any more useful information.
> 
> Regards,
> Chris
> 
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:[email protected]

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to