facebook / CacheLib

Pluggable in-process caching engine to build and scale high performance services
https://www.cachelib.org
Apache License 2.0
1.18k stars 254 forks source link

allocator-test-AllocationClassTest Failed On ARM #276

Closed Svelar closed 1 month ago

Svelar commented 10 months ago

Describe the bug When I ran unit tests on ARM server, I found that some of them are failed while X86 platform was working fine. Such as 'ReleaseSlabMultithread' of 'allocator-test-AllocationClassTest', it leads to core dumped. BTW, it won't cause core dumped but result error in GDB or single-core environment. After taking a look at source code, I observed that something bad happened between asynchronously free 500 allocs and get firstSlabReleaseContext. I just assume that it is because difference of memory consistency model. ARM is WMO, maybe lack of memory barrier in this situation. (free operation doesn't lock completely) Cuz I'm not so familiar with whole project, seek guys' advice here.

To Reproduce Steps to reproduce the behavior:

  1. Build unit tests
  2. Run 'allocator-test-AllocationClassTest'
  3. See 'core dumped''

Expected behavior PASS all tests.

Screenshots image

Server (please complete the following information):

therealgymmy commented 1 month ago

closing old issues