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

Remote debugging using QTCreator hangs, command line GDB runs fine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • Qt Creator 4.2.0-rc1
    • Qt Creator 3.5.1
    • Debugger
    • None
    • Host PC
      Host side cross-compiler: GCC 6.1.1 (Lenaro build)
      QT: 5.1.1, QTCreator: 3.5.1
    • ac2ceb36d76186aeb13022ef6ebc785bb454e2cf

    Description

      X11 forwarding over ssh is used. Remote debugging to an ARM host (Allwinner A33 quad core ARM running Ubuntu 16.04 root filesystem) is performed. If gdbserver is launched manually on the remote target & command line GDB is used to perform the debug session, the application would launch properly and displays the QT mainwindow on the host PC.

      Remote target:

      $ gdbserver :5555 DemoApp2 
      Process DemoApp2 created; pid = 4265
      Listening on port 5555
      Remote debugging from host 192.168.7.2
      
      libEGL warning: DRI2: failed to authenticate
      Detaching from process 4272
      QXcbConnection: XCB error: 1 (BadRequest), sequence: 380, resource id: 10485763, major code: 154 (Unknown), minor code: 1
      QXcbShmImage: shmget() failed (38) for size 480000 (400x300)
      

      Host side:

      $ /opt/arm-linux-gnueabihf-v6.1.1/bin/arm-linux-gnueabihf-gdb DemoApp2 
      Reading symbols from DemoApp2...done.
      0xb6fd7a40 in _start () from /opt/arm-linux-gnueabihf-rootfs/lib/ld-linux-armhf.so.3
      (gdb) 
      (gdb) continue
      Continuing.
      Cannot parse expression `.L966 4@r4'.
      warning: Probes-based dynamic linker interface failed.
      Reverting to original interface.
      

      Contents of .gdbinit

      set debug-file-directory /opt/arm-linux-gnueabihf-rootfs/usr/lib/debug
      set sysroot /opt/arm-linux-gnueabihf-rootfs
      target remote 192.168.7.1:5555
      

      A kit was defined within QTCreator to perform the remote debugging.
      Compilation works and launching the application from within QTCreator (run button) runs the application properly with the display exported over SSH using X11 forwarding. The application output is:

      libEGL warning: DRI2: failed to authenticate
      QXcbConnection: XCB error: 1 (BadRequest), sequence: 380, resource id: 123731971, major code: 154 (Unknown), minor code: 1
      QXcbShmImage: shmget() failed (38) for size 1536000 (800x480)
      

      When debug is selected inside QTCreator, the debugger doesn't return from ' ui->setupUi(this);'. Pausing the application and inspecting the different threads, seems to point to a D-BUS problem. The code will not return from read():

      Thread #1 DemoApp
      0 read 
      1 _dbus_read
      2 ??
      Thread #2 QXcbEventReader
      0 poll
      1 ??
      Thread #7 DemoApp
      0 __libc_do_syscall
      1 __libc_fork
      2 ??
      

      Application output in QTCreator

      Debugging starts
      Listening on port 10000
      Remote debugging from host 192.168.7.2
      Process /opt/cellair/DemoAPp created; pid = 4300
      Probes-based dynamic linker interface failed.
      Reverting to original interface.
      libEGL warning: DRI2: failed to authenticate
      

      Note: No mention is now made of QXcbConnection: XCB error: 1 or QXcbShmImage: shmget() failed (38)

      Note: Launching QTCreator over ssh from the remote target works properly, even though it is too slow to perform any productive development work. It compiles the project and debugging works properly. The application output is:
      Debugging starts

      Probes-based dynamic linker interface failed.
      Reverting to original interface.
      libEGL warning: DRI2: failed to authenticate
      QXcbConnection: XCB error: 1 (BadRequest), sequence: 380, resource id: 125829123, major code: 154 (Unknown), minor code: 1
      QXcbShmImage: shmget() failed (38) for size 1536000 (800x480)
      Debugging has finished
      

      Any help in this regard will be much appreciated

      Attachments

        Issue Links

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

          Activity

            People

              hjk hjk
              frix Frikkie Thirion
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes