Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18759

gdb stops on enabling breakpoint while running

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • Qt Creator 4.3.1
    • Debugger
    • None

    Description

      I noticed this few times that when I start my C++ console app and try to click on some line to enable debugger I sometimes get error and debugger stops. This happens about 50% of a time. I see in below output there is SIGINT. I am sure I did not generated it manually or in my program.

      Here is output

      s[New Thread 0x7fffdfcba700 (LWP 24127)]
      >*running,thread-id="2"
      dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
      >=thread-created,id="3",group-id="i1"
      sThread 3 created
      >~"[New Thread 0x7fffdf4b9700 (LWP 24128)]\n"
      s[New Thread 0x7fffdf4b9700 (LWP 24128)]
      >*running,thread-id="3"
      dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
      >=thread-created,id="4",group-id="i1"
      sThread 4 created
      >~"[New Thread 0x7fffdecb8700 (LWP 24129)]\n"
      s[New Thread 0x7fffdecb8700 (LWP 24129)]
      >*running,thread-id="4"
      dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
      USB camera image with 640x480 at 30 FPS
      Entering usb image pump
      >=thread-created,id="5",group-id="i1"
      sThread 5 created
      >~"[New Thread 0x7fffdce7c700 (LWP 24133)]\n"
      s[New Thread 0x7fffdce7c700 (LWP 24133)]
      >*running,thread-id="5"
      dNOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk.
      dATTEMPT SYNC
      dATTEMPT BREAKPOINT SYNCHRONIZATION
      dTAKING OWNERSHIP OF BREAKPOINT 1 IN STATE 0
      dRUNNING NEEDS-STOP COMMAND -break-insert -f "\"camTest.cpp\":114"
      sStopping temporarily
      dState changed from InferiorRunOk(11) to InferiorStopRequested(13) [master]
      dCALL: INTERRUPT INFERIOR
      sAttempting to interrupt.
      sStop requested...
      dTRYING TO INTERRUPT INFERIOR
      dInterrupted 24122
      dBREAKPOINTS ARE NOT FULLY SYNCHRONIZED
      >~"\nThread "
      >~"1 \"camTe\" received signal SIGINT, Interrupt.\n"
      Release SDK OK
      >~"[Thread 0x7fffdecb8700 (LWP 24129) exited]\n"
      s[Thread 0x7fffdecb8700 (LWP 24129) exited]
      >=thread-exited,id="4",group-id="i1"
      sThread 4 in group i1 exited
      >~"[Thread 0x7fffdf4b9700 (LWP 24128) exited]\n"
      s[Thread 0x7fffdf4b9700 (LWP 24128) exited]
      >=thread-exited,id="3",group-id="i1"
      sThread 3 in group i1 exited
      >~"[Thread 0x7fffdfcba700 (LWP 24127) exited]\n"
      s[Thread 0x7fffdfcba700 (LWP 24127) exited]
      >=thread-exited,id="2",group-id="i1"
      sThread 2 in group i1 exited
      >~"[Thread 0x7ffff7f957c0 (LWP 24122) exited]\n"
      s[Thread 0x7ffff7f957c0 (LWP 24122) exited]
      >=thread-exited,id="1",group-id="i1"
      sThread 1 in group i1 exited
      >~"[Inferior 1 (process 24122) exited normally]\n"
      >=thread-exited,id="5",group-id="i1"
      sThread 5 in group i1 exited
      >=thread-group-exited,id="i1",exit-code="0"
      sThread group i1 exited
      dNOTE: INFERIOR EXITED
      dState changed from InferiorStopRequested(13) to InferiorShutdownOk(18) [master]
      dState changed from InferiorShutdownOk(18) to EngineShutdownRequested(19) [master]
      dQUEUE: SHUTDOWN ENGINE
      >*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",reason="exited-normally"
      dNOTE: INFERIOR STOP OK
      sStopped.
      dState changed from EngineShutdownRequested(19) to InferiorStopOk(14) [master]
      HANDLING QUEUED COMMANDS AFTER TEMPORARY STOP
      <23-break-insert -f "\"camTest.cpp\":114"
      dNOTE: INFERIOR RUN REQUESTED
      sRun requested...
      dState changed from InferiorStopOk(14) to InferiorRunRequested(10) [master]
      sRunning requested...
      <24-exec-continue
      dCALL: SHUTDOWN ENGINE
      dPLAIN ADAPTER SHUTDOWN 10
      eERROR: UNEXPECTED STATE: InferiorRunRequested WANTED: EngineShutdownRequested IN /work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1841
      dINITIATE GDBENGINE SHUTDOWN IN STATE 0, PROC: 2
      <25python theDumper.exitGdb(\{"token":25})
      >23^done,bkpt=\{number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000410092",func="GmslTest::onImageUpdate(unsigned int, unsigned int, char*)",file="/home/rob/projects/cam/src/camTest.cpp",fullname="/home/rob/projects/cam/src/camTest.cpp",line="114",thread-groups=["i1"],times="0",original-location="camTest.cpp:114"}
      
      >24^error,msg="The program is not being run."
      dNOTE: INFERIOR ILL
      dState changed from InferiorRunRequested(10) to InferiorRunFailed(12) [master]
      dState changed from InferiorRunFailed(12) to InferiorStopOk(14) [master]
      dState changed from InferiorStopOk(14) to InferiorShutdownRequested(16) [master]
      dQUEUE: SHUTDOWN INFERIOR
      >&"p 0\n"
      >~"$1 = 0"
      >~"\n"
      >^done
      >&"python theDumper.exitGdb(\{\"token\":25})\n"
      dCALL: SHUTDOWN INFERIOR
      dRUNNING NEEDS-STOP COMMAND kill
      dUNSAFE STATE FOR QUEUED COMMAND. EXECUTING IMMEDIATELY
      <26kill
      dGDB PROCESS FINISHED, status 0, exit code 0
      dNOTE: ENGINE SHUTDOWN OK
      dState changed from InferiorShutdownRequested(16) to EngineShutdownOk(21) [master]
      dState changed from EngineShutdownOk(21) to DebuggerFinished(22) [master]
      dQUEUE: FINISH DEBUGGER
      dNOTE: FINISH DEBUGGER
      dHANDLE RUNCONTROL FINISHED
      sDebugger finished.
      

       

       

      1show version
      2show debug-file-directory
      3set print object on
      4set breakpoint pending on
      5set print elements 10000
      6set unwindonsignal on
      7set width 0
      8set height 0
      9set substitute-path /var/tmp/qt-src /opt/Qt/5.9.1/gcc_64
      10set detach-on-fork off
      11python sys.path.insert(1, '/opt/Qt/Tools/QtCreator/share/qtcreator/debugger/')
      12python sys.path.append('/usr/bin/data-directory/python')
      13python from gdbbridge import *
      14python theDumper.loadDumpers(\{"token":14})
      15-interpreter-exec console "set target-async off"
      16-gdb-set environment PATH=/opt/Qt/5.9.1/gcc_64/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
      17-gdb-set environment QTDIR=/opt/Qt/5.9.1/gcc_64
      18cd /home/rob/projects/build-Cam-Desktop_Qt_5_9_1_GCC_64bit-Debug
      19-exec-arguments -d usb:0
      20-file-exec-and-symbols "/home/rob/projects/build-Cam-Desktop_Qt_5_9_1_GCC_64bit-Debug/camTest"
      21-exec-run
      23-break-insert -f "\"camTest.cpp\":114"
      24-exec-continue
      ERROR: UNEXPECTED STATE: InferiorRunRequested WANTED: EngineShutdownRequested IN /work/build/qt-creator/src/plugins/debugger/gdb/gdbengine.cpp:1841
      25python theDumper.exitGdb(\{"token":25})
      26kill
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            oxoocoffee Robert J. Gebis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes