- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am seeing code that allocates an std::string on the stack result in the CPU spinning at 100% within TBB's scalable_malloc(). The same issue was described in this post from last year:
http://software.intel.com/en-us/forums/topic/278331
The stack trace looks as follows:
#0 0x00002b6411b861e9 in rml::internal::Block::privatizePublicFreeList() () from ./libtbbmalloc.so.2
#1 0x00002b6411b868e3 in rml::internal::Bin::getPublicFreeListBlock() () from ./libtbbmalloc.so.2
#2 0x00002b6411b87e00 in rml::internal::internalPoolMalloc(rml::internal::MemoryPool*, unsigned long) () from ./libtbbmalloc.so.2
#3 0x00002b6411b880d6 in scalable_malloc () from ./libtbbmalloc.so.2
#4 0x00002b6411da4279 in operator new(unsigned long) () from ./libtbbmalloc_proxy.so.2
#5 0x00002b641500b8f9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) () from /opt/spotdev/3rdParty/cpp/gnu/gcc/gcc-4.6.2/lib64/libstdc++.so.6
Any ideas or suggestions to further debug?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
What are operation system and TBB versions in your case?
Thanks,
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is on CentOS 5.6 64 bit (kernel 2.6.18-238.9.1.el5) and TBB 4.0.5.1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How often the hang occurs? Can it be reproduced with debug version of allocator?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The 100% CPU and the crash are two different issues (I should've clarified). I just reproduced the crash with the debug version. Here is the stack trace:
#0 0x00002b26bca4045f in rml::internal::Block::allocateFromFreeList (this=0x2aaafc2ec000) at ../../src/tbbmalloc/frontend.cpp:1774
result = 0x1
#1 0x00002b26bca4080a in rml::internal::Block::allocate (this=0x2aaafc2ec000) at ../../src/tbbmalloc/frontend.cpp:1802
result = 0x2b26c19e9980
#2 0x00002b26bca3ece3 in rml::internal::internalPoolMalloc (memPool=0x2b26bcc4b940 <rml::internal::defaultMemPool_space>, size=32) at ../../src/tbbmalloc/frontend.cpp:2075
result = 0x2aaaf251d018
bin = 0x2b26c19e99d0
mallocBlock = 0x2aaafc2ec000
#3 0x00002b26bca3f603 in rml::internal::internalMalloc (size=32) at ../../src/tbbmalloc/frontend.cpp:2156
No locals.
#4 0x00002b26bca3f7b9 in scalable_malloc (size=32) at ../../src/tbbmalloc/frontend.cpp:2394
ptr = 0x2aaaf251d038
#5 0x00002b26bcc601e6 in operator new (sz=32) at ../../src/tbbmalloc/proxy.cpp:166
res = 0x2aaaf251d018
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page