All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Gianni Tedesco <gianni.tedesco@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: libxl: xl create  segfaults
Date: Tue, 28 Sep 2010 15:27:04 +0200	[thread overview]
Message-ID: <201009281527.05878.Christoph.Egger@amd.com> (raw)
In-Reply-To: <1285261600.12843.0.camel@qabil.uk.xensource.com>

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

On Thursday 23 September 2010 19:06:40 Gianni Tedesco wrote:
> On Thu, 2010-09-23 at 17:18 +0100, Christoph Egger wrote:
> > On Thursday 23 September 2010 17:55:39 Gianni Tedesco wrote:
> > > On Thu, 2010-09-23 at 11:27 +0100, Christoph Egger wrote:
> > > > Hi!
> > > >
> > > > 'xl create' crashes due to stack corruption.
> > >
> > > ---8<-------------------------------------------
> > >
> > > xl: Fix stack corruption caused by non-terminated call to
> > > libxl__xs_writev
> >
> > Confirmed. This fixes the crash. 'xl create' now hangs in a loop. I will
> > have a look at this later.
>
> Weird, did this start happening recently?

Don't know. I didn't came that far until now.

Attached patch fixes the hang. The issue is that 'xl create' tries to
start qemu-dm from a directory it isn't installed in.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


Now I can start a guest with 'xl create' but xl is still not there.
I can spot yet another bugs:

1) I can't see the full boot loader output on the guest's serial console.
The output starts when the bootloader invokes a timer.
The output coming before that is sort of skipped.

When I start the guest with 'xm' all is fine.


2) The guest crashes:

Booting "Xen-in-Xen" ends with:
(XEN) ENABLING IO-APIC IRQs
(XEN)  -> Using new ACK method
(XEN) ..TIMER: vector=0xF0 apic1=0 pin1=2 apic2=0 pin2=0
(XEN) ..MP-BIOS bug: 8254 timer not connected to IO-APIC
(XEN) ...trying to set up timer (IRQ0) through the 8259A ...
(XEN) ..... (found pin 0) ... failed.
(XEN) ...trying to set up timer as Virtual Wire IRQ... failed.
(XEN) ...trying to set up timer as ExtINT IRQ... failed :(.
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) IO-APIC + timer doesn't work!  Boot with apic=debug and send a report.  
Then try booting with the 'noapic' 
option****************************************
(XEN)
(XEN) Reboot in five seconds...

Booting a Linux guest ends with:
[    0.004000] Setting APIC routing to physical flat
[    0.004000] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=0 pin2=0
[    0.004000] ..MP-BIOS bug: 8254 timer not connected to IO-APIC
[    0.004000] ...trying to set up timer (IRQ0) through the 8259A ...
[    0.004000] ..... (found apic 0 pin 0) ...
[    0.004000] ....... failed.
[    0.004000] ...trying to set up timer as Virtual Wire IRQ...
[    0.004000] ..... failed.
[    0.004000] ...trying to set up timer as ExtINT IRQ...
[    0.004000] ..... failed :(.
[    0.004000] Kernel panic - not syncing: IO-APIC + timer doesn't work!  Boot 
with apic=debug and send a report.  Then try booting with the 'noapic' 
option.
[    0.004000]
[    0.004000] Pid: 1, comm: swapper Not tainted 2.6.34 #2
[    0.004000] Call Trace:
[    0.004000]  [<ffffffff816055ad>] panic+0xa3/0x11e
[    0.004000]  [<ffffffff81028db4>] ? default_spin_lock_flags+0x9/0xd
[    0.004000]  [<ffffffff81028db4>] ? default_spin_lock_flags+0x9/0xd
[    0.004000]  [<ffffffff812303d5>] ? __const_udelay+0x42/0x44
[    0.004000]  [<ffffffff81df9a14>] setup_IO_APIC+0x9e8/0xa3d
[    0.004000]  [<ffffffff81028d26>] ? native_patch+0x1b9/0x1cb
[    0.004000]  [<ffffffff81df52b0>] native_smp_prepare_cpus+0x2fd/0x38c
[    0.004000]  [<ffffffff81de9606>] kernel_init+0x71/0x1de
[    0.004000]  [<ffffffff8100ab24>] kernel_thread_helper+0x4/0x10
[    0.004000]  [<ffffffff81de9595>] ? kernel_init+0x0/0x1de
[    0.004000]  [<ffffffff8100ab20>] ? kernel_thread_helper+0x0/0x10

The guests boot fine when I start them with 'xm create'.

Christoph



-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_xl.diff --]
[-- Type: text/x-diff, Size: 515 bytes --]

diff -r b9c1e8968a98 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Sep 23 12:37:48 2010 +0200
+++ b/tools/libxl/libxl.c	Tue Sep 28 15:11:30 2010 +0200
@@ -1732,7 +1732,7 @@ retry_transaction:
         goto out_close;
     if (!rc) { /* inner child */
         libxl__exec(null, logfile_w, logfile_w,
-                   libxl__abs_path(&gc, info->device_model, libxl_private_bindir_path()),
+                   libxl__abs_path(&gc, info->device_model, libxl_libexec_path()),
                    args);
     }
 

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

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

  reply	other threads:[~2010-09-28 13:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 10:27 libxl: xl create segfaults Christoph Egger
2010-09-23 15:55 ` Gianni Tedesco
2010-09-23 16:18   ` Christoph Egger
2010-09-23 17:06     ` Gianni Tedesco
2010-09-28 13:27       ` Christoph Egger [this message]
2010-10-01 17:41         ` Stefano Stabellini

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=201009281527.05878.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=gianni.tedesco@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.