Skip to contentSkip to conversation

gdb/systemd: enable minidebuginfo support conditionally

PATCH In review [email protected] 2 participants 5 messages Dec 5, 2023 – Jun 4, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gdb/systemd: enable minidebuginfo support conditionally

From: Etienne Cordonnier <[email protected]>

Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it.

In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as
well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen).

---
 meta/classes-global/package.bbclass           |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        | 21 +++++++++++++++++++
 meta/lib/oeqa/selftest/cases/minidebuginfo.py |  2 +-
 meta/recipes-core/systemd/systemd_254.4.bb    |  1 +
 .../elfutils/elfutils_0.189.bb                |  4 +++-
 meta/recipes-devtools/gdb/gdb-common.inc      |  4 +++-
 7 files changed, 31 insertions(+), 5 deletions(-)
meta/classes-global/package.bbclass +1 -1
index 2ad820a81f..f56bca3542 100644
@@ -234,7 +234,7 @@ python () {
         deps = ""
         for dep in (d.getVar('PACKAGE_DEPENDS') or "").split():
             deps += " %s:do_populate_sysroot" % dep
-        if d.getVar('PACKAGE_MINIDEBUGINFO') == '1':
+        if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True, False, d):
             deps += ' xz-native:do_populate_sysroot'
         d.appendVarFlag('do_package', 'depends', deps)
 
meta/lib/oe/package.py +1 -1
index f69bf9c353..9a465eaa09 100644
@@ -1239,7 +1239,7 @@ def process_split_and_strip_files(d):
         oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d)
 
     # Build "minidebuginfo" and reinject it back into the stripped binaries
-    if d.getVar('PACKAGE_MINIDEBUGINFO') == '1':
+    if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True, False, d):
         oe.utils.multiprocess_launch(inject_minidebuginfo, list(elffiles), d,
                                      extraargs=(dvar, dv, d))
 
meta/lib/oeqa/runtime/cases/systemd.py +21 -0
index 37f295492d..4c581ba396 100644
@@ -5,6 +5,7 @@
 #
 
 import re
+import threading
 import time
 
 from oeqa.runtime.case import OERuntimeTestCase
@@ -136,6 +137,26 @@ class SystemdServiceTests(SystemdTest):
             status = self.target.run('mount -oro,remount /')[0]
             self.assertTrue(status == 0, msg='Remounting / as r/o failed')
 
+    @skipIfNotFeature('minidebuginfo', 'Test requires minidebuginfo to be in DISTRO_FEATURES')
+    @OEHasPackage(['busybox'])
+    def test_systemd_coredump_minidebuginfo(self):
+        """
+        Verify that call-stacks generated by systemd-coredump contain symbolicated call-stacks,
+        extracted from the minidebuginfo metadata (.gnu_debugdata elf section).
+        """
+        t_thread = threading.Thread(target=self.target.run, args=("ulimit -c unlimited && sleep 1000",))
+        t_thread.start()
+        time.sleep(1)
+
+        status, output = self.target.run('pidof sleep')
+        # cause segfault on purpose
+        self.target.run('kill -SEGV %s' % output)
+        self.assertEqual(status, 0, msg = 'Not able to find process that runs sleep, output : %s' % output)
+
+        (status, output) = self.target.run('coredumpctl info')
+        self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' % output)
+        self.assertEqual('sleep_for_duration (busybox.nosuid' in output, True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output)
+
 class SystemdJournalTests(SystemdTest):
 
     @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
meta/lib/oeqa/selftest/cases/minidebuginfo.py +1 -1
index aa1f9fa1f7..2919f07939 100644
@@ -21,7 +21,7 @@ class Minidebuginfo(OESelftestTestCase):
         bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME', 'READELF'], image)
 
         self.write_config("""
-PACKAGE_MINIDEBUGINFO = "1"
+DISTRO_FEATURES:append = " minidebuginfo"
 IMAGE_FSTYPES = "tar.bz2"
 """)
         bitbake("{} {}:do_addto_recipe_sysroot".format(image, binutils))
meta/recipes-core/systemd/systemd_254.4.bb +1 -0
index 4d68a3266a..0c12926bef 100644
@@ -67,6 +67,7 @@ PAM_PLUGINS = " \
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux smack usrmerge polkit seccomp', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump elfutils', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', 'link-udev-shared', d)} \
meta/recipes-devtools/elfutils/elfutils_0.189.bb +3 -1
index d8bf82b022..d69828131e 100644
@@ -39,7 +39,9 @@ BUILD_CFLAGS += "-Wno-error=stringop-overflow"
 DEPENDS_BZIP2 = "bzip2-replacement-native"
 DEPENDS_BZIP2:class-target = "bzip2"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \
+                  "
 PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
 PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
 PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
meta/recipes-devtools/gdb/gdb-common.inc +3 -1
index 3349719a6b..48dbb91463 100644
@@ -30,7 +30,9 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
                 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
 "
 
-PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python"
+PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \
+                  "
 # Use --without-system-readline to compile with readline 5.
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs"
Signature · 1 line
2.34.1
#1 lore raw

Version 2 of the patch: I implemented the feedback of Richard (convert PACKAGE_MINIDEBUGINFO to a DISTRO_FEATURES), and added a runtime test. This was my local.conf used for testing (with "bitbake -v -c testimage core-image-sato"):

DISTRO_FEATURES:append = " minidebuginfo"
IMAGE_CLASSES += "testimage"
TEST_SUITES += "ping ssh systemd"

DISTRO_FEATURES:append = " systemd usrmerge" DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"

Etienne

Quoted 176 lines · On Tue, Dec 5, 2023 at 2:38 PM <[email protected]> wrote:

From: Etienne Cordonnier <[email protected]>

Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it.

In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as
well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen).

---
 meta/classes-global/package.bbclass           |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        | 21 +++++++++++++++++++
 meta/lib/oeqa/selftest/cases/minidebuginfo.py |  2 +-
 meta/recipes-core/systemd/systemd_254.4.bb    |  1 +
 .../elfutils/elfutils_0.189.bb                |  4 +++-
 meta/recipes-devtools/gdb/gdb-common.inc      |  4 +++-
 7 files changed, 31 insertions(+), 5 deletions(-)
meta/classes-global/package.bbclass +1 -1
index 2ad820a81f..f56bca3542 100644
@@ -234,7 +234,7 @@ python () {
         deps = ""
         for dep in (d.getVar('PACKAGE_DEPENDS') or "").split():
             deps += " %s:do_populate_sysroot" % dep
-        if d.getVar('PACKAGE_MINIDEBUGINFO') == '1':
+        if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True,

False, d):
deps += ' xz-native:do_populate_sysroot'
d.appendVarFlag('do_package', 'depends', deps)

meta/lib/oe/package.py +0 -0
index f69bf9c353..9a465eaa09 100644
@@ -1239,7 +1239,7 @@ def process_split_and_strip_files(d):
         oe.utils.multiprocess_launch(oe.package.runstrip, sfiles, d)
 
     # Build "minidebuginfo" and reinject it back into the stripped

binaries

meta/lib/oe/package.py +1 -1
-    if d.getVar('PACKAGE_MINIDEBUGINFO') == '1':
+    if bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', True, False,

d):
oe.utils.multiprocess_launch(inject_minidebuginfo,
list(elffiles), d,
extraargs=(dvar, dv, d))

meta/lib/oeqa/runtime/cases/systemd.py +7 -0
index 37f295492d..4c581ba396 100644
@@ -5,6 +5,7 @@
 #
 
 import re
+import threading
 import time
 
 from oeqa.runtime.case import OERuntimeTestCase
@@ -136,6 +137,26 @@ class SystemdServiceTests(SystemdTest):
             status = self.target.run('mount -oro,remount /')[0]
             self.assertTrue(status == 0, msg='Remounting / as r/o failed')
 
+    @skipIfNotFeature('minidebuginfo', 'Test requires minidebuginfo to be
 in DISTRO_FEATURES')
+    @OEHasPackage(['busybox'])
+    def test_systemd_coredump_minidebuginfo(self):
+        """
+        Verify that call-stacks generated by systemd-coredump contain
 symbolicated call-stacks,
+        extracted from the minidebuginfo metadata (.gnu_debugdata elf

section).

meta/lib/oeqa/runtime/cases/systemd.py +9 -1
+        """
+        t_thread = threading.Thread(target=self.target.run, args=("ulimit
-c unlimited && sleep 1000",))
+        t_thread.start()
+        time.sleep(1)
+
+        status, output = self.target.run('pidof sleep')
+        # cause segfault on purpose
+        self.target.run('kill -SEGV %s' % output)
+        self.assertEqual(status, 0, msg = 'Not able to find process that

runs sleep, output : %s' % output)

meta/lib/oeqa/runtime/cases/systemd.py +3 -0
+
+        (status, output) = self.target.run('coredumpctl info')
+        self.assertEqual(status, 0, msg='MiniDebugInfo Test failed: %s' %

output)
+ self.assertEqual('sleep_for_duration (busybox.nosuid' in output,
True, msg='Call stack is missing minidebuginfo symbols (functions shown as "n/a"): %s' % output)

meta/lib/oeqa/runtime/cases/systemd.py +1 -0
+
 class SystemdJournalTests(SystemdTest):
 
     @OETestDepends(['systemd.SystemdBasicTests.test_systemd_basic'])
meta/lib/oeqa/selftest/cases/minidebuginfo.py +1 -1
index aa1f9fa1f7..2919f07939 100644
@@ -21,7 +21,7 @@ class Minidebuginfo(OESelftestTestCase):
         bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME',
 'READELF'], image)
 
         self.write_config("""
-PACKAGE_MINIDEBUGINFO = "1"
+DISTRO_FEATURES:append = " minidebuginfo"
 IMAGE_FSTYPES = "tar.bz2"
 """)

bitbake("{} {}:do_addto_recipe_sysroot".format(image, binutils))

meta/recipes-core/systemd/systemd_254.4.bb +1 -0
index 4d68a3266a..0c12926bef 100644
@@ -67,6 +67,7 @@ PAM_PLUGINS = " \
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam
 selinux smack usrmerge polkit seccomp', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'coredump
 elfutils', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '',

'link-udev-shared', d)} \

meta/recipes-devtools/elfutils/elfutils_0.189.bb +0 -1
index d8bf82b022..d69828131e 100644
@@ -39,7 +39,9 @@ BUILD_CFLAGS += "-Wno-error=stringop-overflow"
 DEPENDS_BZIP2 = "bzip2-replacement-native"
 DEPENDS_BZIP2:class-target = "bzip2"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod',

'debuginfod libdebuginfod', '', d)}"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'debuginfod', 'debuginfod libdebuginfod', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES',
'minidebuginfo', 'xz', '', d)} \

meta/recipes-devtools/elfutils/elfutils_0.189.bb +1 -0
+                  "
 PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
 PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
 PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd"
meta/recipes-devtools/gdb/gdb-common.inc +0 -2
index 3349719a6b..48dbb91463 100644
@@ -30,7 +30,9 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x
--disable-werror \
                 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
 "
 
-PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES',

'debuginfod', d)} python"
+PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python \
+ ${@bb.utils.contains('DISTRO_FEATURES',
'minidebuginfo', 'xz', '', d)} \
+ "
# Use --without-system-readline to compile with readline 5. PACKAGECONFIG[readline] =
"--with-system-readline,--without-system-readline,readline"
PACKAGECONFIG[python] =
"--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs" --
2.34.1

#2 lore raw
In reply to [email protected]
Quoted 9 lines · Etienne Cordonnier via lists.openembedded.org

From: Etienne Cordonnier <[email protected]>

Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it.

In order to parse it, gdb needs xz support. Systemd needs coredump enabled, as
well as elfutil enabled as well (systemd-coredump loads libdw which is part of elfutils using dlopen).

Quoted 9 lines
---
 meta/classes-global/package.bbclass           |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        | 21 +++++++++++++++++++
 meta/lib/oeqa/selftest/cases/minidebuginfo.py |  2 +-
 meta/recipes-core/systemd/systemd_254.4.bb    |  1 +
 .../elfutils/elfutils_0.189.bb                |  4 +++-
 meta/recipes-devtools/gdb/gdb-common.inc      |  4 +++-
 7 files changed, 31 insertions(+), 5 deletions(-)

I merged this as I think it did improve things but adding a test change to poky to enable it hasn't quite worked as I hoped.

I had to put a constraint around the test to ensure it only runs on systemd images:

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=9c069e00a0867de11a6069b99a07d2c775848c10

and with that applied I then had this failure:

https://autobuilder.yoctoproject.org/typhoon/#/builders/101/builds/7000/steps/14/logs/stdio

I can queue the first patch but I'm not sure about the failure above. Any ideas?

Cheers,

Richard

#3 lore raw

Hi Richard,
I had missed your reply. I have changed my email filters so hopefully this won't happen again (still learning how to work with mailing-lists). I sent another patch fixing a regression in the test:
https://lists.openembedded.org/g/openembedded-core/message/199999
I tested core-image-sato locally today and it is working with this configuration as far as I can tell:
DISTRO="poky-altcfg"
DISTRO_FEATURES += "minidebuginfo x11"
TEST_SUITES += "ping ssh systemd"
IMAGE_CLASSES += "testimage"
MACHINE ?= "qemux86-64"

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=9c069e00a0867de11a6069b99a07d2c775848c10
is not a valid link any more, so I'm not sure which constraint you had to put to the test.

Étienne

Quoted 44 lines · Richard Purdie
Quoted 6 lines · Etienne Cordonnier via lists.openembedded.org

From: Etienne Cordonnier <[email protected]>

Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it.

In order to parse it, gdb needs xz support. Systemd needs coredump

enabled, as

Quoted 1 line

well as elfutil enabled as well (systemd-coredump loads libdw which is

part of elfutils using dlopen).

Quoted 11 lines
---
 meta/classes-global/package.bbclass           |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        | 21 +++++++++++++++++++
 meta/lib/oeqa/selftest/cases/minidebuginfo.py |  2 +-
 meta/recipes-core/systemd/systemd_254.4.bb    |  1 +
 .../elfutils/elfutils_0.189.bb                |  4 +++-
 meta/recipes-devtools/gdb/gdb-common.inc      |  4 +++-
 7 files changed, 31 insertions(+), 5 deletions(-)

I merged this as I think it did improve things but adding a test change to poky to enable it hasn't quite worked as I hoped.

I had to put a constraint around the test to ensure it only runs on systemd images:

https://urldefense.proofpoint.com/v2/url?u=https-3A__git.openembedded.org_openembedded-2Dcore_commit_-3Fh-3Dmaster-2Dnext-26id-3D9c069e00a0867de11a6069b99a07d2c775848c10&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=FLdd1vErz4ATg4RdnhSX_x1xlDw9KDG-Y9q-SbugHHxHuJmnUZaKuZxRFKFzAB_D&s=TtR0nmCl-7A-ZW0pyAbOZdeTP1CvFHG88dRcF_5szJQ&e=

and with that applied I then had this failure:

https://urldefense.proofpoint.com/v2/url?u=https-3A__autobuilder.yoctoproject.org_typhoon_-23_builders_101_builds_7000_steps_14_logs_stdio&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=FLdd1vErz4ATg4RdnhSX_x1xlDw9KDG-Y9q-SbugHHxHuJmnUZaKuZxRFKFzAB_D&s=yt0et2kFgyojvWvRCXU6ieXQ5tQNyWXUV-WEVS2rJkc&e=

I can queue the first patch but I'm not sure about the failure above. Any ideas?

Cheers,

Richard

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Hi Richard,
I found the issue. It is caused by this image using sleep from coreutils instead of sleep from busybox (which I had been testing locally). I'll send a patch.

Étienne

Quoted 90 lines · Etienne Cordonnier via lists.openembedded.org

Hi Richard,
I had missed your reply. I have changed my email filters so hopefully this won't happen again (still learning how to work with mailing-lists). I sent another patch fixing a regression in the test:
https://lists.openembedded.org/g/openembedded-core/message/199999
<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_199999&d=DwMFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=qdd1Hlh8d6ZAqV_SuHUVVv5-WB5TseS86WR_xox_uZ8&e=>
I tested core-image-sato locally today and it is working with this configuration as far as I can tell:
DISTRO="poky-altcfg"
DISTRO_FEATURES += "minidebuginfo x11"
TEST_SUITES += "ping ssh systemd"
IMAGE_CLASSES += "testimage"
MACHINE ?= "qemux86-64"

https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=9c069e00a0867de11a6069b99a07d2c775848c10
<https://urldefense.proofpoint.com/v2/url?u=https-3A__git.openembedded.org_openembedded-2Dcore_commit_-3Fh-3Dmaster-2Dnext-26id-3D9c069e00a0867de11a6069b99a07d2c775848c10&d=DwMFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=28mfjPdYEI4BDYapLnLMWe2T6_rNbG34bE__DMTng4M&e=>
is not a valid link any more, so I'm not sure which constraint you had to put to the test.

Étienne

Quoted 41 lines · Richard Purdie

On Tue, 2023-12-05 at 14:37 +0100, Etienne Cordonnier via lists.openembedded.org
<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openembedded.org&d=DwMFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=8AuyQ5J1BLj-4jsmffBD9mvb7i6mnqvH8auiQwnHvXE&e=>

Quoted 6 lines · wrote:

From: Etienne Cordonnier <[email protected]>

Enabling minidebuginfo is not useful if gdb and systemd-coredump are unable to parse it.

In order to parse it, gdb needs xz support. Systemd needs coredump

enabled, as

Quoted 1 line

well as elfutil enabled as well (systemd-coredump loads libdw which is

part of elfutils using dlopen).

Quoted 8 lines
---
 meta/classes-global/package.bbclass           |  2 +-
 meta/lib/oe/package.py                        |  2 +-
 meta/lib/oeqa/runtime/cases/systemd.py        | 21 +++++++++++++++++++
 meta/lib/oeqa/selftest/cases/minidebuginfo.py |  2 +-

meta/recipes-core/systemd/systemd_254.4.bb

<https://urldefense.proofpoint.com/v2/url?u=http-3A__systemd-5F254.4.bb&d=DwMFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=7P2Upi6dKNjBpoambsGGv6skf477wBPYY4AolklYG5w&e=>
| 1 +

Quoted 1 line

.../elfutils/elfutils_0.189.bb

<https://urldefense.proofpoint.com/v2/url?u=http-3A__elfutils-5F0.189.bb&d=DwMFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=5kNMyeQ_U4UNyFeFtERxV83Bz_bHKJmlwVy6EOZSmRA&e=>

              |  4 +++-
Quoted 2 lines
 meta/recipes-devtools/gdb/gdb-common.inc      |  4 +++-
 7 files changed, 31 insertions(+), 5 deletions(-)

I merged this as I think it did improve things but adding a test change to poky to enable it hasn't quite worked as I hoped.

I had to put a constraint around the test to ensure it only runs on systemd images:

https://urldefense.proofpoint.com/v2/url?u=https-3A__git.openembedded.org_openembedded-2Dcore_commit_-3Fh-3Dmaster-2Dnext-26id-3D9c069e00a0867de11a6069b99a07d2c775848c10&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=FLdd1vErz4ATg4RdnhSX_x1xlDw9KDG-Y9q-SbugHHxHuJmnUZaKuZxRFKFzAB_D&s=TtR0nmCl-7A-ZW0pyAbOZdeTP1CvFHG88dRcF_5szJQ&e=

and with that applied I then had this failure:

Quoted 9 lines

https://urldefense.proofpoint.com/v2/url?u=https-3A__autobuilder.yoctoproject.org_typhoon_-23_builders_101_builds_7000_steps_14_logs_stdio&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=FLdd1vErz4ATg4RdnhSX_x1xlDw9KDG-Y9q-SbugHHxHuJmnUZaKuZxRFKFzAB_D&s=yt0et2kFgyojvWvRCXU6ieXQ5tQNyWXUV-WEVS2rJkc&e=

I can queue the first patch but I'm not sure about the failure above. Any ideas?

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#200002):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_200002&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=xeU0-cUBBEcehIlkgM731a0fl7PJ_XTo290NM6mKQ_4&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_102991294_7048771&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=CWHi5m-gDJ6BmsE0O5yTj4b2LNgCtLD4yALsCMxRPHE&e=
Group Owner: [email protected] Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=lY7kf6XfROaEv_y-g411a5tUebbL0pa-5qeaDLDKhvt5DP2KQjTZSenZlRb5gPku&s=iyiTZXWj1zB0iKenrf5hCwnfalL0SPL3m-oC2lU3fD8&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-