Bug #14095
closedFreeBSD testsuite generates traps on os/FileJournal.cc:1043
0%
Description
After patching the src tree so that just about everything compiles
Running 'gmake check' some of the tests fail.
One of them is:
./test/test-ceph-helpers.sh.log:os/FileJournal.cc: 1043: FAILED assert(0 == "bl should be aligned.")
Given with some other asserts (when enabled) leads me to beleive that there is an allocation problem with the combination: Ceph/FreeBSD/Clang.
The source changes to compile under FreeBSD are in:
https://github.com/ceph/ceph/pull/6794
I have some more changes, not yet commited, but I think this will get you to a tree that builds by
./do_autogen.sh
./do_configure
gmake
gmake check
Updated by Xinze Chi over 8 years ago
diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc
index 34c2f44..3ae10f6 100644
--- a/src/os/FileJournal.cc
++ b/src/os/FileJournal.cc@ -1027,6 +1027,10
@ void FileJournal::align_bl(off64_t pos, bufferlist& bl)
// make sure list segments are page aligned
if (directio && (!bl.is_aligned(block_size) ||
!bl.is_n_align_sized(CEPH_MINIMUM_BLOCK_SIZE))) {
derr << " block_size " << block_size << " CEPH_MINIMUM_BLOCK_SIZE "
+ << CEPH_MINIMUM_BLOCK_SIZE << " CEPH_PAGE_SIZE " << CEPH_PAGE_SIZE
+ << " header.alignment " << header.alignment
+ << " bl " << bl << dendl;
assert(0 == "bl should be align");
if ((bl.length() & (CEPH_MINIMUM_BLOCK_SIZE - 1)) != 0 ||
(pos & (CEPH_MINIMUM_BLOCK_SIZE - 1)) != 0)
please add the debug info into your ceph, and paste the err messge.
Thanks.
Updated by Willem Jan Withagen over 8 years ago
Added the debug code, and this is from running
test-ceph-helpers.sh
running /usr/srcs/Ceph/wip-freebsd-wjw/ceph/src/ceph-osd:
2015-12-17 11:43:19.290709 805215000 -1 FileJournal::_open_any: libaio not compiled in; disabling aio
2015-12-17 11:43:19.635653 805215000 -1 FileJournal::_open_any: libaio not compiled in; disabling aio
2015-12-17 11:43:19.636643 805215000 -1 filestore(testdir/ceph-helpers/0) could not find -1/23c2fcde/osd_superblock/0 in index: (2) No such file or directory
2015-12-17 11:43:19.651100 805217400 -1 journal block_size 131072 CEPH_MINIMUM_BLOCK_SIZE 4096 CEPH_PAGE_SIZE 4096 header.alignment 131072 bl buffer::list(len=131072, buffer::ptr(0~131072 0x805319000 in raw 0x805319000 len 131072 nref 1)
)
os/FileJournal.cc: In function 'void FileJournal::align_bl(off64_t, bufferlist &)' thread 805217400 time 2015-12-17 11:43:19.651154
os/FileJournal.cc: 1042: FAILED assert(0 == "bl should be align")
ceph version 10.0.0-872-g8c71007 (8c71007eb5a7b5b8b36eff4b6efe2449dfb18475)
From what I see is is_aligned the same loop-code as in the length() code in include/buffer.h.
Around line 389, which is ifdef-ed out. But enabling that piece of code also triggers traps.
Updated by Willem Jan Withagen over 8 years ago
Just to make sure I tested the 2 expressions in the if().
2015-12-17 13:45:54.550389 805217400 -1 journal bl.is_aligned(block_size) 0 bl.is_n_align_sized(CEPH_MINIMUM_BLOCK_SIZE) 1
So it blocksize is not aligned.
Updated by Willem Jan Withagen about 8 years ago
This error was gone until very recently when I again rebased.
Now it is back again.
Probably due to changes for the crypto and/or compressing code.
Updated by Willem Jan Withagen about 7 years ago
Nope,
I think that this error is permanently fixed.
(until somebody breaks it again)