I commented out a section of code and managed to get it to compile. I
looked in that code and I found a spot where we were allocating memory in
an array and we for whatever reason were allocating outsize of the max size
of the array. Why didn't this ever break with the other allocators beats
me. It wasn't even because I was "lucky". I have ran hundreds of tests
maxing out 64gb of memory with deallocation/allocation within the program.
At least it works now.
On Wednesday, November 7, 2012 2:46:25 PM UTC-8, Quintin Cummins wrote:
> I'll try my best to explain what is going on, not sure where to post this
> since I can't quite figure out what the root cause of the issue is.
> I updated an old release of my code base to use tcmalloc and it works
> fine. Updating a newer release of the same code base I am having issues
> with seg faults.
> Old Release libraries:
> - boost, activemq
> Newer Release libraries
> - boost, activemq, and thread building blocks
> My main question is what my problem is, obviously there isn't enough
> information for that probably. So instead has anyone had any issues using
> tcmalloc with some of these libraries. Where it exactly segfaults is within
> activemq when it tries to create a second connection. This works fine with
> any other allocator...
> Any directions on where to look would also be great.
> Quintin
> And maybe this will be useful if someone knows anything about activemq:
> #0 tcmalloc::CentralFreeList::RemoveRange (this=0xab1cee0,
> start=0x7fffffffd250, end=0x7fffffffd258, N=6)
> at src/central_freelist.cc:271
> #1 0x00000000004c31d2 in tcmalloc::ThreadCache::FetchFromCentralCache
> (this=0xac290c0, cl=<optimized out>, byte_size=128)
> at src/thread_cache.cc:162
> #2 0x00000000006b1e7b in Allocate (cl=<optimized out>, size=<optimized
> out>, this=<optimized out>) at src/thread_cache.h:341
> #3 do_malloc (size=<optimized out>) at src/tcmalloc.cc:1068
> #4 cpp_alloc (nothrow=false, size=120) at src/tcmalloc.cc:1354
> #5 tc_new (size=120) at src/tcmalloc.cc:1530
> #6 0x00000000005beb89 in
> activemq::connector::openwire::OpenWireFormatFactory::createWireFormat
> (this=<optimized out>,
> properties=...) at
> activemq/connector/openwire/OpenWireFormatFactory.cpp:67
> #7 0x0000000000557e6f in
> activemq::connector::openwire::OpenWireConnector::OpenWireConnector
> (this=0xac88d00, transport=0xac7edd0,
> properties=...) at
> activemq/connector/openwire/OpenWireConnector.cpp:125
> #8 0x0000000000507834 in
> activemq::connector::openwire::OpenWireConnectorFactory::createConnector
> (this=<optimized out>,
> properties=..., transport=0xac7edd0) at
> activemq/connector/openwire/OpenWireConnectorFactory.cpp:34
> #9 0x00000000004d4439 in
> activemq::core::ActiveMQConnectionFactory::createConnection
> (url="tcp://spc:61616",
> username=<optimized out>, password=<optimized out>,
> clientId=<optimized out>) at activemq/core/ActiveMQConnectionFactory.cpp:152
> #10 0x00000000004d4c07 in
> activemq::core::ActiveMQConnectionFactory::createConnection (this=0xac8efc0)
> at activemq/core/ActiveMQConnectionFactory.cpp:69
> #11 0x0000000000473120 in AMQMessageHandler::RunMessageLoop
> (this=0xac94208, connectionURL="") at src/amq-message-handler.cpp:130