Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

problem with debian Buster and debugging thread in Qt5

3 réponses
Avatar
Vincent charente
--000000000000a2824f05bebcc958
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Dear All,



I am sending you this email because I encounter a problem with Debian
Buster and default Qt5 package.

I installed packages below :

Í‚· debian 10.8 x86_64 (amd64)

Í‚· apt-get install build-essentials

Í‚· apt-get install gdb

Í‚· apt-get install qt5-default

Í‚· apt-get install qtcreator



I have tried to debug an application which contains a thread with GBD but
GDB stops when thread starts. I tried to build GDB with last sources but
the problem still remains.

*This problem doesnÍ¢€™t exist with Debian 9 *with the same procedure of
installation.

You can find a simple example which increments a counter in a thread every
500ms at the URL below https://pastebin.com/WegsL9vd.



Do you know if there is a way to solve this problem ?



Best regards

--000000000000a2824f05bebcc958
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir="ltr">
<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">Dear All,</span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">͂ </span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">I am sending you this email because I
encounter a problem with Debian Buster and default Qt5 package.</span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">I installed packages below :<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="font-family:Symbol;color:rgb(31,73,125)"><span>Í‚·<span style="font:7pt &quot;Times New Roman&quot;">͂ ͂ ͂ ͂ ͂ ͂ ͂ 
</span></span></span><span style="color:rgb(31,73,125)">debian 10.8
x86_64 (amd64)<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="font-family:Symbol;color:rgb(31,73,125)"><span>Í‚·<span style="font:7pt &quot;Times New Roman&quot;">͂ ͂ ͂ ͂ ͂ ͂ ͂ 
</span></span></span><span style="color:rgb(31,73,125)">apt-get
install build-essentials<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="font-family:Symbol;color:rgb(31,73,125)"><span>Í‚·<span style="font:7pt &quot;Times New Roman&quot;">͂ ͂ ͂ ͂ ͂ ͂ ͂ 
</span></span></span><span style="color:rgb(31,73,125)">apt-get
install gdb<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="font-family:Symbol;color:rgb(31,73,125)"><span>Í‚·<span style="font:7pt &quot;Times New Roman&quot;">͂ ͂ ͂ ͂ ͂ ͂ ͂ 
</span></span></span><span style="color:rgb(31,73,125)">apt-get
install qt5-default<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="font-family:Symbol;color:rgb(31,73,125)"><span>Í‚·<span style="font:7pt &quot;Times New Roman&quot;">͂ ͂ ͂ ͂ ͂ ͂ ͂ 
</span></span></span><span style="color:rgb(31,73,125)">apt-get
install qtcreator<span></span></span></p>

<p style="margin:0cm 0cm 0.0001pt 36pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)"><span>͂ </span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">I have tried to debug an application
which contains a thread with GBD but GDB stops when thread starts. I tried to
build GDB with last sources but the problem still remains.</span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)"><u>This problem doesnÍ¢€™t exist with
Debian 9 </u>with the same procedure of installation. <br></span></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">You can find a simple example which increments a
counter in a thread every 500ms at the URL below <a href="https://pastebin.com/WegsL9vd">https://pastebin.com/WegsL9vd</a>.</span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">͂ </span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">Do you know if there is a way to solve
this problem͂ ?</span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">͂ </span><span><span></span></span></p>

<p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:&quot;Calibri&quot;,sans-serif"><span style="color:rgb(31,73,125)">Best regards</span></p>

</div>

--000000000000a2824f05bebcc958--

3 réponses

Avatar
Lisandro Damián Nicanor Pérez Meyer
Hi Vincent!
On Tue, 30 Mar 2021 at 05:29, Vincent charente wrote:
Dear All,
I am sending you this email because I encounter a problem with Debian Buster and default Qt5 package.
I installed packages below :
· debian 10.8 x86_64 (amd64)
· apt-get install build-essentials
· apt-get install gdb
· apt-get install qt5-default

This one is really not needed at all, feel free to remove it.
· apt-get install qtcreator
I have tried to debug an application which contains a thread with GBD but GDB stops when thread starts. I tried to build GDB with last sources but the problem still remains.
This problem doesn’t exist with Debian 9 with the same procedure of installation.
You can find a simple example which increments a counter in a thread every 500ms at the URL below https://pastebin.com/WegsL9vd.
Do you know if there is a way to solve this problem ?

In fact I can reproduce your issue and at the same time I can make it
work under gdb itself, so the issue seems to be in Qt Creator. I've
reproduced the issue with Qt Creator from unstable, so let me suggest
you to file a bug upstream: http://https://bugreports.qt.io Do not
forget to upload this test code, it's very straightforward and so a
nice example for an upstream issue.
--
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
Avatar
Lisandro Damián Nicanor Pérez Meyer
Hi again!
On Tue, 30 Mar 2021 at 09:55, Lisandro Damián Nicanor Pérez Meyer
wrote:

[snip]
In fact I can reproduce your issue and at the same time I can make it
work under gdb itself, so the issue seems to be in Qt Creator. I've
reproduced the issue with Qt Creator from unstable, so let me suggest
you to file a bug upstream: http://https://bugreports.qt.io Do not
forget to upload this test code, it's very straightforward and so a
nice example for an upstream issue.

Actually it is not an issue but a feature. Qt Creator is stopping the
execution when it receives a signal from gdb, in this case SIGSTOP.
Add a breakpoint inside the thread code and press F5 to start
debugging. If you accept the message and press F10 (step) some times
you will be able to reach the code.
You can tell Qt Creator to ignore the signal. Check
https://forum.qt.io/topic/100958/catching-unix-interrupt-signal-on-console-application-when-debugging-with-qtcreator/2
I've added
handle SIGSTOP pass nostop noprint
And it just worked :-)
--
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/
Avatar
Vincent charente
--000000000000cf32d505bec1b341
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi Lisandro,
Great, it works with handle SIGSTOP pass nostop noprint. I think I had
already tried but I forgot "pass".
Thank you very much
Le mar. 30 mars 2021 ̓  15:04, Lisandro Dami̓¡n Nicanor P̓©rez Meyer <
a ̓©crit :
Hi again!
On Tue, 30 Mar 2021 at 09:55, Lisandro Dami̓¡n Nicanor P̓©rez Meyer
wrote:
[snip]
In fact I can reproduce your issue and at the same time I can make it
work under gdb itself, so the issue seems to be in Qt Creator. I've
reproduced the issue with Qt Creator from unstable, so let me suggest
you to file a bug upstream: http://https://bugreports.qt.io Do not
forget to upload this test code, it's very straightforward and so a
nice example for an upstream issue.

Actually it is not an issue but a feature. Qt Creator is stopping the
execution when it receives a signal from gdb, in this case SIGSTOP.
Add a breakpoint inside the thread code and press F5 to start
debugging. If you accept the message and press F10 (step) some times
you will be able to reach the code.
You can tell Qt Creator to ignore the signal. Check
https://forum.qt.io/topic/100958/catching-unix-interrupt-signal-on-console-application-when-debugging-with-qtcreator/2
I've added
handle SIGSTOP pass nostop noprint
And it just worked :-)
--
Lisandro Dami̓¡n Nicanor P̓©rez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/

--000000000000cf32d505bec1b341
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir="ltr"><div>Hi Lisandro,</div><div><br></div><div>Great, it works with handle SIGSTOP pass nostop noprint. I think I had already tried but I forgot &quot;pass&quot;.</div><div><br></div><div>Thank you very much<br>
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le͂ mar. 30 mars 2021 ̓ ͂ 15:04, Lisandro Dami̓¡n Nicanor P̓©rez Meyer &lt;<a href="mailto:"></a>&gt; a ̓©crit͂ :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi again!<br>
<br>
On Tue, 30 Mar 2021 at 09:55, Lisandro Dami̓¡n Nicanor P̓©rez Meyer<br>
&lt;<a href="mailto:" target="_blank"></a>&gt; wrote:<br>
&gt;<br>
[snip]<br>
&gt;<br>
&gt; In fact I can reproduce your issue and at the same time I can make it<br>
&gt; work under gdb itself, so the issue seems to be in Qt Creator. I&#39;ve<br>
&gt; reproduced the issue with Qt Creator from unstable, so let me suggest<br>
&gt; you to file a bug upstream: http://<a href="https://bugreports.qt.io&quot; rel="noreferrer" target="_blank">https://bugreports.qt.io</a&gt; Do not<br>
&gt; forget to upload this test code, it&#39;s very straightforward and so a<br>
&gt; nice example for an upstream issue.<br>
<br>
Actually it is not an issue but a feature. Qt Creator is stopping the<br>
execution when it receives a signal from gdb, in this case SIGSTOP.<br>
Add a breakpoint inside the thread code and press F5 to start<br>
debugging. If you accept the message and press F10 (step) some times<br>
you will be able to reach the code.<br>
<br>
You can tell Qt Creator to ignore the signal. Check<br>
<a href="https://forum.qt.io/topic/100958/catching-unix-interrupt-signal-on-console-application-when-debugging-with-qtcreator/2" rel="noreferrer" target="_blank">https://forum.qt.io/topic/100958/catching-unix-interrupt-signal-on-console-application-when-debugging-with-qtcreator/2</a><br>
<br>
I&#39;ve added<br>
<br>
͂  handle SIGSTOP pass nostop noprint<br>
<br>
And it just worked :-)<br>
<br>
-- <br>
Lisandro Dami̓¡n Nicanor P̓©rez Meyer<br>
<a href="http://perezmeyer.com.ar/" rel="noreferrer" target="_blank">http://perezmeyer.com.ar/</a><br>
<a href="http://perezmeyer.blogspot.com/" rel="noreferrer" target="_blank">http://perezmeyer.blogspot.com/</a><br>
</div>
--000000000000cf32d505bec1b341--