You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Chuck Rolke (JIRA)" <ji...@apache.org> on 2015/04/09 22:27:13 UTC
[jira] [Commented] (QPID-6484) AccessViolationException when
creating queues
[ https://issues.apache.org/jira/browse/QPID-6484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14488205#comment-14488205 ]
Chuck Rolke commented on QPID-6484:
-----------------------------------
This is a bug in the C++ code handling of proton conditions. Essentially the sender has failed and the description of the failure is being constructed. in ConnectionContext::checkClosed() when link_state REQUIRES_CLOSE
{code}
pn_condition_t* error = pn_session_remote_condition(ssn->session);
std::stringstream text;
if (pn_condition_is_set(error)) {
text << "Session ended by peer with " << pn_condition_get_name(error) << ": " << pn_condition_get_description(error);
} else {
text << "Session ended by peer";
}
{code}
In the failure mode
* pn_condition_is_set(error) = true
* pn_condition_get_name(error) = amqp:not-found
* pn_condition_get_description(error) = NULL
and the NULL exception is thrown creating the description text.
The failure (on my setup) happens occasionally, maybe 10-20% of the time. Normally, and always when going to a C++ qpidd broker, the link never processes REQUIRES_CLOSE and the top-level program receives a "No such source: service_queue" exception that is handled gracefully.
There are a dozen or so instances of unchecked pn_condition_get_description() in the messaging client. I'd prefer to fix this in Proton and have the function return a pointer to a null string instead of NULL.
> AccessViolationException when creating queues
> ---------------------------------------------
>
> Key: QPID-6484
> URL: https://issues.apache.org/jira/browse/QPID-6484
> Project: Qpid
> Issue Type: Bug
> Components: Dot Net Client
> Affects Versions: 0.32
> Environment: Windows 8.1
> VS 2013 x86
> .NET wrapped Qpid C++ Client 0.32 with Proton 0.9
> Qpid Java Broker 0.30
> AMQP 1.0
> Reporter: Enrico Popall
> Priority: Critical
>
> If the client creates a queue which does not exist on the broker, the Session.createSender/Session.createReceiver method throws an AccessViolationException.
> If the queue exist, the creation of the sender/receiver works like a charm.
> {code:title=csharp.example.client.cs}
> namespace Org.Apache.Qpid.Messaging.Examples {
> class Client {
> static int Main(string[] args) {
> String url = "amqp:tcp:127.0.0.1:5672";
> String connectionOptions = "{protocol:amqp1.0,sasl_mechanisms:PLAIN,username:guest,password:guest}";
> if (args.Length > 0)
> url = args[0];
> if (args.Length > 1)
> connectionOptions = args[1];
> Connection connection = new Connection(url, connectionOptions);
> try
> {
> connection.Open();
> Session session = connection.CreateSession();
> Sender sender = session.CreateSender("service_queue; {create:always}");
> Address responseQueue = new Address("#response-queue; {create:always}");
> Receiver receiver = session.CreateReceiver(responseQueue);
> String[] s = new String[] {
> "Twas brillig, and the slithy toves",
> "Did gire and gymble in the wabe.",
> "All mimsy were the borogroves,",
> "And the mome raths outgrabe."
> };
> Message request = new Message("");
> request.ReplyTo = responseQueue;
> for (int i = 0; i < s.Length; i++) {
> request.SetContent(s[i]);
> sender.Send(request);
> Message response = receiver.Fetch();
> Console.WriteLine("{0} -> {1}", request.GetContent(), response.GetContent());
> }
> connection.Close();
> return 0;
> }
> catch (Exception e)
> {
> Console.WriteLine("Exception {0}.", e);
> connection.Close();
> }
> return 1;
> }
> }
> }{code}
> Stacktrace:
> bei qpid.messaging.Session.createSender(Session* , Sender* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
> bei Org.Apache.Qpid.Messaging.Session.CreateSender(String address) in \qpid-0.32\qpid\cpp\bindings\qpid\dotnet\src\session.cpp:Zeile 474.
> bei Org.Apache.Qpid.Messaging.Examples.Client.Main(String[] args) in \qpid-0.32\qpid\cpp\bindings\qpid\dotnet\examples\csharp.example.client\csharp.example.client.cs:Zeile 43.
> bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
> bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
> bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
> bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
> bei System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
> bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
> bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
> bei System.Threading.ThreadHelper.ThreadStart()
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org