[meta-freescale] image-prelink (can) cause SIGSEGV on program startup (when run under GDB)

Julio Cruz Barroso julio.cruz at smartmatic.com
Fri Mar 25 19:54:27 PDT 2016


Hi Cody,

I suggest to evaluate your debugger with a simple project and add your code gradually.

In my case, after isolating all the code, I found that the root cause was a bad definition of QSharePointer.

If you find with the same root cause, you could refer to the source code at https://github.com/jcsistemas2001/testQtPointer. A detailed description about this issue at https://forum.qt.io/topic/65422/qsharedpointer-qregistermetatype-gdb-and-slots/4

Regards

Julio

From: meta-freescale-bounces at yoctoproject.org [mailto:meta-freescale-bounces at yoctoproject.org] On Behalf Of Cody Tudor
Sent: Saturday, March 26, 2016 6:31 AM
To: meta-freescale at yoctoproject.org
Subject: [meta-freescale] image-prelink (can) cause SIGSEGV on program startup (when run under GDB)

Hello Julio,

> The root cause of the SIGSEGV was a bad smart pointer in one application. After fixed it, the segmentation is gone.

What was the end solution? Was it in your application or somewhere else?


> On 19 March 2016 at 12:40, Julio Cruz Barroso <julio.cruz at smartmatic.com<https://lists.yoctoproject.org/listinfo/meta-freescale>> wrote:

> Hi Bjørn, Christian,

>

> I'm trying to perform a remote debug with a Qt Application (as you described below).

>

> The GDB (at QT Creator) show a Segmentation Fault at dl-debug.c [1]. Basically, the same situation.

>

> I performed the following steps:

>

> - Sync to the latest jethro revision

> - Delete tmp directory

> - Rebuild SD image

> - Rebuild SDK installer (bitbake my-image -c populate_sdk). 'my-image'

> inherit populate_sdk_qt5

We have run into the same issue when remotely debugging our Qt app on a Jethro device with Qt 5.5.1. Qt Creator receives SIGSEGV from the device and breaks at line 51 in dl-debug.c because the pointer ‘r’ for structure type _r_debug is not to a valid structure pointer (i.e. the device tries to de-reference the pointer r which is invalid). All of this happens before main() is ever reached.

I cannot for the life of me find where this breaks in our Jethro build. If I roll back to Fido everything is peachy. Trying jethro-next branches where appropriate did not help.

Any help you could provide would be greatly appreciated.


> However, another signal was received (and maybe others already received it) when trying to debug (GDB) something linked with openssl.

If you are debugging using Qt Creator your can add: 'handle SIGILL pass nostop noprint' without the single quotes to the Additional Startup Commands in the Tools->Options->Debugger->GDB. This will skip over the SIGILL sent at start from libcrypto.so. It will also skip over any other SIGILL received so it is quite a dirty solution.

Regards,

-Cody Tudor



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20160326/9674ed18/attachment.html>


More information about the meta-freescale mailing list