gdb crashes upon `run` on some arm64 machines

Bug #2040113 reported by Mate Kukri
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Fix Released
Low
Unassigned
Lunar
Fix Released
Undecided
Graham Inggs

Bug Description

[ Impact ]

 * gdb 13.1 as shipped in lunar is affected by a bug where it crashes upon `run`
   on some arm64 machines (confirmed on Apple M-series, both under hypervisor
   and bare metal, everything else with PAC should also be affected).

 * It was fixed upstream in gdb 13.2: https://inbox.sourceware.org/gdb-
   <email address hidden>/.

 * Debian bookworm's gdb_13.1-3 also includes the same patch as `aarch64-pauth-
   registers.patch`.

[ Test Plan ]

 * This diff is confirmed to fix gdb 13.1 in lunar on my arm64 laptop.

 * This could be tested by running any program under lunar's gdb
   on any ARM64 PAC machine.

[ Where problems could occur ]

 * Problems aren't particularly likely as the exact patch was included in the
   last Debian stable.

 * In theory, a gdb rebuild could possibly cause breakage.

Mate Kukri (mkukri)
Changed in gdb (Ubuntu):
importance: Undecided → Low
Revision history for this message
Mate Kukri (mkukri) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "aarch64-pauth-registers.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Mate Kukri (mkukri) wrote :
description: updated
Graham Inggs (ginggs)
Changed in gdb (Ubuntu):
status: New → Fix Released
Changed in gdb (Ubuntu Lunar):
status: New → In Progress
assignee: nobody → Graham Inggs (ginggs)
Revision history for this message
Graham Inggs (ginggs) wrote :

Uploaded

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Mate, or anyone else affected,

Accepted gdb into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gdb/13.1-2ubuntu2.1 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-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. 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.

Changed in gdb (Ubuntu Lunar):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-lunar
Revision history for this message
Mate Kukri (mkukri) wrote :

I can confirm that upgrading from 13.1-2ubuntu2 to 13.1-2ubuntu2.1 makes gdb functional on my ARM64 machine.

Every program I've tried to debug previously crashed gdb immediately upon `run`. Appears to be fully functional now on a variety of binaries.

tags: added: verification-done verification-done-lunar
removed: verification-needed verification-needed-lunar
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (gdb/13.1-2ubuntu2.1)

All autopkgtests for the newly accepted gdb (13.1-2ubuntu2.1) for lunar have finished running.
The following regressions have been reported in tests triggered by the package:

linux-lowlatency/6.2.0-1018.18 (arm64)

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/lunar/update_excuses.html#gdb

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

Thank you!

Revision history for this message
Mate Kukri (mkukri) wrote :

The regression above was due to a flaky test, and seems not to be a real regression. It has passed when re-running.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdb - 13.1-2ubuntu2.1

---------------
gdb (13.1-2ubuntu2.1) lunar; urgency=medium

  [ Mate Kukri ]
  * Fixes (LP: #2040113)

  [ Emanuele Rocca ]
  * aarch64: add aarch64-pauth-registers.patch to check for valid inferior
    thread/regcache before reading pauth registers. (Closes: #1034611)

 -- Mate Kukri <email address hidden> Wed, 15 Nov 2023 13:27:25 +0000

Changed in gdb (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) 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.