Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Core dump when running MemoryAllocatorTest & MemoryPoolTest #361

Open
alogfans opened this issue Dec 18, 2024 · 0 comments
Open

[Bug] Core dump when running MemoryAllocatorTest & MemoryPoolTest #361

alogfans opened this issue Dec 18, 2024 · 0 comments

Comments

@alogfans
Copy link

alogfans commented Dec 18, 2024

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 alogfans changed the title Potential race in AllocationClass [Bug] Core dump when running MemoryAllocatorTest & MemoryPoolTest Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant