GCache file allocation may fail if file size is a multiple of page size

Bug #1259952 reported by Alex Yurchenko on 2013-12-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Galera
Status tracked in 3.x
2.x
High
Alex Yurchenko
3.x
High
Alex Yurchenko
Percona XtraDB Cluster
Status tracked in 5.6
5.5
Undecided
Unassigned
5.6
Undecided
Unassigned

Bug Description

This may happen on file systems that don't support posix_fallocate(). The reason is offset == size_ case is not handled and falls through to throw exception.

Related branches

lp:galera
David Bennett: Pending requested 2014-07-25
summary: - GCache file allocation may fail if files size if a multiple of page size
+ GCache file allocation may fail if file size if a multiple of page size
summary: - GCache file allocation may fail if file size if a multiple of page size
+ GCache file allocation may fail if file size is a multiple of page size

@Alex,

Has this actually happened on any instance? Asking since
posix_fallocate usually falls back to zero-writing on filesystems
where fallocate is not supported (which is why fallocate is less
used compared to posix_allocate in certain cases, since former
fails).

However, this may again fail but will be on platforms with very
old glibc (need to be really old AFAIK) where this fallback may
not have been implemented.

I tested with

wsrep_provider_options = "gmcast.listen_addr=tcp://127.0.0.1:4010; gcache.dir=/dev/shm/gcache; gcache.page_size=134217728; gcache.size=134217728; debug=1"

But was not able to get any crash here (it also changed the size
to a different value, not an exact multiple of 4096).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers