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

Failed TSAN check in RegionKVStoreTest.StorageBgPool #9090

Closed
JaySon-Huang opened this issue May 27, 2024 · 1 comment · Fixed by #9093
Closed

Failed TSAN check in RegionKVStoreTest.StorageBgPool #9090

JaySon-Huang opened this issue May 27, 2024 · 1 comment · Fixed by #9093
Labels

Comments

@JaySon-Huang
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

cmake .. -GNinja -DCMAKE_BUILD_TYPE=TSAN -DENABLE_TESTS=ON
ninja gtests_dbms tiflash -j32

./dbms/gtests_dbms --gtest_filter='*StorageBgPool*'
...
Note: Google Test filter = *StorageBgPool*
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from RegionKVStoreTest
[ RUN      ] RegionKVStoreTest.StorageBgPool
[2024/05/27 16:05:18.738 +08:00] [INFO] [TiFlashTestEnv.cpp:262] ["Clean path /DATA/disk1/jaysonhuang/tiflash-master/cmake-build-tsan/tmp/region_kvs_test for bootstrap"] [source=Test] [thread_id=1]
[2024/05/27 16:05:18.738 +08:00] [WARN] [ProxyFFI.cpp:917] ["Set mock rust ptr gc function"] [source=MockSetRustGcHelper] [thread_id=1]
[2024/05/27 16:05:18.738 +08:00] [INFO] [KVStore.cpp:70] ["KVStore inited, eager_raft_log_gc_enabled=false"] [thread_id=1]
[2024/05/27 16:05:18.739 +08:00] [INFO] [PageStorageImpl.cpp:54] ["PageStorageImpl start. Config{ PageStorageConfig {blob_file_limit_size: 268435456, blob_spacemap_type: 2, blob_heavy_gc_valid_rate: 0.500, blob_heavy_gc_valid_rate_raft_data: 0.050, blob_block_alignment_bytes: 0, wal_roll_size: 2097152, wal_max_persisted_log_files: 4} }"] [source=RegionPersister]
 [thread_id=1]
[2024/05/27 16:05:18.739 +08:00] [INFO] [PageDirectoryFactory.cpp:68] ["PageDirectory restored, max_page_id=0 max_applied_ver=0"] [source=RegionPersister] [thread_id=1]
[2024/05/27 16:05:18.739 +08:00] [INFO] [RegionPersister.cpp:381] ["RegionPersister running. Current Run Mode is ONLY_V3"] [thread_id=1]
[2024/05/27 16:05:18.739 +08:00] [INFO] [KVStore.cpp:89] ["Restored 0 regions"] [thread_id=1]
[2024/05/27 16:05:18.739 +08:00] [INFO] [KVStore.cpp:136] ["Parsed proxy config snap_handle_pool_size 4"] [thread_id=1]
[2024/05/27 16:05:18.740 +08:00] [INFO] [KVStore.cpp:384] ["Set store info id: 1234"] [thread_id=1]
[2024/05/27 16:05:18.741 +08:00] [INFO] [kvstore_helper.h:102] ["Finished setup"] [source=RegionKVStoreTest] [thread_id=1]
[2024/05/27 16:05:19.241 +08:00] [INFO] [gtest_new_kvstore.cpp:1106] ["size 2"] [thread_id=1]
/DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/KVStore/tests/gtest_new_kvstore.cpp:1108: Failure
Expected: (r) >= (sizeof(int) * 1000), actual: 0 vs 4000
[2024/05/27 16:05:19.241 +08:00] [ERROR] [Exception.cpp:96] ["std::exception. Code: 1001, type: testing::AssertionException, e.what() = /DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/KVStore/tests/gtest_new_kvstore.cpp:1108: Failure\nExpected: (r) >= (sizeof(int) * 1000), actual: 0 vs 4000"] [source="virtual void DB::tests::RegionKVStoreTest_StorageBgP
ool_Test::TestBody()"] [thread_id=1]
/DATA/disk1/jaysonhuang/tiflash-master/dbms/src/Storages/KVStore/tests/gtest_new_kvstore.cpp:1117: Failure
Failed
[2024/05/27 16:05:19.241 +08:00] [INFO] [KVStore.cpp:432] ["Destroy KVStore"] [thread_id=1]
[2024/05/27 16:05:19.241 +08:00] [INFO] [ReadIndex.cpp:371] ["KVStore shutdown, deleting read index worker"] [thread_id=1]
[2024/05/27 16:05:19.241 +08:00] [INFO] [KVStore.cpp:434] ["Destroy KVStore Finished"] [thread_id=1]
[  FAILED  ] RegionKVStoreTest.StorageBgPool (503 ms)
[----------] 1 test from RegionKVStoreTest (503 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (504 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] RegionKVStoreTest.StorageBgPool

4. What is your TiFlash version? (Required)

@JaySon-Huang JaySon-Huang added the type/bug The issue is confirmed as a bug. label May 27, 2024
@JaySon-Huang
Copy link
Contributor Author

It should be caused by jemalloc is not enabled under TSAN/ASAN and so

if (ENABLE_JEMALLOC AND (CMAKE_BUILD_TYPE_UC STREQUAL "ASAN" OR CMAKE_BUILD_TYPE_UC STREQUAL "UBSAN" OR CMAKE_BUILD_TYPE_UC STREQUAL "TSAN"))
message (WARNING "ENABLE_JEMALLOC is set to OFF implicitly: jemalloc doesn't work with ${CMAKE_BUILD_TYPE_UC}")
set (ENABLE_JEMALLOC OFF)
endif ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant