Signal MemFault: Error: Signal SIGSEGV (memory violation)
-
Hello all,
I have been lurking this forum for some time now and I am running into a Segmentation Fault problem.
I understand that Segmentation Fault happen when the application tried to access memory that doesn't belong to it, or pointing to invalid pointer, or a pointer that contains invalid value somewhere.I've been coding in QT from some years now and I currently have an application that run QT 4.8.4 on a power PC for many years.
At the beginning it was running QT 4.5.2 and everything is great, same for QT 4.8.4Since then, we (the company I'm working for) have created a new platform running on a ARM processor with Standard Linux 3.14.26
And now we are running into problem. Fast forward many months and the application is now strip to bare bone, basically receive an event from a QTCPSocket (our instrument) and update a label on the screen. Plus I have a QTimer to update the Date and Time to the screen. This application will run between 4 to 14 days, then return with a SEG FAULT for no reason. Well there is a reason, but this is what I need to find. Same code will run on POWER PC for months without any problem.Same code, it's slightly different because of the little / big endian, but essentially the same code.
I don't suspect than somebody has the solution here, put if some of you SMART guy can point me in a direction that I may have overlook or something to look into that will be great.
Below is a dump of the back trace (myApp), I also have a MAP file to tried to look into the mem. address, put it's pointing nowhere.
Sorry for the long post, and thank you all for this great forum
Later,- Sebastien
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "myApp: Signal Getpid: 1590"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "myApp: Signal Signum: 11"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: myApp: Signal MemFault: Error: Signal SIGSEGV (memory violation)
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: myApp: Signal MemFault: Faulty address:
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: myApp:Unknown reason
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "myApp:Stack frames:37"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 0:/release/bin/myApp() [0x35504]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 1:/lib/libc.so.6(__default_sa_restorer_v2+0) [0xb5e35ba0]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 2:/usr/lib/libQtGuiE.so.4(_ZNK15QPlastiqueStyle10metaObjectEv+0x1c) [0xb6d4dcb4]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 3:/usr/lib/libQtCoreE.so.4(_ZNK11QMetaObject4castEP7QObject+0x20) [0xb629b7d0]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 4:/usr/lib/libQtGuiE.so.4(_ZN6QLabel10paintEventEP11QPaintEvent+0x2e4) [0xb6aebdb8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 5:/usr/lib/libQtGuiE.so.4(_ZN7QWidget5eventEP6QEvent+0x614) [0xb678679c]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 6:/usr/lib/libQtGuiE.so.4(_ZN6QFrame5eventEP6QEvent+0x24) [0xb6ae72d0]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 7:/usr/lib/libQtGuiE.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x98) [0xb6736df8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 8:/usr/lib/libQtGuiE.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x3e4) [0xb673bcc4]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 9:/usr/lib/libQtCoreE.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x74) [0xb62946b8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 10:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore+0x294) [0xb6782d74]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 11:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiPK14QWindowSurfaceP8QPainterP19QWidgetBackingStore+0x314) [0xb6783700]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 12:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiPK14QWindowSurfaceP8QPainterP19QWidgetBackingStore+0x234) [0xb6783620]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 13:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiPK14QWindowSurfaceP8QPainterP19QWidgetBackingStore+0x234) [0xb6783620]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 14:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore+0x158) [0xb6782c38]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 15:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate22paintSiblingsRecursiveEP12QPaintDeviceRK5QListIP7QObjectEiRK7QRegionRK6QPointiPK14QWindowSurfaceP8QPainterP19QWidgetBackingStore+0x314) [0xb6783700]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 16:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore+0x158) [0xb6782c38]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 17:/usr/lib/libQtGuiE.so.4(+0x374300) [0xb691c300]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 18:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate16syncBackingStoreEv+0x80) [0xb67769f8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 19:/usr/lib/libQtGuiE.so.4(_ZN7QWidget5eventEP6QEvent+0xdcc) [0xb6786f54]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 20:/usr/lib/libQtGuiE.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x98) [0xb6736df8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 21:/usr/lib/libQtGuiE.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x3e4) [0xb673bcc4]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 22:/usr/lib/libQtCoreE.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x74) [0xb62946b8]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 23:/usr/lib/libQtCoreE.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x4d0) [0xb62982d0]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 24:/usr/lib/libQtCoreE.so.4(+0x1ac56c) [0xb62c856c]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 25:/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x18c) [0xb58374a0]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 26:/usr/lib/libglib-2.0.so.0(+0x3380c) [0xb583780c]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 27:/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x40) [0xb5837bcc]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 28:/usr/lib/libQtCoreE.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x4c) [0xb62c8934]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 29:/usr/lib/libQtGuiE.so.4(+0x20bd68) [0xb67b3d68]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 30:/usr/lib/libQtCoreE.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x40) [0xb6292d54]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 31:/usr/lib/libQtCoreE.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x10c) [0xb6292fb4]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 32:/usr/lib/libQtCoreE.so.4(_ZN16QCoreApplication4execEv+0x88) [0xb6298580]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 33:/release/bin/myApp() [0x3644c]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 34:/release/bin/myApp() [0x37528]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 35:/release/bin/myApp() [0x13ad4]"
Sep 16 10:38:42 theUser user.err myApp: [ERROR] myApp: "BackTrace 36:/lib/libc.so.6(__libc_start_main+0x110) [0xb5e1cb10]" -
Hi and welcome to devnet,
Might be a silly question but did you check for memory leaks ?
-
Thank you for the welcome
Yes I did; on both platform, everything is quite stable. I should have mentioned this in my post.
Let me see if I can find more of the Backtrace dump...Sometime, it will crash in...
QPlastiqueStyle metaObject
QFrame metaObject
QLabel metaObjectHere's another one...
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 0:/release/bin/theApp() [0x31974]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 1:/lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0xb5f18bc0]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 2:/usr/lib/libQtGuiE.so.4(_ZNK6QFrame10metaObjectEv+0x1c) [0xb6e33fb4]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 3:/usr/lib/libQtCoreE.so.4(_ZNK11QMetaObject4castEP7QObject+0x20) [0xb637e7d0]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 4:/usr/lib/libQtGuiE.so.4(_ZNK14QWidgetPrivate15paintBackgroundEP8QPainterRK7QRegioni+0x40) [0xb686007c]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 5:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate10drawWidgetEP12QPaintDeviceRK7QRegionRK6QPointiP8QPainterP19QWidgetBackingStore+0x69c) [0xb686617c]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 6:/usr/lib/libQtGuiE.so.4(+0x373fd8) [0xb69fefd8]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 7:/usr/lib/libQtGuiE.so.4(_ZN14QWidgetPrivate16syncBackingStoreEv+0x80) [0xb68599f8]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 8:/usr/lib/libQtGuiE.so.4(_ZN7QWidget5eventEP6QEvent+0xdcc) [0xb6869f54]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 9:/usr/lib/libQtGuiE.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0x98) [0xb6819df8]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 10:/usr/lib/libQtGuiE.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0x3e4) [0xb681ecc4]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 11:/usr/lib/libQtCoreE.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0x74) [0xb63776b8]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 12:/usr/lib/libQtCoreE.so.4(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x4d0) [0xb637b2d0]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 13:/usr/lib/libQtCoreE.so.4(+0x1ac56c) [0xb63ab56c]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 14:/usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x18c) [0xb591a4a0]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 15:/usr/lib/libglib-2.0.so.0(+0x3380c) [0xb591a80c]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 16:/usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x40) [0xb591abcc]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 17:/usr/lib/libQtCoreE.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x4c) [0xb63ab934]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 18:/usr/lib/libQtGuiE.so.4(+0x20bd68) [0xb6896d68]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 19:/usr/lib/libQtCoreE.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x40) [0xb6375d54]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 20:/usr/lib/libQtCoreE.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x10c) [0xb6375fb4]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 21:/usr/lib/libQtCoreE.so.4(_ZN16QCoreApplication4execEv+0x88) [0xb637b580]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 22:/release/bin/theApp() [0x139c8]"
Jul 8 23:20:55 theUser user.err theApp: [ERROR] theApp: "BackTrace 23:/lib/libc.so.6(__libc_start_main+0x110) [0xb5effb10]" -
I've used the login into SSH and then the "top" command, left them running for days, to see anything unusual
and I also looked into the "proc mem info".
Later,
- Seb