evilsong / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

tcmalloc deadlock on ARM using libunwind. #629

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm seeing a very similar issue to 611 - tcmalloc deadlocks on startup.  The 
suggested workaround in that issue is to use libunwind rather than libc 
backtrace, however I am already using libunwind.

#0  0x2aecb32c in nanosleep () from /lib/libpthread.so.0
#1  0x00b42234 in base::internal::SpinLockDelay(int volatile*, int, int) ()
#2  0x00b41dd4 in SpinLock::SlowLock() ()
#3  0x00b25b70 in SpinLock::Lock() ()
#4  0x00b25bf4 in SpinLockHolder::SpinLockHolder(SpinLock*) ()
#5  0x00b4095c in tcmalloc::ThreadCache::InitModule() ()
#6  0x00b2691c in tcmalloc::ThreadCache::GetCache() ()
#7  0x00b24780 in (anonymous namespace)::do_malloc_no_errno(unsigned int) ()
#8  0x00b247d4 in (anonymous namespace)::do_malloc(unsigned int) ()
#9  0x00b242d4 in (anonymous namespace)::do_malloc_or_cpp_alloc(unsigned int) ()
#10 0x00e51f78 in tc_malloc ()
#11 0x2be2ea5c in __fopen_internal () from /lib/libc.so.6
#12 0x00b625a0 in load_debug_frame ()
#13 0x00b62e98 in locate_debug_info ()
#14 0x00b63188 in _ULarm_dwarf_find_debug_frame ()
#15 0x00b63aa4 in _ULarm_dwarf_callback ()
#16 0x2bed25c4 in dl_iterate_phdr () from /lib/libc.so.6
#17 0x00b61560 in _ULarm_find_proc_info ()
#18 0x00b677ac in fetch_proc_info ()
#19 0x00b68ab4 in _ULarm_dwarf_find_save_locs ()
#20 0x00b6494c in _ULarm_dwarf_step ()
#21 0x00b5ff38 in _ULarm_step ()
#22 0x00b4272c in GetStackTrace_libunwind(void**, int, int) ()
#23 0x00b43934 in GetStackTrace(void**, int, int) ()
#24 0x00b3bac8 in tcmalloc::RecordGrowth(unsigned int) ()
#25 0x00b3bc1c in tcmalloc::PageHeap::GrowHeap(unsigned int) ()
#26 0x00b3a588 in tcmalloc::PageHeap::New(unsigned int) ()
#27 0x00b29c58 in tcmalloc::CentralFreeList::Populate() ()
#28 0x00b29a54 in tcmalloc::CentralFreeList::FetchFromOneSpansSafe(int, void**, 
void**) ()
#29 0x00b29944 in tcmalloc::CentralFreeList::RemoveRange(void**, void**, int) ()
#30 0x00b401dc in tcmalloc::ThreadCache::FetchFromCentralCache(unsigned int, 
unsigned int) ()
#31 0x00b26730 in tcmalloc::ThreadCache::Allocate(unsigned int, unsigned int) ()
#32 0x00b246f4 in (anonymous 
namespace)::do_malloc_small(tcmalloc::ThreadCache*, unsigned int) ()
#33 0x00b24790 in (anonymous namespace)::do_malloc_no_errno(unsigned int) ()
#34 0x00b253e8 in (anonymous namespace)::cpp_alloc(unsigned int, bool) ()
#35 0x00e52188 in tc_new ()
#36 0x2ac49e24 in ?? () from 
/usr/local/Trolltech/QtEmbedded-4.7.1-arm/lib/libQtCore.so.4
#37 0x2ac49e24 in ?? () from 
/usr/local/Trolltech/QtEmbedded-4.7.1-arm/lib/libQtCore.so.4

Original issue reported on code.google.com by tere...@giskard.info on 24 Jun 2014 at 3:00

GoogleCodeExporter commented 9 years ago
Workaround for arm was posted here: 
https://groups.google.com/forum/#!searchin/google-perftools/export$20UNW_ARM_UNW
IND_METHOD$3D4

Original comment by alkondratenko on 24 Jun 2014 at 3:02