[SERVER-14835] fix fassert 16143 on PPC64 LE systems in LogFile::synchronousAppend() Created: 08/Aug/14 Updated: 18/Nov/14 Resolved: 25/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | None |
| Fix Version/s: | 2.7.7 |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Corentin Baron | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Linux on PPC64 use 64kB page size, making this crash whereas it works well. https://github.com/mongodb/mongo/pull/735 |
| Comments |
| Comment by Githook User [ 25/Sep/14 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: |
| Comment by Githook User [ 25/Sep/14 ] |
|
Author: {u'username': u'corentinbaron', u'name': u'Corentin Baron', u'email': u'corentin.baron@ext.bull.net'}Message: Closes #769 Signed-off-by: Benety Goh <benety@mongodb.com> |
| Comment by Corentin Baron [ 10/Sep/14 ] |
|
Updated |
| Comment by Benety Goh [ 10/Sep/14 ] |
|
Hi ctrl_alt_suppr, the patch did not compile under Windows. I've provided a more detailed feedback in #769. |
| Comment by Benety Goh [ 10/Sep/14 ] |
|
ctrl_alt_suppr, thank you for rebasing on master. I'll be running #769 through our CI system before taking a closer look at the code. |
| Comment by Corentin Baron [ 10/Sep/14 ] |
|
Updated and put on master: |
| Comment by Benety Goh [ 05/Sep/14 ] |
|
Thanks ctrl_alt_suppr I've added some initial feedback to the pull request. |
| Comment by Corentin Baron [ 05/Sep/14 ] |
| Comment by Corentin Baron [ 28/Aug/14 ] |
|
Hi, Sorry for the late response, unfortunately I had different requests on other fronts. I tried this method, and it requires to also have AlignedBuilder::Alignment changed since on our systems ioctl(_fd, BLKBSZGET) actually gives 65536. The issue being this value is a static const and therefore can't be set at runtime. We'd need to either make it a non const, either pass the value to gcc as a define. Corentin. |
| Comment by Matt Kangas [ 13/Aug/14 ] |
|
To clarify Andy's point: mongo::LogFile uses O_DIRECT if available (Linux 2.4.10 and up) O_DIRECT requirements:
So we need to keep the fassert, but we shouldn't test for multiples of g_minOSPageSizeBytes (from mmap.h). Instead, we should call ioctl(_fd, BLKBSZGET) to obtain size_t logical_block_size immediately after a successful open(). Then test for multiples of this value when _direct == true. We also need to confirm that BLKBSZGET always works when O_DIRECT is defined. (= Confirm BLKBSZGET is defined in Linux 2.4.10 and up) See:
|
| Comment by Andy Schwerin [ 08/Aug/14 ] |
|
It used to be the case that direct-io writes on Linux had to start at a block-aligned address and consist of whole-block-sized writes. Because we did not have access to the block size on the journal file system at the time, we simply used the page size as a proxy. Removing this assertion does remove that safeguard, if only on PPC systems. |