[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 12 Jan 2015 17:14:51 +0000

Lieven Govaerts <lgo_at_mobsol.be> 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 creates a second request
>> - client calls serf to send second, pipelined, request
> 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 client were to close/reopen the connection
that data would get dropped, or at least that is what appears to happen
as I don't see the bug if the server sends "Connection: close" with the
first response.

>> How do I go about writing such a test?
>
> The easiest way is to use existing tests as a starting point.:

I can't run the tests at all on my machine:

$ test/test_all
Segmentation fault
$ 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:56)
==11901== by 0x41546E: serf_mock_sock_readline (mock_sock_buckets.c:44)
==11901== by 0x40443BA: serf_barrier_readline (barrier_buckets.c:54)
==11901== by 0x404500D: serf_linebuf_fetch (buckets.c:515)
==11901== by 0x404A132: fetch_line (response_buckets.c:124)
==11901== by 0x404A475: run_machine (response_buckets.c:235)
==11901== by 0x404A8FB: wait_for_body (response_buckets.c:365)
==11901== by 0x404AA0F: serf_response_read (response_buckets.c:424)
==11901== by 0x406ECB: handle_response (test_util.c:246)
==11901== by 0x4041791: handle_response (outgoing.c:1049)
==11901== Address 0xd is not stack'd, malloc'd or (recently) free'd

0x000000000403e7cf in serf_config_get_object (config=0x40700a0, key=268435457,
    value=0xffefffc10) at config_store.c:278
278 config_entry_t *iter = target->first;
(gdb) p config[0]
$1 = {conn_pool = 0x0, ctx_pool = 0x412b038, per_context = 0x5,
  per_host = 0x40701c8, per_conn = 0x100100}
(gdb) p target
$2 = (serf__config_hdr_t *) 0x5

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2015-01-12 18:16:07 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.