简体   繁体   中英

GDB No locals error in backtrace

I have an application which has custom implementation of HTTP Server It uses HTTPRequest class to parse HTTP Request, RequestHandler class to handle calls and disconnection events. The server is multithreaded but Scanner object is single threaded.

Application keep crashing at random interval so i am unable to reproduce this error, Since it is running at production level, I cannot make minor changes for debugging, I also tried to test using apache bench ab with 100 parallel request but no crashes.

I searched for same error but found nothing. The scanner object is always alive never destroyed. So What does the below stacktrace mean?

backtrace:#0  0x000000000040909c in Scanner::stopScanner (this=0x0) at ../src/scanner.cpp:118
No locals.
#1  0x00000000004146b2 in RequestHandler::disconnected (this=0x9ac1c0) at ../src/requesthandler.cpp:100
No locals.
#2  0x0000000000417721 in RequestHandler::qt_static_metacall (_o=0x9ac1c0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fff7fffe300) at moc_requesthandler.cpp:83
        _t = 0x9ac1c0
#3  0x00007ffff396f01a in QMetaObject::activate(QObject*, int, int, void**) () from /root/libs/libQt5Core.so.5
No symbol table info available.
#4  0x000000000041732f in HTTPRequest::disconnected (this=0x7fff6c00c8d0) at moc_httprequest.cpp:203
No locals.
#5  0x00000000004119ce in HTTPRequest::tcpdisconnected (this=0x7fff6c00c8d0) at ../src/qfoobar/httpserver/httprequest.cpp:183
No locals.
#6  0x0000000000416dce in HTTPRequest::qt_static_metacall (_o=0x7fff6c00c8d0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff7fffe500) at moc_httprequest.cpp:126
        _t = 0x7fff6c00c8d0
#7  0x00007ffff396f01a in QMetaObject::activate(QObject*, int, int, void**) () from /root/libs/libQt5Core.so.5
No symbol table info available.
#8  0x00007ffff42fcaa8 in QAbstractSocket::disconnectFromHost() () from /root/libs/libQt5Network.so.5
No symbol table info available.
#9  0x00007ffff42fb439 in ?? () from /root/libs/libQt5Network.so.5
No symbol table info available.
#10 0x00007ffff42fb8cc in ?? () from /root/libs/libQt5Network.so.5
No symbol table info available.
#11 0x00007ffff430520f in ?? () from /root/libs/libQt5Network.so.5
No symbol table info available.
#12 0x00007ffff746d2b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /root/libs/libQt5Widgets.so.5
No symbol table info available.
#13 0x00007ffff7470c86 in QApplication::notify(QObject*, QEvent*) () from /root/libs/libQt5Widgets.so.5
No symbol table info available.
#14 0x00007ffff393ce24 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /root/libs/libQt5Core.so.5
No symbol table info available.
#15 0x00007ffff3996bc2 in ?? () from /root/libs/libQt5Core.so.5
No symbol table info available.
#16 0x00007ffff1ed6e04 in g_main_context_dispatch () from /root/libs/libglib-2.0.so.0
No symbol table info available.
#17 0x00007ffff1ed7048 in ?? () from /root/libs/libglib-2.0.so.0
No symbol table info available.
#18 0x00007ffff1ed70ec in g_main_context_iteration () from /root/libs/libglib-2.0.so.0
No symbol table info available.
#19 0x00007ffff39975e4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /root/libs/libQt5Core.so.5
No symbol table info available.
#20 0x00007ffff393b04b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /root/libs/libQt5Core.so.5
No symbol table info available.
#21 0x00007ffff370277a in QThread::exec() () from /root/libs/libQt5Core.so.5
No symbol table info available.
#22 0x0000000000414a52 in HTTPRequestHandler::run (this=0x9ac1c0) at ../src/qfoobar/httpserver/httprequesthandler.cpp:30
No locals.
#23 0x00007ffff3708434 in ?? () from /root/libs/libQt5Core.so.5
No symbol table info available.
#24 0x00007ffff23ef182 in start_thread () from /root/libs/libpthread.so.0
No symbol table info available.
#25 0x00007ffff2e0847d in clone () from /root/libs/libc.so.6
No symbol table info available.

Here's the problem:

Scanner::stopScanner (this=0x0)

So your stopScanner method is being invoked with not-an-object. Just below that you can see RequestHandler::disconnected (this=0x9ac1c0) so it seems that the disconnected method is calling stopScanner with a null Scanner pointer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM