xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: r: (1, 'Internal error', 'panic: xc_dom_core.c:273: xc_dom_do_gunzip: inflate failed (rc=-3)').. only on Intel hardware and only under 32-bit dom0
Date: Tue, 21 Feb 2012 08:59:35 +0000	[thread overview]
Message-ID: <1329814775.25232.13.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <20120220183207.GA7170@phenom.dumpdata.com>

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

On Mon, 2012-02-20 at 18:32 +0000, Konrad Rzeszutek Wilk wrote:
[...]
> sh-4.1# xm create /mnt/lab/latest/test.xm 
> Using config file "/mnt/lab/latest/test.xm".
> Error: (1, 'Internal error', 'panic: xc_dom_core.c:273:
> xc_dom_do_gunzip: inflate failed (rc=-3)')

-3 == ESRCH? Seems unlikely...

Aha, in this context it is the return value of inflate() and therefore
it is Z_DATA_ERROR.

> And only on Intel.. and only if it is a 32-bit dom0. If I do the same
> test with a 64-bit dom0 I do not see this problem.

Different decompression libraries in your root filesystems perhaps? Can
you decompress the bzImage by hand? (perhaps using the attached bzeplode
to extract the compressed data payload)

Does it work with xl?

> Any thoughts of what it might be or what I should try out? My thought
> was to swap out the hypervisor (use a Xen 4.0) or unstable and see if
> I get the same result.

It is unlikely to be the hypervisor, more likely to be one of the
userspace components of the toolstack.

> But maybe there is something obvious out there?
> 


[-- Attachment #2: bzexplode.c --]
[-- Type: text/x-csrc, Size: 1251 bytes --]

#include <stdio.h>
#include <fcntl.h>
#include <stdint.h>
#include <unistd.h>

#include <inttypes.h>

#include <err.h>

#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>

int main(int argc, char **argv)
{
	int fd;
	struct stat sb;
	void *p;
	uint8_t *hdr;
	int setup_sectors;
	uint32_t compressed_payload_offset;
	uint32_t compressed_payload_length;

	if (argc != 2)
		errx(1, "usage: bzexplode <bzImage>");

	fd = open(argv[1], O_RDONLY);
	if (fd < 0)
		err(1, "open");

	if (fstat(fd, &sb) < 0)
		err(1, "fstat");

	p = mmap(0, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
	if (p == MAP_FAILED)
		err(1, "mmap");

	hdr = p;
	setup_sectors = hdr[0x1f1];
	compressed_payload_offset = *(uint32_t*)&hdr[0x248];

	fprintf(stderr, "setup sectors %d\n", setup_sectors);

	compressed_payload_offset += (setup_sectors+1) * 512;

	//compressed_payload_length = *(uint32_t*)(p + compressed_payload_offset - 4);
	compressed_payload_length = *(uint32_t*)&hdr[0x24c];

	fprintf(stderr, "compressed_payload_offset %"PRIx32" (abs)\n",
		compressed_payload_offset);
	fprintf(stderr, "compressed_payload_length %"PRIx32"\n",
		compressed_payload_length);

	write(1,
	      p + compressed_payload_offset,
	      compressed_payload_length);
	return 0;
}

[-- Attachment #3: Type: text/plain, Size: 132 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xensource.com/xen-devel

  reply	other threads:[~2012-02-21  8:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 18:32 r: (1, 'Internal error', 'panic: xc_dom_core.c:273: xc_dom_do_gunzip: inflate failed (rc=-3)').. only on Intel hardware and only under 32-bit dom0 Konrad Rzeszutek Wilk
2012-02-21  8:59 ` Ian Campbell [this message]
2012-02-23 14:15   ` Konrad Rzeszutek Wilk
2012-02-21 14:14 ` Jan Beulich
2012-02-23 14:16   ` Konrad Rzeszutek Wilk

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=1329814775.25232.13.camel@dagon.hellion.org.uk \
    --to=ian.campbell@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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).