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

cachelib Unit Test Fail #189

Closed
shkim0413 opened this issue Jan 17, 2023 · 1 comment
Closed

cachelib Unit Test Fail #189

shkim0413 opened this issue Jan 17, 2023 · 1 comment

Comments

@shkim0413
Copy link

shkim0413 commented Jan 17, 2023

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?

@therealgymmy
Copy link
Contributor

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).

kevins981 added a commit to kevins981/CacheLib that referenced this issue Jan 31, 2023
wonglkd added a commit to wonglkd/CacheLib-1 that referenced this issue Feb 22, 2023
Change build script to pin fmt version at same version that folly uses to minimize future breaks.

_Context:_ OSS build broke between 3-5 Jan 2023, likely due to changes in folly. While switching to v9.1.0 or 9.0.0 fixes the issue at hand, it seems sensible to match folly, which specifies fmt v8.0.1: https://github.com/facebook/folly/blob/main/build/fbcode_builder/manifests/fmt

Changed it on a fresh clone of CacheLib and got it to build. (Also had to change `external_git_branch=dev` for zstd to deal with the cmake/zstd issue in facebook#194, but that should resolve when gets merged into release)

> facebook#62 @agordon: For the other packages, you'll notice we do use a specific git tag or branch… I notice `fmt` is an exception - not pinned to a specific git tag or revision - likely an omission that can be fixed.

Related CacheLib issues: facebook#186, facebook#189, facebook#107, facebook#97, facebook#62
Related CacheLib commit: 67cc11a

Last working (Jan 3): https://github.com/facebook/CacheLib/actions/runs/3826992478
First failed (Jan 5): https://github.com/facebook/CacheLib/actions/runs/3844002307/jobs/6546742348
```error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt```
facebook-github-bot pushed a commit that referenced this issue Feb 24, 2023
Summary:
Change build script to pin fmt version to same as folly's to minimize future breaks.

Pull Request resolved: #196

Test Plan:
Built successfully on a fresh clone of CacheLib. (Also had to change `external_git_branch=dev` for zstd to deal with the cmake/zstd issue in #194, but that should resolve when gets merged into release)

**Context:** OSS build broke between 3-5 Jan 2023, likely due to changes in folly. While switching to v9.1.0 or 9.0.0 fixes the issue at hand, it seems sensible to match folly, which specifies fmt v8.0.1: https://github.com/facebook/folly/blob/main/build/fbcode_builder/manifests/fmt

> #62 agordon: For the other packages, you'll notice we do use a specific git tag or branch… I notice `fmt` is an exception - not pinned to a specific git tag or revision - likely an omission that can be fixed.

Related CacheLib issues: #186, #189, #107, #97, #62
Possibly related CacheLib commit: 67cc11a

Last working (Jan 3): https://github.com/facebook/CacheLib/actions/runs/3826992478
First failed (Jan 5): https://github.com/facebook/CacheLib/actions/runs/3844002307/jobs/6546742348
Error: `error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt`

Reviewed By: therealgymmy

Differential Revision: D43517927

Pulled By: jiayuebao

fbshipit-source-id: 2d28791f7804d862b646263b96b10b835f843d8c
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

2 participants