we have crashes of the afserver from time to time. Maybe you can help with finding the cause. This is the backtrace:
Code: Select all
#0 0x0000003752432625 in raise () from /lib64/libc.so.6
#1 0x0000003752433e05 in abort () from /lib64/libc.so.6
#2 0x0000003752470537 in __libc_message () from /lib64/libc.so.6
#3 0x0000003752475e66 in malloc_printerr () from /lib64/libc.so.6
#4 0x0000003752479904 in _int_malloc () from /lib64/libc.so.6
#5 0x000000375247a6b1 in malloc () from /lib64/libc.so.6
#6 0x00000037564bd0bd in operator new(unsigned long) () from /usr/lib64/libstdc++.so.6
#7 0x00000037564bd1d9 in operator new[](unsigned long) () from /usr/lib64/libstdc++.so.6
#8 0x0000000000488157 in af::Msg::allocateBuffer (this=0x7f4aea1c0350, i_size=16384, i_copy_len=0, i_copy_offset=12) at /workspace/cgru/afanasy/src/libafanasy/msg.cpp:109
#9 0x000000000048866c in af::Msg::Msg (this=0x7f4aea1c0350, ss=0x7f4c040040b0) at /workspace/cgru/afanasy/src/libafanasy/msg.cpp:46
#10 0x000000000046192a in processMessage (i_args=0x7f4c04004080, io_prof=0x7f4ad9d2ca40) at /workspace/cgru/afanasy/src/server/threadprocessmsg.cpp:70
#11 0x0000000000461bb1 in threadProcessMsg (i_args=<value optimized out>) at /workspace/cgru/afanasy/src/server/threadprocessmsg.cpp:52
#12 0x00000000004ad2c9 in DlThread::thread_routine (i_params=0x7f4c04023a50) at /workspace/cgru/afanasy/src/libafanasy/common/dlThread.cpp:187
#13 0x00000037528079d1 in start_thread () from /lib64/libpthread.so.0
#14 0x00000037524e89dd in clone () from /lib64/libc.so.6
Code: Select all
char * old_buffer = m_buffer;
m_buffer_size = i_size;
AFINFA("Msg::allocateBuffer(%s): trying %d bytes ( %d written at %p)", TNAMES[m_type], i_size, m_writtensize, old_buffer)
m_buffer = new char[m_buffer_size];
if( m_buffer == NULL )
{
AFERRAR("Msg::allocateBuffer: can't allocate %d bytes for buffer.", m_buffer_size)
setInvalid();
return false;
}
What can it be that the server is crashing when allocating a new buffer?