From: George Dunlap Subject: FALSE ALARM Re: Xen crash during boot with debug=y Date: Tue, 2 Jun 2009 18:36:14 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Seems I did the first build with debug=3Dn, and subsequent builds with debug=3Dy (apparently) didn't catch pci.c. Modifying the file at all caused it to be recompiled, which changed the spinkock init code properly. Second afternoon wasted chasing a didn't-make-mrproper bug... -George On Tue, Jun 2, 2009 at 6:19 PM, George Dunlap wrote: > Hm, I added some code to the check_lock() to print whenever it was > initializing, and found that the lock in pci.c was initialized to > zero. > > So I added some code to double-check the lock, modifying the layout of > pci.c slightly, and the problem went away. > > Which likely means that there's a buffer overflow somewhere clobbering > the spinlock debug value. =A0Fun, fun, fun... > > =A0-George > > On Tue, Jun 2, 2009 at 4:09 PM, George Dunlap > wrote: >> I'm getting the following panic in Xen with tip when building with >> debug=3Dy. =A0It seems to be something with the spinlock/irq >> sanity-checking code; but it doesn't make any sense, because the lock >> in question is defined statically in xen/arch/x86/pci.c, and only used >> two places in that file, with irqsave/irqrestore both times. =A0Any >> ideas? >> >> =A0-George >> >> (XEN) Freed 140kB init memory. >> (XEN) Xen BUG at spinlock.c:24 >> (XEN) ----[ Xen-3.5-unstable =A0x86_64 =A0debug=3Dy =A0Tainted: =A0 =A0C= ]---- >> (XEN) CPU: =A0 =A00 >> (XEN) RIP: =A0 =A0e008:[] check_lock+0x3d/0x49 >> (XEN) RFLAGS: 0000000000010046 =A0 CONTEXT: hypervisor >> (XEN) rax: 0000000000000000 =A0 rbx: ffff828c8020fa68 =A0 rcx: 000000000= 0000001 >> (XEN) rdx: 0000000000000000 =A0 rsi: 0000000000000001 =A0 rdi: ffff828c8= 020fa6c >> (XEN) rbp: ffff828c8028fd38 =A0 rsp: ffff828c8028fd38 =A0 r8: =A00000000= 000000000 >> (XEN) r9: =A0ffff828c8028fee4 =A0 r10: 0000000000cfbb00 =A0 r11: 0000000= 00000ffff >> (XEN) r12: 0000000000000286 =A0 r13: 0000000000000004 =A0 r14: 000000000= 0000000 >> (XEN) r15: 0000000000000000 =A0 cr0: 000000008005003b =A0 cr4: 000000000= 00026f0 >> (XEN) cr3: 000000012ffae000 =A0 cr2: 00000000c1013fe8 >> (XEN) ds: e021 =A0 es: e021 =A0 fs: 0000 =A0 gs: 0000 =A0 ss: 0000 =A0 c= s: e008 >> (XEN) Xen stack trace from rsp=3Dffff828c8028fd38: >> (XEN) =A0 =A0ffff828c8028fd58 ffff828c8011ba2f 0000000000000004 00000000= 80000008 >> (XEN) =A0 =A00000000000000000 ffff828c80161187 0000000000000004 ffff828c= 8028fdb8 >> (XEN) =A0 =A00000000000000cfc ffff828c80167ba2 ffff8300cf2fa000 00000000= 00000000 >> (XEN) =A0 =A00000000000000cfc ffff828c8028fe88 ffff828c8028ff28 00000000= 00000000 >> (XEN) =A0 =A0ffff828c8028ff18 ffff828c8016b11c ffff83010000f800 ffff8300= cf2fa000 >> (XEN) =A0 =A0ffff828c8028fe78 ffff828c8015e527 ffff828c8028fe28 00000000= 00000282 >> (XEN) =A0 =A00000000000000282 0000000000000286 000000008028fe58 ffff8301= 2ffc6308 >> (XEN) =A0 =A0ffff83012feb9a80 0000000000000006 00000000ff750000 ffff8300= cf2fa000 >> (XEN) =A0 =A0ffff828c8028fe78 ffff828c80162f66 000000000000e021 ffff8284= 02000020 >> (XEN) =A0 =A0ffff83012feb9a80 0000000000000006 00000004025fd720 00000004= 00000004 >> (XEN) =A0 =A000000000c0603d87 ffff828c8015ebf6 828c801db970b948 c390ed90= d1ffffff >> (XEN) =A0 =A000000000ff750000 000000008011d687 000000012feb9067 ffff8301= 2ffcc0e0 >> (XEN) =A0 =A0ffff828c8028ffed 00000000ffffffff 0000000000000000 ffff8300= cf2fa000 >> (XEN) =A0 =A00000000000000000 00c0bb0000000000 0000000000000000 ffff8300= cf2fa000 >> (XEN) =A0 =A00000000000000000 0000000000000000 0000000000000000 00000000= 00000000 >> (XEN) =A0 =A000007d737fd700b7 ffff828c801db6db 0000000000000000 00000000= 00000000 >> (XEN) =A0 =A00000000000000000 0000000000000000 00000000c05f3f34 00000000= 00000cfc >> (XEN) =A0 =A00000000000000000 0000000000000000 0000000000000000 00000000= 00000000 >> (XEN) =A0 =A00000000000000000 0000000000000000 0000000000000cfc 00000000= 00000000 >> (XEN) =A0 =A00000000000000000 0000000d00000000 00000000c0603d86 00000000= 0000e019 >> (XEN) Xen call trace: >> (XEN) =A0 =A0[] check_lock+0x3d/0x49 >> (XEN) =A0 =A0[] _spin_lock_irqsave+0x21/0x53 >> (XEN) =A0 =A0[] pci_conf_read+0x37/0xd0 >> (XEN) >> (XEN) >> (XEN) **************************************** >> (XEN) Panic on CPU 0: >> (XEN) Xen BUG at spinlock.c:24 >> (XEN) **************************************** >> (XEN) >> (XEN) Reboot in five seconds... >> >