No debugging symbols found when trying to debug openjdk
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openjdk-17 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
openjdk-20 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
openjdk-lts (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
It is impossible to find openjdk-17 debug symbols - they are other empty or corrupted.
This is a regression over previous package version 17.0.6+10-1ubuntu2 making impossible to debug openjdk-17 issues.
The reason of the regression: missed testing.
- d/rules patches build-id using too broad wildcard and corrupts the debuginfo checksum
- dh_strip copies out debug symbol sections (which are empty due to native debug symbols = external). dh_strip also strips public symbols, which are necessary for native memory tracking LP: #2012326. The action implemented in dh_strip are unnecessary at this stage.
Proposed change:
- repack symbols in build-id format in d/rules script
- disable dh_strip (this prevents copying of debug sections and also symbol stripping)
[Test Plan]
- validate that openjdk-17 can be debugged with gdb after installing openjdk-17-jdk and openjdk-17-dbg
- validate that native memory tracking works
- validate that the installed size of openjdk-17 does not exceed that of the temurin distribution.
[ Where problems could occur ]
This covers the edge cases not in the main test plan:
- empty directories left in the debug symbols due to repack
- debuginfo files left bloating the debug package
[ Other Info ]
Disabling dh_strip also addresses LP: #2012326
Original bug report:
When trying to debug openjdk-20 following error occurs:
-------
gdb /usr/lib/
GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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:
<https:/
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/
Reading symbols from /usr/lib/
(No debugging symbols found in /usr/lib/
-------
trying to use .debuginfo symbols:
-------
bsp@lunar:~$ gdb /usr/lib/
GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
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:
<https:/
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/
warning: the debug information found in "/usr/lib/
-------
Related branches
- Graham Inggs: Pending requested
- Matthias Klose: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 119 lines (+47/-32)3 files modifieddebian/JB-jre.overrides.in (+4/-0)
debian/changelog (+2/-0)
debian/rules (+41/-32)
- Graham Inggs (community): Approve
- Matthias Klose: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 121 lines (+48/-32)3 files modifieddebian/JB-jre.overrides.in (+4/-0)
debian/changelog (+2/-0)
debian/rules (+42/-32)
- Graham Inggs (community): Approve
- Matthias Klose: Pending requested
- git-ubuntu import: Pending requested
-
Diff: 119 lines (+47/-32)3 files modifieddebian/JB-jre.overrides.in (+4/-0)
debian/changelog (+2/-0)
debian/rules (+41/-32)
CVE References
description: | updated |
description: | updated |
tags: | added: regression-proposed |
Seems to be caused by external debug symbols change LP: #2015835