CacheLib icon indicating copy to clipboard operation
CacheLib copied to clipboard

[Bug] Core dump when running MemoryAllocatorTest & MemoryPoolTest

Open alogfans opened this issue 1 year ago • 0 comments

I want to use CacheLib with a ARM64 machine, however, it failed to complete unit tests related to AllocationClass:

[==========] Running 20 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 20 tests from AllocationClassTest
[ RUN      ] AllocationClassTest.Basic
[       OK ] AllocationClassTest.Basic (1 ms)
[ RUN      ] AllocationClassTest.AllocFree
[       OK ] AllocationClassTest.AllocFree (40 ms)
[ RUN      ] AllocationClassTest.BadFree
[       OK ] AllocationClassTest.BadFree (40 ms)
[ RUN      ] AllocationClassTest.AddReleaseSlab
[       OK ] AllocationClassTest.AddReleaseSlab (77 ms)
[ RUN      ] AllocationClassTest.CurrentSlabRelease
[       OK ] AllocationClassTest.CurrentSlabRelease (5 ms)
[ RUN      ] AllocationClassTest.SlabReleaseAbort
[       OK ] AllocationClassTest.SlabReleaseAbort (5 ms)
[ RUN      ] AllocationClassTest.SlabReleaseAllFree
[       OK ] AllocationClassTest.SlabReleaseAllFree (6 ms)
[ RUN      ] AllocationClassTest.ReleaseSlabWithActiveAllocations
[       OK ] AllocationClassTest.ReleaseSlabWithActiveAllocations (6 ms)
[ RUN      ] AllocationClassTest.ReleaseSlabMultithread
Core dumped

After our investigation, we believe the problem is caused by the wrong use (or even the incorrect implementation) of folly::DistributedMutex. By replacing it with std::mutex avoids core dump, but it is just for temporary rather than production.

alogfans avatar Dec 18 '24 02:12 alogfans