View Full Version : qt 4.6.3 coredump - sig abort - help!

26th November 2012, 17:48
RE: Linux RedHat 5.7
Qt 4.6.3

Please see stack trace at bottom - Getting a sig abort from trying to allocate 65K

This is a very strange error that happens sporadically but often. Perhaps once day.
The machine we are running on has 8GM of memory. My process does not have a memory leak.
We have other processes using more memory than the process in question and they are allocating memory.

As you can see by the stack trace below it was only trying to allocate 65K and it failed.
The readFromSocket() and readNotification() calls occur constantly in this process, as it is a server
constantly reading data from various clients via a socket. The coredump occurs entirely
in qt calls.

The stack trace shows that QByteArray is called a few times, which means during the course of the life
of this process QByteArray is getting called repeatedly, thousands and thousands of times.
I am wondering if I am having a memory fragementation issues, from memory being allocated and freed
on a continuous basis. But, I am not sure.

I am not sure how to attack or resolved or prevent this problems. Any ideas ?
Please fire away!

We are thinking of upgrading to the latest qt4 at 4.8 as a solution ?!??

Program received signal SIGABRT, Aborted.
0x00917410 in __kernel_vsyscall ()
(gdb) frame 7
#7 0x03c379ad in qMalloc (size=65536) at global/qmalloc.cpp:36
in global/qmalloc.cpp
(gdb) backtrace
#0 0x00917410 in __kernel_vsyscall ()
#1 0x00b87df0 in raise () from /lib/libc.so.6
#2 0x00b89701 in abort () from /lib/libc.so.6
#3 0x00bc03ab in __libc_message () from /lib/libc.so.6
#4 0x00bc6b18 in malloc_consolidate () from /lib/libc.so.6
#5 0x00bc8e37 in _int_malloc () from /lib/libc.so.6
#6 0x00bcafb7 in malloc () from /lib/libc.so.6
#7 0x03c379ad in qMalloc (size=65536) at global/qmalloc.cpp:36
#8 0x03c404b0 in QByteArray::realloc (this=0x83c53e4, alloc=65516) at tools/qbytearray.cpp:1393
#9 0x03c408af in QByteArray::resize (this=0x83c53e4, size=32768) at tools/qbytearray.cpp:1361
#10 0x006df165 in QRingBuffer::reserve (this=0x8470e54, bytes=4100) at ../../include/QtCore/private/../../../src/corelib/tools/qringbuffer_p.h:139
#11 0x006d8cfe in QAbstractSocketPrivate::readFromSocket (this=0x8470d78) at socket/qabstractsocket.cpp:1139
#12 0x006d90df in QAbstractSocketPrivate::canReadNotification (this=0x8470d78) at socket/qabstractsocket.cpp:595
#13 0x006df5e1 in QAbstractSocketPrivate::readNotification (this=0x8470d78) at socket/qabstractsocket_p.h:58
#14 0x006c721b in QAbstractSocketEngine::readNotification (this=0x83c5a78) at socket/qabstractsocketengine.cpp:135
#15 0x006c83cf in QReadNotifier::event (this=0x6, e=0xbfff27c0) at socket/qnativesocketengine.cpp:1078
#16 0x00e690ef in QApplicationPrivate::notify_helper (this=0x83ae558, receiver=0x83c5728, e=0xbfff27c0) at kernel/qapplication.cpp:4283
#17 0x00e6c79e in QApplication::notify (this=0xbfffc808, receiver=0x83c5728, e=0xbfff27c0) at kernel/qapplication.cpp:3687
#18 0x03d44e0b in QCoreApplication::notifyInternal (this=0xbfffc808, receiver=0x83c5728, event=0xbfff27c0) at kernel/qcoreapplication.cpp:707
#19 0x03d7246f in sendEvent (source=0x83b0360) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:196
#20 socketNotifierSourceDispatch (source=0x83b0360) at kernel/qeventdispatcher_glib.cpp:91
#21 0x0029e372 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#22 0x002a1366 in ?? () from /lib/libglib-2.0.so.0
#23 0x002a18be in g_main_context_iteration () from /lib/libglib-2.0.so.0
#24 0x03d72518 in QEventDispatcherGlib::processEvents (this=0x83ae938, flags=...) at kernel/qeventdispatcher_glib.cpp:393
#25 0x03d43ddd in QEventLoop::processEvents (this=0xbfff2980, flags=...) at kernel/qeventloop.cpp:130
#26 0x03d4416d in QEventLoop::exec (this=0xbfff2980, flags=...) at kernel/qeventloop.cpp:182
#27 0x03d45fd1 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:984
#28 0x00e68877 in QApplication::exec () at kernel/qapplication.cpp:3562
#29 0x080519c0 in main (argc=Cannot access memory at address 0x1d8a
) at OmsMsgProc.cpp:23


Fred B.