xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jeremi Piotrowski <jeremi.piotrowski@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Pry Mar <pryorm09@gmail.com>
Subject: Re: [Xen-devel] bug: unable to LZ4 decompress ub1910 installer kernel when launching domU
Date: Wed, 4 Dec 2019 08:14:33 +0100	[thread overview]
Message-ID: <20191204071433.GA5806@gentoo-tp.home> (raw)
In-Reply-To: <68a03bc4-2f75-4327-8089-f6724c1d867c@suse.com>

On Tue, Dec 03, 2019 at 09:02:18AM +0100, Jan Beulich wrote:
> On 01.12.2019 18:47, Jeremi Piotrowski wrote:
> > On Thu, Oct 24, 2019 at 10:12:19AM +0200, Jan Beulich wrote:
> >> On 23.10.2019 22:33, Pry Mar wrote:
> >>> Hello xen-devel,
> >>>
> >>> https://paste.debian.net/plain/1109374
> >>>
> >>> shows my traces from a healthy CentOS 8, xen-4.12.1 dom0 when trying
> >>> to launch a pv install of the newly released ub1910. The source is a
> >>> block-attached ISO and the kernel/ramdisk was copied off locally.
> >>
> >> Would you please increase verbosity (xl -vvv create ...) such that we
> >> can see what exactly the decompression code doesn't like about this
> >> kernel image?
> > 
> > I stumbled across the same issue, below is the xl -vvvv create output.
> > 
> > Parsing config from ubuntu.cfg
> > libxl: debug: libxl_create.c:1693:do_domain_create: Domain 0:ao 0x55a598e77190: create: how=(nil) callback=(nil) poller=0x55a598e74040
> > libxl: debug: libxl_device.c:397:libxl__device_disk_set_backend: Disk vdev=xvda spec.backend=unknown
> > libxl: debug: libxl_device.c:358:disk_try_backend: Disk vdev=xvda, backend phy unsuitable due to format qcow2
> > libxl: debug: libxl_device.c:431:libxl__device_disk_set_backend: Disk vdev=xvda, using backend qdisk
> > libxl: debug: libxl_create.c:1018:initiate_domain_create: Domain 11:running bootloader
> > libxl: debug: libxl_bootloader.c:334:libxl__bootloader_run: Domain 11:no bootloader configured, using user supplied kernel
> > libxl: debug: libxl_event.c:689:libxl__ev_xswatch_deregister: watch w=0x55a598e827a8: deregister unregistered
> > domainbuilder: detail: xc_dom_allocate: cmdline="", features=""
> > libxl: debug: libxl_dom.c:799:libxl__build_pv: pv kernel mapped 0 path /tank/xenscratch/ubuntu/vmlinuz-5.3.0-23-generic
> > domainbuilder: detail: xc_dom_kernel_file: filename="/tank/xenscratch/ubuntu/vmlinuz-5.3.0-23-generic"
> > domainbuilder: detail: xc_dom_malloc_filemap    : 11132 kB
> > domainbuilder: detail: xc_dom_boot_xen_init: ver 4.12, caps xen-3.0-x86_64 xen-3.0-x86_32p 
> > domainbuilder: detail: xc_dom_parse_image: called
> > domainbuilder: detail: xc_dom_find_loader: trying multiboot-binary loader ... 
> > domainbuilder: detail: loader probe failed
> > domainbuilder: detail: xc_dom_find_loader: trying HVM-generic loader ... 
> > domainbuilder: detail: loader probe failed
> > domainbuilder: detail: xc_dom_find_loader: trying Linux bzImage loader ... 
> > domainbuilder: detail: LZ4 decompression error: decoding failed
> 
> This suggests that the decoding logic didn't like the input. Since as
> per the other mail manual decompression works, this will likely need
> debugging by someone able to repro.
> 
> Jan

I'm able to repro, and I isolated the code from xc_dom_bzimageloader.c,
xc_dom_decompress_lz4.c and /xen/common/lz4/decompress.c such that I can
test more easily (I'm using code from 4.12.1). I'm testing with
vmlinuz-5.3.0-23-generic installed in ubuntu-19.10.

What I see is that the code fails at the first frame at decompress.c:282
(if (unlikely((unsigned long)cpy < (unsigned long)op))).
because cpy == (op - 1).
decompress.c:265 (cpy = op + length - (STEPSIZE-4);) gets executed twice and
prints:

length=4
length=3

STEPSIZE is 8 (x86_64). So this has to fail. The STEPSIZE gave me the
idea to rebuild the code as 32-bit and decompression works correctly.

Any suggestions how to proceed?

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-12-04  7:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 20:33 [Xen-devel] bug: unable to LZ4 decompress ub1910 installer kernel when launching domU Pry Mar
2019-10-24  8:12 ` Jan Beulich
2019-12-01 17:47   ` Jeremi Piotrowski
2019-12-02 14:28     ` Andy Smith
2019-12-03  8:02     ` Jan Beulich
2019-12-04  7:14       ` Jeremi Piotrowski [this message]
2019-12-04 13:10         ` Jan Beulich
2019-12-04 13:27         ` Jan Beulich
2019-12-05  1:20           ` Pry Mar
2019-12-06  6:25           ` Jeremi Piotrowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204071433.GA5806@gentoo-tp.home \
    --to=jeremi.piotrowski@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=pryorm09@gmail.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).