oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

Whitebox tests hardcode huge page size as 2M, causing failures when system huge page size differs (e.g., 512M)

Open guodashun opened this issue 1 year ago • 0 comments

When running TBB whitebox tests, some test cases (e.g., those related to huge page memory) hardcode the huge page size as 2MB. If the system is configured with a non-2MB huge page size (e.g., 512MB or other sizes), the test assertions fail, reducing the adaptability of the test suite across environments. https://github.com/uxlfoundation/oneTBB/blob/280e32f8871699d3c107e77a8731b612b0eccd3b/test/tbbmalloc/test_malloc_whitebox.cpp#L1263 In my env, the config is:

Hugepagesize:       524288 kB
Hugetlb:               0 kB

so I got the error is:

/home/xxxxx/test/tbbmalloc/test_malloc_whitebox.cpp:xxx: FATAL ERROR: REQUIRE( allocSize == HUGE_PAGE_SIZE ) is NOT correct!
  values: REQUIRE( 536870912 == 2097152 )
  logged: Allocation size have to be aligned on Huge Page size internally.

like this issue https://github.com/uxlfoundation/oneTBB/issues/677

This issue may affect CI/CD pipelines or cloud environments where non-2MB huge pages are common. If further debugging data or testing assistance is needed, feel free to request.

guodashun avatar Mar 10 '25 07:03 guodashun