This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23639] QtCreator stall and timeout after 40 seconds due to GDB


https://sourceware.org/bugzilla/show_bug.cgi?id=23639

--- Comment #8 from Simon Marchi <simon.marchi at ericsson dot com> ---
Hi Mark,

Not sure how familiar you are with GDB's MI protocol, but here is what I see. 
The last command that GDB successfully responded to is:

  25-stack-select-frame 0

to which the response is:

  25^done

(The 25 here is just a command id decided by the frontend, GDB just puts back
the same id in the response.  Most front-ends just use an incrementing
counter.)

The following command that hangs is:

26python
theDumper.fetchVariables({"autoderef":1,"context":"","displaystringlimit":"100","dyntype":1,"expanded":["return","inspect","local","watch"],"fancy":1,"formats":{},"nativemixed":0,"partialvar":"","passexceptions":0,"qobjectnames":1,"resultvarname":"","stringcutoff":"10000","token":26,"typeformats":{},"watchers":[]})


This executes code in the Python code provided by QtCreator, most likely this:
https://github.com/qt-creator/qt-creator/blob/master/share/qtcreator/debugger/gdbbridge.py#L651


We need to determine why it hangs.  The problem might be in GDB, or it might be
in QtCreator's Python code.  The next step I would suggest is to see if you can
reproduce the hang outside of QtCreator, by sending the exact same commands as
QtCreator sends.  According to your log file, QtCreator starts GDB like this:

  /usr/bin/gdb --tty=/tmp/QtCreator-UGutGL/outputcollector.RXzCem -i mi

though you can probably leave out the --tty part when running it by hand,
leaving us with:

  /usr/bin/gdb -i mi

Then run the MI commands mentioned in the log file.  You can extract them from
the log file with:

  grep '^<' 2018sep12b_GDB_stall_bug_single_complete_run.txt | cut -c 2-

and run them by copy pasting them in gdb's terminal (or you can probably put
them in a file and feed them to gdb's standard input).  We would expect you to
see the same hang as you see in the log file, where you never see the response
for command 26.

If you are able to reproduce the problem reliably like this, it will be much
easier to investigate than when running behind QtCreator.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]