Description of problem: A large read of 128MB in a single glfs_preadv_async() call with one iovec count causes segfault when io-cache translator is ON. When io-cache is turned off, the same read succeeds. (gdb) 80 ret = glfs_preadv_async(fd, &iovr, 1, 0, 0, read_completion_fn, (void *)&iovr); (gdb) p iovr $1 = {iov_base = 0x7fffef6fe010, iov_len = 134217728} (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffee23b700 (LWP 18639)] 0x00000032a1b462d6 in __memcpy_ssse3_back () from /lib64/libc.so.6 (gdb) bt #0 0x00000032a1b462d6 in __memcpy_ssse3_back () from /lib64/libc.so.6 #1 0x00007ffff7df060d in iov_copy (dst=0x62f260, dcnt=1, src=0x7fffe805da70, scnt=1024) at ../../libglusterfs/src/common-utils.h:384 #2 0x00007ffff7df1a14 in glfs_preadv (glfd=0x62f440, iovec=0x62f260, iovcnt=1, offset=0, flags=0) at glfs-fops.c:494 #3 0x00007ffff7df1c92 in glfs_io_async_task (data=0x62f280) at glfs-fops.c:591 #4 0x00007ffff775bebb in synctask_wrap (old_task=0x6301a0) at syncop.c:131 #5 0x00000032a1a46370 in ?? () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? () Version-Release number of selected component (if applicable): 3.4
This could be a blocker for supporting gluster protocol in qemu-iotests. qemu-iotests is a test framework within QEMU to test the block layer in QEMU. We could permanently disable io-cache translator for the test gluster volume that gets created in qemu-iotests, but does GlusterFS recommend that ?
Disabling io-cache is a reasonable workaround. io-cache is anyways designed for read-only workloads (while a VM image workload is read-write). So disabling io-cache should not have side too many effects.
io-cache gets disabled in the 'virt' group file, see bug 851237 *** This bug has been marked as a duplicate of bug 851237 ***