[GDB] No socket file connection support

Bug #1901026 reported by Luis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
New
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

GDB on Ubuntu 18.04 (GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git) does not support connecting to a remote target via a socket file.

This is the error we get:

(gdb) target remote /run/user/1000/at-spi2-QTZBS0/socket
/run/user/1000/at-spi2-QTZBS0/socket: No such device or address.

Commit c1168a2f66553cd4730931cf59e3be8378a1a03f enables this in GDB. It would be nice to have it backported.

Here's the commit link: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=c1168a2f66553cd4730931cf59e3be8378a1a03f

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Can we get a test case for verifying this bug per the SRU template? [1]

[1] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template

Revision history for this message
Brian Murray (brian-murray) wrote :

It would be better to have a documented test case here, but it seems pretty straight-forward given the manual changes in the diff.

Changed in gdb (Ubuntu Bionic):
status: New → Incomplete
status: Incomplete → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Luis, or anyone else affected,

Accepted gdb into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gdb/8.1.1-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Luis (freezehawk) wrote :

I gave this a try and, unfortunately, it didn't work right. It seems there may be more patches require to make this work. I'm investigating what those are.

Revision history for this message
Luis (freezehawk) wrote :

Nevermind. I double checked the package I was using, and turns out I used an old package without the socket patch (the non-temporal sorting of packages threw me off).

Testing this on x86-64, I can now see the following:

GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) set debug remote 1
(gdb) tar rem /var/run/dbus/system_bus_socket
Remote debugging using /var/run/dbus/system_bus_socket
Sending packet: $qSupported:multiprocess+;swbreak+;hwbreak+;qRelocInsn+;fork-events+;vfork-events+;exec-events+;vContSupported+;QThreadEvents+;no-resumed+;xmlRegisters=i386#6a...Remote communication error. Target disconnected.: Connection reset by peer.

As opposed to the previous error message. So this looks good! Thanks for considering this backport.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (gdb/8.1.1-0ubuntu1)

All autopkgtests for the newly accepted gdb (8.1.1-0ubuntu1) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

linux-raspi2-5.3/5.3.0-1036.38 (armhf)
apport/2.20.9-0ubuntu7.18 (i386)
plasma-workspace/unknown (armhf)
python3.6/unknown (armhf)
python3.7/unknown (armhf, amd64)
linux-kvm/unknown (amd64)
linux-hwe-5.4/5.4.0-52.57~18.04.1 (armhf)
linux-hwe-5.0/unknown (amd64)
linux-hwe-5.0/5.0.0-62.67 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#gdb

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Luis (freezehawk) wrote :

What exactly are the regressions? I checked the logs and I don't really know how to parse them. They don't seem to be GDB tests, but rather some other components' tests.

Revision history for this message
Matthias Klose (doko) wrote :

from what I see, all these are unrelated to the bug fix, but problems with the test infrastructure.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdb - 8.1.1-0ubuntu1

---------------
gdb (8.1.1-0ubuntu1) bionic-proposed; urgency=medium

  * SRU: LP: #1902225: gdb 8.1.1 release.
    This is a minor corrective release over GDB 8.1, fixing following issues:
    - PR gdb/23028 (inconsistent disassemble of vcvtpd2dq)
    - PR gdb/23053 (Fix -D_GLIBCXX_DEBUG gdb-add-index regression)
    - PR gdb/23127 ([AArch64] GDB cannot be used for debugging software that
      uses high Virtual Addresses)
    - PR server/23158 (gdbserver no longer functional on Windows)
    - PR breakpoints/23210 ([8.1/8.2 Regression] Bogus Breakpoint address
      adjusted from 0xf7fe7dd3 to 0xfffffffff7fe7dd3)
    Already fixed in 8.1-0ubuntu3:
    - PR gdb/22824 (misleading description of new rbreak Python function in
      GDB 8.1 NEWS file)
    - PR gdb/22849 (ctrl-c doesn't work in extended-remote)
    - PR gdb/22907 ([Regression] gdbserver doesn't work with filename-only
      binaries).
  * Allow remote debugging over a Unix local domain socket. LP: #1901026.

 -- Matthias Klose <email address hidden> Fri, 30 Oct 2020 12:45:46 +0100

Changed in gdb (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gdb has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.