[Bugs] [Bug 1512691] PostgreSQL DB Restore: unexpected data beyond EOF

bugzilla at redhat.com bugzilla at redhat.com
Thu Jun 28 00:39:20 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1512691



--- Comment #15 from Raghavendra G <rgowdapp at redhat.com> ---
[2018-06-27 16:36:23.969018] T [fuse-bridge.c:862:fuse_attr_cbk]
0-glusterfs-fuse: 2929207: FSTAT() ERR => 13592650803908775745stat =
gfid=cb68eef3-04f1-4719-bca2-cbe3a2e90f41 ino=13592650803908775745, mode=1006
00, nlink=1, uid=26, gid=26, size=202088448, blocks=394704,
atime=2018-06-27-16:36:23 mtime=2018-06-27-16:36:23 ctime=2018-06-27-16:36:23
atime_sec=1530117383, atime_nsec=955733539, mtime_sec=1530117383, mtime_n
sec=967733546, ctime_sec=1530117383, ctime_nsec=967733546
[2018-06-27 16:36:23.969160] T [fuse-bridge.c:2503:fuse_write_resume]
0-glusterfs-fuse: 2929209: WRITE (0x7feb203abd90, size=8192, offset=202088448)
[2018-06-27 16:36:23.969211] T [fuse-bridge.c:2459:fuse_writev_cbk]
0-glusterfs-fuse: 2929209: gfid=cb68eef3-04f1-4719-bca2-cbe3a2e90f41 WRITE =>
540720528/8192,8192/202088448

Above write extends file by 8192. So size should be 20208848 + 8192

[2018-06-27 16:36:23.969241] T [fuse-bridge.c:862:fuse_attr_cbk]
0-glusterfs-fuse: 2929206: FSTAT() ERR => 13592650803908775745stat =
gfid=cb68eef3-04f1-4719-bca2-cbe3a2e90f41 ino=13592650803908775745, mode=1006
00, nlink=1, uid=26, gid=26, size=202088448, blocks=394704,
atime=2018-06-27-16:36:23 mtime=2018-06-27-16:36:23 ctime=2018-06-27-16:36:23
atime_sec=1530117383, atime_nsec=955733539, mtime_sec=1530117383, mtime_n
sec=967733546, ctime_sec=1530117383, ctime_nsec=967733546
[2018-06-27 16:36:23.969305] T [fuse-bridge.c:2399:fuse_readv_resume]
0-glusterfs-fuse: 2929210: READ (0x7feb20562ff0, size=8192, offset=41058304)

[2018-06-27 16:36:23.969464] T [fuse-bridge.c:970:fuse_getattr_resume]
0-glusterfs-fuse: 2929211: FGETATTR 140648101387600 ((null)/0x7feb203abd90)

Note that this getattr was issued after write extended the file

[2018-06-27 16:36:23.969496] T [fuse-bridge.c:862:fuse_attr_cbk]
0-glusterfs-fuse: 2929211: FSTAT() ERR => 13592650803908775745stat =
gfid=cb68eef3-04f1-4719-bca2-cbe3a2e90f41 ino=13592650803908775745, mode=1006
00, nlink=1, uid=26, gid=26, size=202088448, blocks=394704,
atime=2018-06-27-16:36:23 mtime=2018-06-27-16:36:23 ctime=2018-06-27-16:36:23
atime_sec=1530117383, atime_nsec=955733539, mtime_sec=1530117383, mtime_n
sec=967733546, ctime_sec=1530117383, ctime_nsec=967733546

Size is still 202088448. Effect of write (id 2929209) is not reflected in a
stat (id 2929211) issued after write. This is the bug.

The bug is in md-cache.  Imagine following series of operations:
    * A stat s1 was issued from fuse layer when size of file was s1
    * stat s1 completes on brick stack, but yet to reach md-cache
    * A write w1 extends file to size s2, but write is cached in
      write-behind and response is unwound
    * md-cache while handling write-cbk, invalidates cache of file
    * md-cache receives response for s1, updates cache with stale stat

    Fix is to remember whether s1 was older than w1. If yes, s1 won't
    update cache in write-behind.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=a3tQtNeonc&a=cc_unsubscribe


More information about the Bugs mailing list