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

ArenaTest.UnmappedAllocation fails when "transparent hugepage" is enabled. #12351

Closed
v01dstar opened this issue Feb 14, 2024 · 0 comments
Closed
Assignees

Comments

@v01dstar
Copy link

Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev

Expected behavior

All tests pass on my desktop.

                   -`                    v01dstar@arch 
                  .o+`                   ------------- 
                 `ooo/                   OS: Arch Linux x86_64 
                `+oooo:                  Kernel: 6.7.2-arch1-2 
               `+oooooo:                 Uptime: 3 days, 57 mins 
               -+oooooo+:                Packages: 729 (pacman) 
             `/:-:++oooo+:               Shell: fish 3.7.0 
            `/++++/+++++++:              Resolution: 1440x2560, 2560x1440 
           `/++++++++++++++:             WM: i3 
          `/+++ooooooooooooo/`           Theme: Adwaita [GTK3] 
         ./ooosssso++osssssso+`          Icons: Adwaita [GTK3] 
        .oossssso-````/ossssss+`         Terminal: kitty 
       -osssssso.      :ssssssso.        CPU: AMD Ryzen 9 5900X (24) @ 3.700GHz 
      :osssssss/        osssso+++.       GPU: AMD ATI Radeon RX 6400/6500 XT/6500M 
     /ossssssss/        +ssssooo/-       GPU: NVIDIA GeForce RTX 3080 Lite Hash Rate 
   `/ossssso+/:-        -:/+osssso+-     Memory: 9632MiB / 64210MiB 
  `+sso+:-`                 `.-/+oso:
 `++:.                           `-/+/                           
 .`                                 `/                           
v01dstar@arch ~> cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

Actual behavior

ArenaTest.UnmappedAllocation fails. (It passes if I change THP to madvise or never).

Steps to reproduce the behavior

Run the test case with THP enabled (always). On my friend's Ubuntu, he also need to set sysctl -w vm.nr_hugepages=256 to reproduce the failure.

This test case expects on-demand Arena paging allocation (IIUC from the PR that introduced it), but seems, it needs to be composed conditionally based on OS, hardware's settings.

pdillinger added a commit to pdillinger/rocksdb that referenced this issue Feb 23, 2024
Summary: ... by allocating in increments (1MiB) smaller than the
typical smallest huge page size of 2MiB.

Fixes facebook#12351

Test Plan:
```
sudo bash -c 'echo "always" > /sys/kernel/mm/transparent_hugepage/enabled'
```
And see unit test fails before this change, passes after this change
pdillinger added a commit to pdillinger/rocksdb that referenced this issue Feb 23, 2024
Summary: ... by allocating in increments (1MiB) smaller than the
typical smallest huge page size of 2MiB.

Fixes facebook#12351

Test Plan:
```
sudo bash -c 'echo "always" > /sys/kernel/mm/transparent_hugepage/enabled'
```
And see unit test fails before this change, passes after this change
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

Successfully merging a pull request may close this issue.

2 participants