Ken Giusti created PROTON-2189:
----------------------------------

             Summary: proactor C client has abnormally long pauses during 
message send
                 Key: PROTON-2189
                 URL: https://issues.apache.org/jira/browse/PROTON-2189
             Project: Qpid Proton
          Issue Type: Bug
          Components: proton-c
    Affects Versions: proton-c-0.30.0
         Environment: To compile the clients install qpid-proton-c-devel and 
simply compile:

gcc  -O2 -g -Wall -lqpid-proton -lm -o clogger clogger.c

To reproduce my test, build qdrouterd and run it in the background.
You need to have a consumer attached.  There is a test receiver client in the 
qdrouterd build in <build-dir>/tests/test-receiver.  This receiver is designed 
to handle streaming messages (by default sent to 'test-address')

Run the consumer in the background then run each clogger (default params are 
fine).

You should observe that clogger-reactor runs smoothly (use PN_TRACE_FRM=1 on 
qdrouterd as well).

You'll see clogger-reactor send the message header, then nothing for awhile, 
then send the entire message. 

Use "-D" for debug output to see how many bytes have been written to 
pn_link_send()


            Reporter: Ken Giusti
         Attachments: clogger-proactor.c, clogger-reactor.c

I have a proactor-based C test client that has the ability to slowly send 
extremely large messages slowly.  This is done by sending 'chunks' of body data 
with pauses in between.

This client was designed to test large streaming messages against qdrouterd.

The behavior of this client is unexpected - I would expect the message data to 
appear "on the wire" in bursts relatively quickly.  In reality the data is 
buffered - in some cases over 1 GB is buffered - before it is written (as 
indicated by the lack @transfer frames dumped by the client AND the qdrouterd). 
 In some cases it takes up to 30 seconds before the client's data starts being 
written to the client.

I've refactored the client to use reactor instead and the data flows as 
expected.  There is minimal buffering and no abnormally long pauses.

The clients are attached.

It is quite likely the proactor client is incorrectly implemented, but I used 
the qdrouterd I/O loop as the model and cannot see what may be wrong.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to