All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: xl create crash when using stub domains
Date: Tue, 20 Sep 2011 18:34:58 -0700	[thread overview]
Message-ID: <4E793F42.7070803@goop.org> (raw)
In-Reply-To: <4E729960.2080101@goop.org>

On 09/15/2011 05:33 PM, Jeremy Fitzhardinge wrote:
> When I create an HVM domain with stubdom enabled, it crashes at:
>
> (gdb) run create  -c /etc/xen/f14hv64  vcpus=4 xen_platform_pci=0 'boot="d"'
> Starting program: /usr/sbin/xl create  -c /etc/xen/f14hv64  vcpus=4 xen_platform_pci=0 'boot="d"'
> [Thread debugging using libthread_db enabled]
> Parsing config file /etc/xen/f14hv64
> xc: info: VIRTUAL MEMORY ARRANGEMENT:
>   Loader:        0000000000100000->000000000017b9ec
>   TOTAL:         0000000000000000->000000003f800000
>   ENTRY ADDRESS: 0000000000100000
> xc: info: PHYSICAL MEMORY ALLOCATION:
>   4KB PAGES: 0x0000000000000200
>   2MB PAGES: 0x00000000000001fb
>   1GB PAGES: 0x0000000000000000
> xc: error: panic: xc_dom_bzimageloader.c:588: xc_dom_probe_bzimage_kernel: kernel is not a bzImage: Invalid kernel
> Detaching after fork from child process 26888.
> [New Thread 0x7ffff7342700 (LWP 26889)]
> [Thread 0x7ffff7342700 (LWP 26889) exited]
> [New Thread 0x7ffff7342700 (LWP 26921)]
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff7bbbec5 in libxl__wait_for_device_model (gc=0x7fffffffdbb0, 
>     domid=22, state=0x7ffff7bc1b8c "running", starting=0x623760, 
>     check_callback=0, check_callback_userdata=0x0) at libxl_device.c:555
> 555	    if (starting && starting->for_spawn->fd > xs_fileno(xsh))
> (gdb) bt

This patch seems to fix it, but I don't know if it is a real fix or just
papering over something else.

    J

diff -r 7779e12cc99e tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c	Tue Aug 16 17:05:18 2011 -0700
+++ b/tools/libxl/libxl_device.c	Tue Sep 20 18:23:03 2011 -0700
@@ -552,7 +552,7 @@
     tv.tv_sec = LIBXL_DEVICE_MODEL_START_TIMEOUT;
     tv.tv_usec = 0;
     nfds = xs_fileno(xsh) + 1;
-    if (starting && starting->for_spawn->fd > xs_fileno(xsh))
+    if (starting && starting->for_spawn && starting->for_spawn->fd > xs_fileno(xsh))
         nfds = starting->for_spawn->fd + 1;
 
     while (rc > 0 || (!rc && tv.tv_sec > 0)) {
@@ -586,7 +586,7 @@
         free(p);
         FD_ZERO(&rfds);
         FD_SET(xs_fileno(xsh), &rfds);
-        if (starting)
+        if (starting && starting->for_spawn)
             FD_SET(starting->for_spawn->fd, &rfds);
         rc = select(nfds, &rfds, NULL, NULL, &tv);
         if (rc > 0) {
@@ -597,7 +597,7 @@
                 else
                     goto again;
             }
-            if (starting && FD_ISSET(starting->for_spawn->fd, &rfds)) {
+            if (starting && starting->for_spawn && FD_ISSET(starting->for_spawn->fd, &rfds)) {
                 unsigned char dummy;
                 if (read(starting->for_spawn->fd, &dummy, sizeof(dummy)) != 1)
                     LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_DEBUG,

  reply	other threads:[~2011-09-21  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16  0:33 xl create crash when using stub domains Jeremy Fitzhardinge
2011-09-21  1:34 ` Jeremy Fitzhardinge [this message]
2011-09-21  8:56   ` Ian Campbell
2011-09-21 23:06     ` Jeremy Fitzhardinge
2011-09-22  6:23       ` Ian Campbell
2011-09-27 17:04     ` Ian Jackson

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=4E793F42.7070803@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.