Bug 1006698

Summary: glfs_preadv_async fails for large read with io-cache xlator on
Product: [Community] GlusterFS Reporter: Bharata B Rao <bharata.rao>
Component: io-cacheAssignee: GlusterFS Bugs list <gluster-bugs>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: aavati, bugs, gluster-bugs, ndevos, vbellur
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-27 18:32:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bharata B Rao 2013-09-11 06:55:42 UTC
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

Comment 1 Bharata B Rao 2013-09-12 04:45:55 UTC
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 ?

Comment 2 Anand Avati 2013-09-12 20:25:28 UTC
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.

Comment 3 Niels de Vos 2014-09-27 18:32:37 UTC
io-cache gets disabled in the 'virt' group file, see bug 851237

*** This bug has been marked as a duplicate of bug 851237 ***