Bug 1990209

Summary: libguestfs breaks under kernel 5.13
Product: [Community] Virtualization Tools Reporter: Toolybird <toolybird>
Component: superminAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mhicks, ptoscano, rjones, tmpm697, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-06 07:09:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
quickcheck output
none
0001-initrd-Support-ztd-compressed-modules.patch none

Description Toolybird 2021-08-05 03:39:35 UTC
Created attachment 1811085 [details]
quickcheck output

Host is Arch Linux with kernel recently upgraded to 5.13.x

libguestfs is stable 1.44.1

libguestfs no longer works for me as seen by the attached output of libguestfs-test-tool. Something is going wrong with module loading and I'm not sure why. e.g:

supermin: internal insmod crc32-pclmul.ko.zst
[    0.140028] Module has invalid ELF structures
insmod: init_module: crc32-pclmul.ko.zst: Invalid module format
supermin: internal insmod crc32c-intel.ko.zst
[    0.140984] Module has invalid ELF structures
insmod: init_module: crc32c-intel.ko.zst: Invalid module format


Downgrade to kernel 5.12.x and everything works again. Any ideas?

Full output attached. Thanks.

Comment 1 Toolybird 2021-08-05 04:02:17 UTC
Actually, I just noticed that Arch switched module compression type from xz to zstd in the kernel config (as of 5.13.x).

zstd is included in the appliance. Does libguestfs need tweaking to accommodate zstd compressed modules?

Comment 2 Toolybird 2021-08-05 04:13:09 UTC
> Does libguestfs need tweaking to accommodate zstd compressed modules?

I'm guessing it's actually supermin that needs tweaking. See code in src/mode_build.ml

Comment 3 Richard W.M. Jones 2021-08-05 07:17:47 UTC
Created attachment 1811118 [details]
0001-initrd-Support-ztd-compressed-modules.patch

Yes I think supermin will need to be changed to support
zstd modules.  We discussed this with the Fedora community
too recently.

Please try the attached patch.

Comment 4 Toolybird 2021-08-05 21:37:32 UTC
> Please try the attached patch

Yep, works fine. Thanks!

Comment 5 Richard W.M. Jones 2021-08-06 07:09:27 UTC
Upstream in https://github.com/libguestfs/supermin/commit/4306a131c6cde92f8d0a2dd9376f4096ee538eff

I notified the Arch maintainer yesterday.

Comment 6 tmpm697 2021-08-21 05:53:04 UTC
It gave me "make[3]: *** No rule to make target 'supermin.1', needed by 'all-am'.  Stop." when try to build latest upstream supermin.

Comment 7 Richard W.M. Jones 2021-08-21 07:37:21 UTC
I added a workaround upstream:

https://github.com/libguestfs/supermin/commit/1b7b091cc10c9afa9a342a0d467bd8271034e44f

But really you need to install the perldoc tools.