FALSE ALARM Re: Xen crash during boot with debug=y
Seems I did the first build with debug=n, and subsequent builds with debug=y (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
Quoted 72 lines · George Dunlap
Hm, I added some code to the
check_lock()to print whenever it was initializing, and found that the lock inpci.cwas initialized to zero.So I added some code to double-check the lock, modifying the layout of
pci.cslightly, and the problem went away.Which likely means that there's a buffer overflow somewhere clobbering the spinlock debug value. Fun, fun, fun...
-George
Quoted 57 lines · George Dunlap
I'm getting the following panic in Xen with tip when building with debug=y. It 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. Any ideas?-George
(XEN) Freed 140kB init memory.
(XEN) Xen BUG at spinlock.c:24
(XEN) ----[ Xen-3.5-unstable x86_64 debug=y Tainted: C ]---- (XEN) CPU: 0
(XEN) RIP: e008:[<ffff828c8011b7b7>]check_lock+0x3d/0x49(XEN) RFLAGS: 0000000000010046 CONTEXT: hypervisor
(XEN) rax: 0000000000000000 rbx:ffff828c8020fa68rcx: 0000000000000001 (XEN) rdx: 0000000000000000 rsi: 0000000000000001 rdi:ffff828c8020fa6c(XEN) rbp:ffff828c8028fd38rsp:ffff828c8028fd38r8: 0000000000000000 (XEN) r9: ffff828c8028fee4 r10:0000000000cfbb00r11:000000000000ffff(XEN) r12: 0000000000000286 r13: 0000000000000004 r14: 0000000000000000 (XEN) r15: 0000000000000000 cr0:000000008005003bcr4:00000000000026f0(XEN) cr3:000000012ffae000cr2:00000000c1013fe8
(XEN) ds: e021 es: e021 fs: 0000 gs: 0000 ss: 0000 cs: e008 (XEN) Xen stack trace from rsp=ffff828c8028fd38:
(XEN) ffff828c8028fd58ffff828c8011ba2f0000000000000004 0000000080000008 (XEN) 0000000000000000ffff828c801611870000000000000004ffff828c8028fdb8(XEN) 0000000000000cfcffff828c80167ba2ffff8300cf2fa0000000000000000000 (XEN) 0000000000000cfcffff828c8028fe88ffff828c8028ff280000000000000000 (XEN) ffff828c8028ff18ffff828c8016b11cffff83010000f800ffff8300cf2fa000(XEN) ffff828c8028fe78ffff828c8015e527ffff828c8028fe280000000000000282 (XEN) 0000000000000282 0000000000000286000000008028fe58ffff83012ffc6308(XEN) ffff83012feb9a80 000000000000000600000000ff750000ffff8300cf2fa000(XEN) ffff828c8028fe78ffff828c80162f66000000000000e021ffff828402000020(XEN) ffff83012feb9a80 000000000000000600000004025fd7200000000400000004 (XEN) 00000000c0603d87ffff828c8015ebf6828c801db970b948c390ed90d1ffffff(XEN) 00000000ff750000000000008011d687000000012feb9067ffff83012ffcc0e0(XEN) ffff828c8028ffed00000000ffffffff0000000000000000ffff8300cf2fa000(XEN) 000000000000000000c0bb00000000000000000000000000ffff8300cf2fa000(XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000 (XEN) 00007d737fd700b7ffff828c801db6db0000000000000000 0000000000000000 (XEN) 0000000000000000 000000000000000000000000c05f3f340000000000000cfc(XEN) 0000000000000000 0000000000000000 0000000000000000 0000000000000000 (XEN) 0000000000000000 00000000000000000000000000000cfc0000000000000000 (XEN) 00000000000000000000000d0000000000000000c0603d86000000000000e019(XEN) Xen call trace:
(XEN) [<ffff828c8011b7b7>]check_lock+0x3d/0x49
(XEN) [<ffff828c8011ba2f>]_spin_lock_irqsave+0x21/0x53
(XEN) [<ffff828c80161187>]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...