From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: libxl: xl create segfaults Date: Tue, 28 Sep 2010 15:27:04 +0200 Message-ID: <201009281527.05878.Christoph.Egger@amd.com> References: <201009231227.29730.Christoph.Egger@amd.com> <201009231818.06970.Christoph.Egger@amd.com> <1285261600.12843.0.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_p0eoMqPyOZbb8G0" Return-path: In-Reply-To: <1285261600.12843.0.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Gianni Tedesco Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --Boundary-00=_p0eoMqPyOZbb8G0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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] [] panic+0xa3/0x11e [ 0.004000] [] ? default_spin_lock_flags+0x9/0xd [ 0.004000] [] ? default_spin_lock_flags+0x9/0xd [ 0.004000] [] ? __const_udelay+0x42/0x44 [ 0.004000] [] setup_IO_APIC+0x9e8/0xa3d [ 0.004000] [] ? native_patch+0x1b9/0x1cb [ 0.004000] [] native_smp_prepare_cpus+0x2fd/0x38c [ 0.004000] [] kernel_init+0x71/0x1de [ 0.004000] [] kernel_thread_helper+0x4/0x10 [ 0.004000] [] ? kernel_init+0x0/0x1de [ 0.004000] [] ? 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 --Boundary-00=_p0eoMqPyOZbb8G0 Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_xl.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_xl.diff" 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); } --Boundary-00=_p0eoMqPyOZbb8G0 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_p0eoMqPyOZbb8G0--