You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Andrew North <An...@campbellsci.co.uk> on 2023/07/13 10:38:48 UTC

qpid-proton - Exception in send sample, in Win32 - BUG?

Hello,
I am seeking help on qpid-proton library, here is the description.


  *   I cloned this repository: apache/qpid-proton: Mirror of Apache Qpid Proton (github.com)<https://github.com/apache/qpid-proton>
     *   On this commit hash: 4992b369a1b7aaa81913b4a5413616cf88d347bd (latest from master)
  *   I built library including the examples in Win32
  *   I tested the "send.c" example and get an exception in Win32; when I build in x64 the sample works fine

Below are results of Win32 exception, let me know if there is any more information I need to provide with this investigation.
I can also try to debug myself, but I would need some pointers to see where to look.

Also let me know if this is the correct place to raise this issue, or if there is another more appropriate place.

Callstack:
                e850fc45()          Unknown
               [Frames below may be incorrect and/or missing]
>              qpid-proton-cored.dll!pni_phase(pn_transport_t * transport, int(*)(pn_transport_t *, pn_endpoint_t *) phase) Line 2514            C
               qpid-proton-cored.dll!pni_process(pn_transport_t * transport) Line 2532              C
               qpid-proton-cored.dll!pn_output_write_amqp(pn_transport_t * transport, unsigned int layer, char * bytes, unsigned int available) Line 2687              C
               qpid-proton-cored.dll!transport_produce(pn_transport_t * transport) Line 2740 C
               qpid-proton-cored.dll!pn_transport_pending(pn_transport_t * transport) Line 3032         C
               qpid-proton-cored.dll!pn_connection_driver_write_buffer(pn_connection_driver_t * d) Line 115 C
               qpid-proton-proactord.dll!pconnection_process(pconnection_t * pc, pn_experimental::iocp_result_t * result, bool topup) Line 2361    C++
               qpid-proton-proactord.dll!pconnection_batch_next(pn_event_batch_t * batch) Line 2417              C++
               qpid-proton-proactord.dll!pn_event_batch_next(pn_event_batch_t * batch) Line 84         C
               send.exe!run(app_data_t * app) Line 178              C
               send.exe!main(int argc, char * * argv) Line 205   C
               [External Code]

Exception:
              Exception thrown at 0xE850FC45 in send.exe: 0xC0000005: Access violation executing location 0xE850FC45.
                Line 2513 in transport.c

Kind Regards,
Andrew

Andrew North
SOFTWARE ENGINEER
RESEARCH & DEVELOPMENT

RE: qpid-proton - Exception in send sample, in Win32 - BUG?

Posted by Andrew North <An...@campbellsci.co.uk>.
Hi just to resolve this,

it was a mix-up with some static libraries I may have installed with qpid-proton before integrating with my own project,
I cleaned everything and rebuilt dependencies and such,
I am now not getting the exception anymore, thanks for the all the comments and support. : )

Cheers,
Andrew

Andrew North
SOFTWARE ENGINEER
RESEARCH & DEVELOPMENT

Re: qpid-proton - Exception in send sample, in Win32 - BUG?

Posted by Cliff Jansen <cl...@gmail.com>.
Hi Andrew,

It looks like your crash is in pni_process_tpwork which processes a linked
list of deliveries that have been modified and require wire (AMQP protocol)
frames sent to the peer to keep both sides of the connection in sync.

The actual call is made via a function pointer, which I don't expect to be
problematic between 32 and 64 builds.  Similarly walking the linked list is
unlikely to be the source of the problem.  Perhaps the frame generation
code is tripping up parsing or generating AMQP types with some false
assumption about relative sizes of short/int/long in the case of a 32 bit
architecture.

Sadly, it looks like the bug trashes the stack and obscures what is going
on.

You could try setting break points or print statements in
pni_process_tpwork_sender to see if it fails on the first or later
message.  From here you may be able to further narrow where things go off
the rails.

The frame generation code has changed significantly recently, but we have
no reason to expect it introduced a 32 bit specific bug.  You could try the
older code from Proton 0.37 and see if that works.  That might tell us
something, or just that the bug has been around for a long time.

I can't offer any explanation on why one of your build options succeeds.
Sorry.

Cliff

On Fri, Jul 14, 2023 at 2:09 AM Andrew North <An...@campbellsci.co.uk>
wrote:

> Just to update in this thread with the latest from original - qpid-proton
> - Exception in send sample, in Win32-Apache Mail Archives
> <https://lists.apache.org/thread/m41jtto9z52rhpcmkb4cyytb73yrjg3q>
>
>
>
> We have experimented with other build options in Win32,
>
>
>
> We tried Release, RelWithDebInfo and RelMinSize – the exception persists
> in ALL but RelMinSize, where it seems to work as expected, we see the
> messages in the broker (I am using RabbitMQ on localhost:amqp),
>
>

RE: qpid-proton - Exception in send sample, in Win32 - BUG?

Posted by Andrew North <An...@campbellsci.co.uk>.
Just to update in this thread with the latest from original - qpid-proton - Exception in send sample, in Win32-Apache Mail Archives<https://lists.apache.org/thread/m41jtto9z52rhpcmkb4cyytb73yrjg3q>

We have experimented with other build options in Win32,

We tried Release, RelWithDebInfo and RelMinSize - the exception persists in ALL but RelMinSize, where it seems to work as expected, we see the messages in the broker (I am using RabbitMQ on localhost:amqp),

Andrew North
SOFTWARE ENGINEER
RESEARCH & DEVELOPMENT