[sheepdog] [PATCH] sheep: fix clear_client crash

Liu Yuan namei.unix at gmail.com
Tue Jul 10 05:42:49 CEST 2012


On 07/09/2012 08:50 PM, Yunkai Zhang wrote:
> We should use list_for_each_entry_safe instead of list_for_each_entry
> to loop when we need to delete node in it.

I still get following segfault occasionally

#0  0x00007f76753ddba5 in raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f76753e16b0 in abort () at abort.c:92
#2  0x00007f767541765b in __libc_message (do_abort=<value optimized
out>, fmt=<value optimized out>)
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:189
#3  0x00007f76754216d6 in malloc_printerr (action=3, str=0x7f76754f2362
"corrupted double-linked list", ptr=<value optimized out>)
    at malloc.c:6283
#4  0x00007f7675424ae7 in _int_free (av=0x7f7675729e40, p=0x12e5670) at
malloc.c:4964
#5  0x00007f7675427ea3 in __libc_free (mem=<value optimized out>) at
malloc.c:3738
#6  0x00000000004090a1 in free_request (req=0xed0fa0) at sdnet.c:474
#7  0x0000000000409a04 in clear_client (ci=0xed0e70) at sdnet.c:687
#8  0x0000000000409d92 in client_handler (fd=21, events=29,
data=0xed0e70) at sdnet.c:765
#9  0x000000000041e2dc in event_loop (timeout=-1) at event.c:179
#10 0x0000000000404376 in main (argc=7, argv=0x7fffa742edd8) at sheep.c:275

Thanks,
Yuan



More information about the sheepdog mailing list