[sheepdog] [PATCH v2 0/3] sheep: writeback cache semantics in backend store

Liu Yuan namei.unix at gmail.com
Mon Sep 3 07:46:30 CEST 2012


On 09/03/2012 11:43 AM, Liu Yuan wrote:
> On 09/03/2012 01:45 AM, Hitoshi Mitake wrote:
>> On Sun, Sep 2, 2012 at 2:58 PM, Liu Yuan <namei.unix at gmail.com> wrote:
>>> On 09/02/2012 10:34 AM, Hitoshi Mitake wrote:
>>>> This patch series implements writeback cache semantics in backend
>>>> store of sheep. Current backend store farm and plain_store calls
>>>> open() with O_DSYNC, so every object write causes slow disk
>>>> access. This patch series try to reduce this overhead with flushing
>>>> disk cache with the invocation of SD_OP_FLUSH_VDI instead of every
>>>> object write can improve performance when a number of VMs is not so
>>>> large.
>>>>
>>>> Hitoshi Mitake (3):
>>>>   sheep: change gateway_forward_request() for forwarding requests to
>>>>     all other nodes
>>>>   sheep: add new operation flush() to store_driver
>>>>   sheep: add SD_OP_SYNC_VDI and SD_OP_FLUSH_PEER for writeback cache
>>>>     semantics
>>>
>>> This patch set can't pass test scripts.
>>>
>>> You can run tests as following (see HOWTO for more info):
>>>
>>> cd tests
>>> sudo ./check -corosync
>>>
>>
>> Thanks for your review and sorry for my bad patch series.
>> I'll fix the problem later.
>>
> 
> Well, your patch set code looks great to me. With your patch set, I just
> met random segfault running 26. But I am not sure if your patch set is
> root cause, because I enabled tracer meanwhile. I'll dig more today.
> 
> Thanks,
> Yuan
> 

I have got a core dump by following one liner:

$ while (($?==0));do sudo ./check -corosync 26;done

(gdb) bt
#0  0x00007fa3fc81dba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fa3fc8216b0 in abort () at abort.c:92
#2  0x00007fa3fc85765b in __libc_message (do_abort=<value optimized out>, fmt=<value optimized out>)
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3  0x00007fa3fc8616d6 in malloc_printerr (action=3, str=0x7fa3fc935758 "double free or corruption (!prev)", 
    ptr=<value optimized out>) at malloc.c:6283
#4  0x00007fa3fc867ea3 in __libc_free (mem=<value optimized out>) at malloc.c:3738
#5  0x0000000000407c88 in put_request (req=0x21b1c00) at request.c:513
#6  0x000000000040d083 in bs_thread_request_done (fd=<value optimized out>, events=<value optimized out>, data=<value optimized out>)
    at work.c:137
#7  0x00000000004199c6 in event_loop (timeout=<value optimized out>) at event.c:179
#8  0x000000000040437d in main (argc=<value optimized out>, argv=0x7fffad763628) at sheep.c:453
(gdb) info threads
  4 Thread 8362  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
  3 Thread 8361  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
  2 Thread 8363  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
* 1 Thread 8333  0x00007fa3fc81dba5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64


When I run without your patch set, I don't meet this seg fault.

Thanks,
Yuan



More information about the sheepdog mailing list