← Back to team overview

openjdk team mailing list archive

[Bug 2016739] Re: No debugging symbols found when trying to debug openjdk

 

This bug was fixed in the package openjdk-17 -
17.0.7+7~us1-0ubuntu1~23.04

---------------
openjdk-17 (17.0.7+7~us1-0ubuntu1~23.04) lunar-security; urgency=medium

  * Upload to Ubuntu 23.04.

openjdk-17 (17.0.7+7~us1-0ubuntu1) mantic; urgency=medium

  * OpenJDK 17.0.7 release, build 7.
    - CVE-2023-21930, CVE-2023-21937, CVE-2023-21938, CVE-2023-21939,
      CVE-2023-21954, CVE-2023-21967, CVE-2023-21968.
    - Release notes:
      https://mail.openjdk.org/pipermail/jdk-updates-dev/2023-April/021899.html
  * d/rules: update jquery to 3.6.1.
  * d/p/*: refresh patches.
  * d/rules: pack external debug symbols with build-id, do not pack duplicate
    symbols, do not strip JVM shared libraries (LP: #2012326, LP: #2016739).
  * d/p/system-pcsclite.diff: disable built-in pcsclite version assertion.
  * d/rules: always use jtreg6.
  * d/rules: only compile google tests when with_check is enabled, disable them
    for bullseye and jammy.

 -- Vladimir Petko <vladimir.petko@xxxxxxxxxxxxx>  Sat, 06 May 2023
12:03:41 +0200

** Changed in: openjdk-20 (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-lts in Ubuntu.
https://bugs.launchpad.net/bugs/2016739

Title:
  No debugging symbols found when trying to debug openjdk

Status in openjdk-17 package in Ubuntu:
  Fix Released
Status in openjdk-20 package in Ubuntu:
  Fix Released
Status in openjdk-lts package in Ubuntu:
  Fix Released

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:

  -------------------------cut------------------------------------
   gdb /usr/lib/jvm/java-20-openjdk-amd64/bin/java
  GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
  Copyright (C) 2023 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:
  <https://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"...
  Reading symbols from /usr/lib/jvm/java-20-openjdk-amd64/bin/java...
  Reading symbols from /usr/lib/debug/.build-id/d1/6b7825e5ce53f77f4e4010b488bd3cd430ab41.debug...
  (No debugging symbols found in /usr/lib/debug/.build-id/d1/6b7825e5ce53f77f4e4010b488bd3cd430ab41.debug)

  ---------------------------------------------------------------------

  trying to use .debuginfo symbols:

  ----------------------------cut----------------------------------------------

  bsp@lunar:~$ gdb /usr/lib/jvm/java-20-openjdk-amd64/bin/java
  GNU gdb (Ubuntu 13.1-2ubuntu2) 13.1
  Copyright (C) 2023 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:
  <https://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"...
  Reading symbols from /usr/lib/jvm/java-20-openjdk-amd64/bin/java...

  warning: the debug information found in "/usr/lib/debug//usr/lib/jvm/java-20-openjdk-amd64/bin/java.debuginfo" does not match "/usr/lib/jvm/java-20-openjdk-amd64/bin/java" (CRC mismatch).
  ----------------------------------------------------------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-17/+bug/2016739/+subscriptions