Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-14 Thread Lieven Govaerts
On Wed, Jan 14, 2015 at 12:54 PM, Philip Martin wrote: > Lieven Govaerts writes: > >> The easiest way is to use existing tests as a starting point.: >> - Test test_serf_connection_request_create sends 2 requests and responses. >> This tests sends two pipelined requests, but you can modifiy it t

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-14 Thread Philip Martin
Lieven Govaerts writes: > The easiest way is to use existing tests as a starting point.: > - Test test_serf_connection_request_create sends 2 requests and responses. > This tests sends two pipelined requests, but you can modifiy it to > send the 1st request, then run the serf loop, then send th

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Philip Martin
Philip Martin writes: > $ valgrind -q test/test_all > ==11901== Invalid read of size 8 > ==11901==at 0x403E7CF: serf_config_get_object (config_store.c:278) > ==11901==by 0x403F88A: serf__log (logging.c:146) > ==11901==by 0x4048E79: serf_log_wrapped_readline > (log_wrapper_buckets.c:5

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Philip Martin
Philip Martin writes: > Lieven Govaerts writes: > >> Is there a reason you specifically mention pipelined here? The first >> response has been handled so it's just synchronous communication. > > The point is that the client reads data from the server before sending > the second response. If the

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Philip Martin
Lieven Govaerts writes: > On Mon, Jan 12, 2015 at 12:22 PM, Philip Martin >> >> I'm not familiar with serf's testsuite. The scenario: >> >> - client sends first request >> - server sends response >> - server sends extra data, say '\n' >> - client handles first request >> - client creat

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Lieven Govaerts
On Mon, Jan 12, 2015 at 12:22 PM, Philip Martin wrote: > Lieven Govaerts writes: > >> You're trying to capture the situation where serf has: >> - finished writing a request ( req_bkt == NULL && writing_started ) >> - has no more requests in the pending queue >> - and receives actual bytes of data

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Philip Martin
Lieven Govaerts writes: > You're trying to capture the situation where serf has: > - finished writing a request ( req_bkt == NULL && writing_started ) > - has no more requests in the pending queue > - and receives actual bytes of data. > Right? > > Looks like your patch is a correct way to fix th

Re: [serf-dev] Re: [PATCH] Serf crash on spurious data between responses

2015-01-12 Thread Lieven Govaerts
Hi, On Sat, Jan 10, 2015 at 1:07 PM, Philip Martin wrote: > Philip Martin writes: > >> Philip Martin writes: >> >>> While debugging a problem reported on users I accidentally sent an extra >>> byte to the client: I sent Content-Length of N and then sent N+1 bytes. >>> The first N bytes made a