facebook / CacheLib

Pluggable in-process caching engine to build and scale high performance services

Home Page:https://www.cachelib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cachelib Unit Test Fail

shkim0413 opened this issue · comments

Hi,
I'm sohyun.

I built the Cachelib on ubuntu 18.04 according to the build guide. Since the kernel version was not specified, the default version, 5.4, was used.
When building with "./contrib/build.sh -j -T" command, folly and fmt errors occurred. The build succeeded by downgrading the fmt version to 9.0.0.

After the build, I ran all unit tests. Some tests failed when executing UnitTest in the path of "~CacheLib/opt/cachelib/tests"

  1. allocator-test-AllocationClassTest - segmentation fault in "AllocationClassTest.BadFree"
  2. allocator-test-MemoryAllocatorTest - segmentation fault in "MemoryAllocatorTest.isAllocFreed"
  3. allocator-test-MM2QTest - segmentation fault in "MM2QTest.TailHits"
  4. shm-test-test_page_size - FAILED in "ShmTestPosix.PageSizesTwoMB, ShmTestSysV.PageSizesTwoMB"

On the other hand, in ubuntu 20.04, kernel 5.15 version, it was confirmed that the error occurred only in the test below after building the same.

  1. allocator-test-AllocationClassTest - segmentation fault in "AllocationClassTest.AddReleaseSlab"
  2. shm-test-test_page_size - FAILED in "ShmTestPosix.PageSizesTwoMB, ShmTestSysV.PageSizesTwoMB"

Q1. What is the recommended Linux kernel version?
Q2. How to solve tests that create segmentation faults? Don't you encounter segmentation faults?
Q3. For allocator-test-AllocationClassTest it passed in debug mode. What's the difference?

commented

Are you seeing consistent test failures with these tests? What are the outputs of the failure (and backtraces)?

We do not see 1 - 3 test failures. (4) we do see that, but that usually has to do with permission / kernel setup (cannot allocate huge pages).