Skip to content

Commit b3a0f9b

Browse files
[#16813] docdb: Remove SegmentedQueue from LockfreeTest.QueuePerformance
Summary: This test was meant to measure the performance of various lockfree queues in libcds. It seems that SegmentedQueue calls `delete` with a size on gcc11, but the size does not match what was allocated. This causes tcmalloc to segfault with the following error: ``` size check failed 160 32 3 ``` This queue is not used anywhere else in our code, so it should be fine to remove it from this test. I also opened an issue with libcds here: khizmax/libcds#181. Jira: DB-6160 Test Plan: `ybd --gcc11 --cxx_test lockfree-test --gtest_filter="LockfreeTest.QueuePerformance"` Reviewers: sergei Reviewed By: sergei Subscribers: yql, ybase Differential Revision: https://phorge.dev.yugabyte.com/D27843
1 parent a0b3e60 commit b3a0f9b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/yb/util/lockfree-test.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,11 @@ class QueuePerformanceHelper {
281281
cds::container::optimistic_queue::make_traits<OptAllocator>::type>>(
282282
"OptimisticQueue/BlockAllocator/DHP");
283283
TestQueue<cds::container::RWQueue<ptrdiff_t>>("RWQueue");
284-
TestQueue<cds::container::SegmentedQueue<cds::gc::HP, ptrdiff_t>>("SegmentedQueue/16", 16);
285-
TestQueue<cds::container::SegmentedQueue<cds::gc::HP, ptrdiff_t>>("SegmentedQueue/128", 128);
284+
// On GCC11, segmented queue seems to call sized delete with a different size than it allocates
285+
// with, which causes a segfault in tcmalloc.
286+
// See issue https://github.com/khizmax/libcds/issues/181.
287+
// TestQueue<cds::container::SegmentedQueue<cds::gc::HP, ptrdiff_t>>("SegmentedQueue/16", 16);
288+
// TestQueue<cds::container::SegmentedQueue<cds::gc::HP, ptrdiff_t>>("SegmentedQueue/128", 128);
286289
TestQueue<cds::container::VyukovMPMCCycleQueue<ptrdiff_t>>("VyukovMPMCCycleQueue", 50000);
287290
}
288291
private:

0 commit comments

Comments
 (0)