[Bugs] [Bug 1512691] PostgreSQL DB Restore: unexpected data beyond EOF
bugzilla at redhat.com
bugzilla at redhat.com
Thu Jun 28 04:42:14 UTC 2018
https://bugzilla.redhat.com/show_bug.cgi?id=1512691
--- Comment #18 from Raghavendra G <rgowdapp at redhat.com> ---
(In reply to Raghavendra G from comment #15)
> 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
write-behind has no role. The bug can happen even without write-behind. In fact
its necessary that two fops that would fetch stat (like a write and stat or two
stats on the same file) to be invoked from two different threads. Note that
caching and premature unwinding in write-behind cannot cause this class of
bugs.
Updated RCA is below:
Imagine following series of operations from two application threads:
* A stat s1 was issued from application thread t1 when size of file
was s1
* stat s1 completes on brick stack, but yet to reach md-cache
* A write w1 from application thread t2 extends file to size s2
* md-cache while handling write-cbk, updates size to s2
* md-cache receives response for s1, updates cache with stale stat
with size of s1 overwriting a valid stat s2
Similar race can occur between any fops that fetch stat done by two
application threads.
Fix is to remember whether s1 was older than w1. If yes, s1 won't
update cache in md-cache.
--
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=zPNjeqkgwh&a=cc_unsubscribe
More information about the Bugs
mailing list