WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xl create crash when using stub domains

To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Subject: Re: [Xen-devel] xl create crash when using stub domains
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 20 Sep 2011 18:34:58 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 20 Sep 2011 18:36:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E729960.2080101@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4E729960.2080101@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2
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,



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