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

tcmalloc deadlock #1488

Closed
yqynju opened this issue Jul 16, 2021 · 3 comments
Closed

tcmalloc deadlock #1488

yqynju opened this issue Jul 16, 2021 · 3 comments
Labels
usage user need to change the way using brpc to solve the problem

Comments

@yqynju
Copy link

yqynju commented Jul 16, 2021

Thread 29 (Thread 0x7ee14ea5d700 (LWP 57194)):
#0 0x000055cee64a4250 in sys_futex ()
#1 0x000055cee64a4401 in base::internal::SpinLockDelay(int volatile*, int, int) ()
#2 0x000055cee64a40c0 in SpinLock::SlowLock() ()
#3 0x000055cee648cce4 in SpinLock::Lock() ()
#4 0x000055cee648cd8c in SpinLockHolder::SpinLockHolder(SpinLock*) ()
#5 0x000055cee6490ea2 in tcmalloc::CentralFreeList::ReleaseToSpans(void*) ()
#6 0x000055cee6490c82 in tcmalloc::CentralFreeList::ReleaseListToSpans(void*) ()
#7 0x000055cee649142e in tcmalloc::CentralFreeList::InsertRange(void*, void*, int) ()
#8 0x000055cee64a28a1 in tcmalloc::ThreadCache::ReleaseToCentralCache(tcmalloc::ThreadCache::FreeList*, unsigned int, int) ()
#9 0x000055cee64a2649 in tcmalloc::ThreadCache::ListTooLong(tcmalloc::ThreadCache::FreeList*, unsigned int) ()
#10 0x000055cee67c0505 in tc_free ()
#11 0x000055cee6119453 in bvar::detail::SamplerCollector::run (this=) at incubator-brpc-0.9.7/src/bvar/detail/sampler.cpp:160
#12 0x000055cee611a019 in bvar::detail::SamplerCollector::sampling_thread (arg=) at bvar/detail/sampler.cpp:103
#13 0x00007f3f8fd1ae45 in start_thread () from /lib64/libpthread.so.0
#14 0x00007f3f8f1ae26d in clone () from /lib64/libc.so.6

Thread 19 (Thread 0x7e81d6db1700 (LWP 57459)):
#0 0x000055cee64a4250 in sys_futex ()
#1 0x000055cee64a4401 in base::internal::SpinLockDelay(int volatile*, int, int) ()
#2 0x000055cee64a40c0 in SpinLock::SlowLock() ()
#3 0x000055cee648cce4 in SpinLock::Lock() ()
#4 0x000055cee648cd8c in SpinLockHolder::SpinLockHolder(SpinLock*) ()
#5 0x000055cee64a2a57 in tcmalloc::ThreadCache::IncreaseCacheLimit() ()
#6 0x000055cee64a2a09 in tcmalloc::ThreadCache::Scavenge() ()
#7 0x000055cee67c055d in tc_free ()
#8 0x000055cee612b19b in butil::ObjectPoolbthread::Butex::LocalPool::delete_local_pool (arg=0x7ee219489a80) at incubator-brpc-0.9.7/src/butil/object_pool_inl.h:141
#9 0x000055cee610fe3a in ~ThreadExitHelper (this=0x7ee2195ce860, __in_chrg=) at incubator-brpc-0.9.7/src/butil/thread_local.cpp:41
#10 butil::detail::helper_exit_global () at incubator-brpc-0.9.7/src/butil/thread_local.cpp:85
#11 0x00007f3f8f0ead49 in __run_exit_handlers () from /lib64/libc.so.6
#12 0x00007f3f8f0ead95 in exit () from /lib64/libc.so.6
#13 0x000055cee64a1eae in ShmSysAllocator::Alloc(unsigned long, unsigned long*, unsigned long) ()
#14 0x000055cee64a18dc in TCMalloc_SystemAlloc(unsigned long, unsigned long*, unsigned long) ()
#15 0x000055cee649c10d in tcmalloc::PageHeap::GrowHeap(unsigned long) ()
#16 0x000055cee649aa91 in tcmalloc::PageHeap::New(unsigned long) ()
#17 0x000055cee649187e in tcmalloc::CentralFreeList::Populate() ()
#18 0x000055cee6491677 in tcmalloc::CentralFreeList::FetchFromOneSpansSafe(int, void**, void**) ()
#19 0x000055cee6491591 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) ()
#20 0x000055cee64a24be in tcmalloc::ThreadCache::FetchFromCentralCache(unsigned int, int, void* (*)(unsigned long)) ()
#21 0x000055cee67c00c2 in tc_malloc ()

锁死不动了,多线程使用tcmalloc分配内存,插入数据。

@jzy2009
Copy link

jzy2009 commented Dec 3, 2021

遇到了同样的问题

@wangjinnana
Copy link

跟这个问题有点像https://zhuanlan.zhihu.com/p/81683409

@jzy2009
Copy link

jzy2009 commented Dec 7, 2022 via email

@wwbmmm wwbmmm added the usage user need to change the way using brpc to solve the problem label Apr 18, 2023
@wwbmmm wwbmmm closed this as completed Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage user need to change the way using brpc to solve the problem
Projects
None yet
Development

No branches or pull requests

4 participants