[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.