[Bugs] [Bug 1548517] New: write failed with EINVAL due O_DIRECT write buffer with unaligned size
bugzilla at redhat.com
bugzilla at redhat.com
Fri Feb 23 17:56:54 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1548517
Bug ID: 1548517
Summary: write failed with EINVAL due O_DIRECT write buffer
with unaligned size
Product: GlusterFS
Version: 3.12
Component: glusterd
Assignee: bugs at gluster.org
Reporter: lav at etersoft.ru
CC: bugs at gluster.org
Created attachment 1399948
--> https://bugzilla.redhat.com/attachment.cgi?id=1399948&action=edit
test for aligned and unligned write with O_DIRECT
Description of problem:
I catched in a brick log billions errors about Invalid argument during write:
018-02-23 14:57:37.624075] E [MSGID: 113072] [posix.c:3631:posix_writev]
0-ftp-pub-posix: write failed: offset 131072, [Invalid argument]
[2018-02-23 14:57:37.624260] E [MSGID: 115067]
[server-rpc-fops.c:1407:server_writev_cbk] 0-ftp-pub-server: 18548605: WRITEV 2
(cda02ff8-011e-4ecc-9e22-86741aa9fee5), client:
multi.office.etersoft.ru-31148-2018/02/22-14:44:24:479443-ftp-pub-client-2-0-0,
error-xlator: ftp-pub-posix [Invalid argument]
In strace -y -f -p on glusterfsd process it seems like
[pid 31198]
pwrite64(28</var/local/eterglust/pub/.glusterfs/c1/a6/c1a6f57f-2082-466a-8f25-5430e281da58>,
"libgl1-mesa-glx\nlibwine-vanilla\n", 32, 0) = -1 EINVAL (Invalid argument)
The line in xlators/storage/posix/src/posix.c where we got error has the
comment:
/* not sure whether writev works on O_DIRECT'd fd */
retval = sys_pwrite (fd, buf, vector[idx].iov_len,
internal_off);
I wrote a little program (is attached) and discovered I have the error with
newest kernels (4.4.*) and no problems with 2.6.32 kernel.
As I see we need for buffer address and for buffer size both use aligned (512)
values only.
On both 32 and 64 bit system
glusterfs 3.12.5
kernel 2.6.32, 4.4.105
test result:
UNALIGNED address write: FAILED
ALIGNED address write: FAILED
UNALIGNED address with aligned size write: FAILED
ALIGNED address and size write: SUCCESSFUL
OpenVZ container result:
UNALIGNED address write: SUCCESSFUL
ALIGNED address write: SUCCESSFUL
UNALIGNED address with aligned size write: SUCCESSFUL
ALIGNED address and size write: SUCCESSFUL
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list