Test Build 3) New behavior if ZFS modules are built with debug symbols

goal: show zfs debug symbols are correctly built and packaged into non-
debug & debug packages.

- test packaging
- zfs built with debug symbols
- zfs modules present in debug package
- extra modules *have* .gnu_debuglink section

Test packaging, debug symbols *enabled* in zfs-dkms:

Modules are built with debug symbols, copied to debug package directory, 
and stripped before being copied into strip/non-debug package directory.

        II: dkms-build installing zfs into 
/home/ubuntu/dbgsym/unstable/debian/linux-image-unsigned-5.3.0-8-generic-dbgsym/usr/lib/debug/lib/modules/5.3.0-8-generic/kernel/zfs
 (debug symbols)
        copying zavl.ko
        stripping zavl.ko
        copying znvpair.ko
        stripping znvpair.ko
        copying zunicode.ko
        stripping zunicode.ko
        copying zcommon.ko
        stripping zcommon.ko
        copying zfs.ko
        stripping zfs.ko
        copying icp.ko
        stripping icp.ko
        copying zlua.ko
        stripping zlua.ko
        copying spl.ko
        stripping spl.ko
        II: dkms-build installing zfs into 
/home/ubuntu/dbgsym/unstable/debian/linux-modules-5.3.0-8-generic/lib/modules/5.3.0-8-generic/kernel/zfs
        signing zavl.ko
        signing znvpair.ko
        signing zunicode.ko
        signing zcommon.ko
        signing zfs.ko
        signing icp.ko
        signing zlua.ko
        signing spl.ko
        II: dkms-build build zfs complete

The ZFS modules are now present in the debug package:

        $ dpkg-deb -x linux-image-unsigned-5.3.0-8-generic-
dbgsym_5.3.0-8.9_amd64.ddeb ddeb-test-enabled

        $ ls -1 
ddeb-test-enabled/usr/lib/debug/lib/modules/5.3.0-8-generic/kernel/zfs/
        icp.ko
        spl.ko
        zavl.ko
        zcommon.ko
        zfs.ko
        zlua.ko
        znvpair.ko
        zunicode.ko

And now all modules in 'linux-modules' have the '.gnu_debuglink'
section:

        $ dpkg-deb -x linux-modules-5.3.0-8-generic_5.3.0-8.9_amd64.deb 
deb-modules
        $ find deb-modules/ -name '*.ko' | while read ko; do objdump -h -j 
.gnu_debuglink $ko >/dev/null 2>&1 || echo "Module without debug link '$ko'"; 
done
        $


The build log no longer shows ZFS modules as missing debug symbols:

        $ grep WARNING build.log 
                        echo "WARNING: Missing debug symbols for module 
'$module'."; \
        WARNING: Missing debug symbols for module 
'/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxguest.ko'.
        WARNING: Missing debug symbols for module 
'/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxsf.ko'.
        $ 

The only modules in 'linux-modules-extra' without that continue to be
virtualbox modules:

        $ dpkg-deb -x linux-modules-extra-5.3.0-8-generic_5.3.0-8.9_amd64.deb 
deb-modules-extra
        $ find deb-modules-extra/ -name '*.ko' | while read ko; do objdump -h 
-j .gnu_debuglink $ko >/dev/null 2>&1 || echo "Module without debug link 
'$ko'"; done
        Module without debug link 
'deb-modules-extra/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxguest.ko'
        Module without debug link 
'deb-modules-extra/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxsf.ko'
        $

As reflected in the kernel build log.

        $ grep WARNING build.log 
                        echo "WARNING: Missing debug symbols for module 
'$module'."; \
        WARNING: Missing debug symbols for module 
'/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxguest.ko'.
        WARNING: Missing debug symbols for module 
'/lib/modules/5.3.0-8-generic/kernel/virtualbox-guest/vboxsf.ko'.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1840704

Title:
  ZFS kernel modules lack debug symbols

Status in linux package in Ubuntu:
  In Progress

Bug description:
  The ZFS kernel modules aren't built with debug symbols,
  which introduces problems/issues for debugging/support.

  Patches are required in:

  1) linux kernel packaging, to add infrastructure to
     enable/build/strip/package debug symbols on DKMS.
     (this is sufficient with zfs-linux now in Eoan.)

  2) zfs-linux and spl-linux, for the stable releases,
     which need a few patches to enable debug symbols
     (add option './configure --enable-debuginfo' and
     '(ZFS|SPL)_DKMS_ENABLE_DEBUGINFO' to dkms.conf.)

  Initially submitting the kernel patchset for Unstable,
  for review/feedback.  It backports nicely into B/D/E,
  should it be accepted; for X (doesn't use DKMS builds)
  a simpler patch for the moment (until it does) works.

  The zfs/spl-linux patches are ready, to be submitted
  once the approach used by the kernel package settles.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1840704/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to