qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Sim (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-6484) AccessViolationException when creating queues
Date Fri, 10 Apr 2015 13:08:12 GMT

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

Gordon Sim commented on QPID-6484:
----------------------------------

Those traces look a little suspect to me. Below are two traces from the c++ client showing
the two cases. It does indeed look like a timing issue. On linux, neither exchange results
in a seg fault. Indeed, since the return is a c-string, 0 *is* the null string. Perhaps this
is allowed as input to a string stream on linux (gcc) but not with windows. However I have
checked in a fix that tests the value returned for the description anyway.

{noformat}
$ ./src/tests/qpid-send --connection-options {protocol:amqp1.0} --address blah --log-enable
trace+:Protocol  --log-enable warning+
2015-04-10 14:00:46 [Protocol] debug tcp:127.0.0.1:5672 writing protocol header: 1-0
2015-04-10 14:00:46 [Protocol] debug tcp:127.0.0.1:5672 read protocol header: 1-0
2015-04-10 14:00:46 [Protocol] debug tcp:127.0.0.1:5672 Received SASL-MECHANISMS(ANONYMOUS
)
2015-04-10 14:00:46 [Protocol] debug tcp:127.0.0.1:5672 Sent SASL-INIT(ANONYMOUS, anonymous@GRS-T520,
127.0.0.1)
2015-04-10 14:00:46 [Protocol] debug tcp:127.0.0.1:5672 Received SASL-OUTCOME(\x00)
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]:   <- AMQP
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]:   -> AMQP
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @open(16)
[container-id="994e56b2-1751-4f37-983a-711a486f7e9f", properties={:"qpid.client_process"=:"qpid-send",
:"qpid.client_pid"=25581, :"qpid.client_ppid"=15537}]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @open(16)
[container-id="3b8b497b-5e49-47f6-8842-6ca53637e7d9", max-frame-size=32768, channel-max=255,
properties={:product="qpid", :version="0.32", :"qpid.build"="Unversioned directory", :"qpid.instance_name"="Broker"}]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @begin(17)
[next-outgoing-id=0, incoming-window=2147483647, outgoing-window=0]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @begin(17)
[remote-channel=0, next-outgoing-id=0, incoming-window=2048, outgoing-window=2048]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @attach(18)
[name="blah_4fe281b3-58c6-4797-904b-a333bd3e686a", handle=0, role=false, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [address="blah", durable=0, timeout=0, dynamic=false],
target=@target(41) [address="blah", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @attach(18)
[name="blah_4fe281b3-58c6-4797-904b-a333bd3e686a", handle=0, role=true, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [address="blah", durable=0, timeout=0, dynamic=false]]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @detach(22)
[handle=0, closed=true, error=@error(29) [condition=:"amqp:not-found"]]
qpid-send: Link detached by peer with amqp:not-found
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @detach(22)
[handle=0, closed=true]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @end(23)
[]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 -> @close(24)
[]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]:   -> EOS
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @end(23)
[]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]: 0 <- @close(24)
[]
2015-04-10 14:00:46 [Protocol] trace [994e56b2-1751-4f37-983a-711a486f7e9f]:   <- EOS
{noformat}


{noformat}
$ ./src/tests/qpid-send --connection-options {protocol:amqp1.0} --address blah --log-enable
trace+:Protocol  --log-enable warning+
2015-04-10 14:00:40 [Protocol] debug tcp:127.0.0.1:5672 writing protocol header: 1-0
2015-04-10 14:00:41 [Protocol] debug tcp:127.0.0.1:5672 read protocol header: 1-0
2015-04-10 14:00:41 [Protocol] debug tcp:127.0.0.1:5672 Received SASL-MECHANISMS(ANONYMOUS
)
2015-04-10 14:00:41 [Protocol] debug tcp:127.0.0.1:5672 Sent SASL-INIT(ANONYMOUS, anonymous@GRS-T520,
127.0.0.1)
2015-04-10 14:00:41 [Protocol] debug tcp:127.0.0.1:5672 Received SASL-OUTCOME(\x00)
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]:   <- AMQP
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]:   -> AMQP
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 -> @open(16)
[container-id="c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec", properties={:"qpid.client_process"=:"qpid-send",
:"qpid.client_pid"=25576, :"qpid.client_ppid"=15537}]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @open(16)
[container-id="3b8b497b-5e49-47f6-8842-6ca53637e7d9", max-frame-size=32768, channel-max=255,
properties={:product="qpid", :version="0.32", :"qpid.build"="Unversioned directory", :"qpid.instance_name"="Broker"}]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 -> @begin(17)
[next-outgoing-id=0, incoming-window=2147483647, outgoing-window=0]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @begin(17)
[remote-channel=0, next-outgoing-id=0, incoming-window=2048, outgoing-window=2048]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 -> @attach(18)
[name="blah_bbaa0f99-7983-4ea1-8ede-f0f0df173efb", handle=0, role=false, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [address="blah", durable=0, timeout=0, dynamic=false],
target=@target(41) [address="blah", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @attach(18)
[name="blah_bbaa0f99-7983-4ea1-8ede-f0f0df173efb", handle=0, role=true, snd-settle-mode=2,
rcv-settle-mode=0, source=@source(40) [address="blah", durable=0, timeout=0, dynamic=false]]
qpid-send: No such target : blah
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 -> @end(23)
[]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 -> @close(24)
[]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]:   -> EOS
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @detach(22)
[handle=0, closed=true, error=@error(29) [condition=:"amqp:not-found"]]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @end(23)
[]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]: 0 <- @close(24)
[]
2015-04-10 14:00:41 [Protocol] trace [c2cbdb7c-85a1-41dd-8a60-8b834e5b00ec]:   <- EOS
{noformat}

> 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
>            Assignee: Gordon Sim
>            Priority: Critical
>         Attachments: qpid-6468-189_closed_gracefully-192_would_throw.html, qpidd-6468_3_goods-and-1_bad.html
>
>
> 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


Mime
View raw message