WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Xen dom0 crash in get_phys_to_machine

On Fri, 2010-10-22 at 14:33 +0100, Alan J. Wylie wrote:
> at 14:05 on Fri 22-Oct-2010 Gianni Tedesco (gianni.tedesco@xxxxxxxxxx) wrote:
> 
> > FWIW, when I was checking for any call where pfn > max_pfn - and I got:
> > 
> >   p2m_top[0][10][104] max_pfn=0
> > 
> > The p2m seems to have been correctly initialised:
> > 
> >  xen_build_dynamic_phys_to_machine: topidx=0 mididx=375 max_pfn=192512
> > 
> > But then it looks like something is trampling max_pfn and possibly other
> > important data structures.
> 
> I've just been reading through the Documentation/development-process
> and discovered "sparse".
> 
> Five minutes ago I ran it on mmu.c and got the following interesting
> output:
> 
> /usr/src/jeremy-git-xen/arch/x86/xen/mmu.c:385:23: warning: symbol 'max_pfn' 
> shadows an earlier one
> /usr/src/jeremy-git-xen/arch/x86/include/asm/page_64_types.h:58:22: 
> originally declared here
> /usr/src/jeremy-git-xen/arch/x86/xen/mmu.c:289:47: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9: warning: 
> incorrect type in argument 1 (different address spaces)
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9:    expected 
> void const volatile [noderef] <asn:1>*<noident>
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9:    got unsigned 
> long *
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9: warning: cast 
> adds address space to expression (<asn:1>)
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9: warning: cast 
> adds address space to expression (<asn:1>)
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9: warning: cast 
> adds address space to expression (<asn:1>)
> /usr/src/jeremy-git-xen/arch/x86/include/asm/xen/page.h:84:9: warning: cast 
> adds address space to expression (<asn:1>)
> /usr/src/jeremy-git-xen/include/linux/mm.h:603:16: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/arch/x86/xen/mmu.c:1269:37: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/include/linux/mm.h:603:16: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/include/linux/mm.h:603:16: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/arch/x86/xen/mmu.c:1410:37: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/include/linux/mm.h:603:16: warning: potentially 
> expensive pointer subtraction
> /usr/src/jeremy-git-xen/arch/x86/xen/mmu.c:1684:17: error: bad constant 
> expression
> 
> Is it just a co-incidence that the first two lines refer to the same
> symbol that you have just mentioned?

Hmm, sort of, I assumed I was printing the global max_pfn but it looks
like the shadowing is deliberate (if a little thoughtless in the
naming). It does reverse my finding that 'max_pfn' (the global one) is
getting corrupted.

> I'm going to try renaming the local symbol and see if things still crash.

Sadly, I'm almost certain things will still crash. You may get more play
out of initialising the global max_pfn. But I am not sure how this code
is supposed to work and am busy with other things right now.

> The trouble is that the box I've been testing on is supposed to be our
> backup file server and is currently doing a rsync of 280GB of files
> from a 7 year old windows box. At least I'll be able to leave it
> running undisturbed over the weekend.

This happens for you after a full boot then? Mine gets as far as this:

(XEN) Freed 204kB init memory.
xen_build_dynamic_phys_to_machine: topidx=0 mididx=375 max_pfn=192512
mapping kernel into physical memory
Xen: setup ISA identity maps
xen_build_mfn_list_list: topidx=0 mididx=375
about to get started...
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.32.24-g2472a9c-dirty (scara@dt09) (gcc version 
4.5.1 20100907 (Red Hat 4.5.1-3) (GCC) ) #51 SMP Thu Oct 21 15:46:56 BST 2010
[    0.000000] Command line: ro root=/dev/sda2 console=hvc0 initcall_debug 
max_cstate=1 earlyprintk=xen
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] xen_release_chunk: looking at area pfn 9e-a0: 2 pages freed
[    0.000000] released 2 pages of unused memory
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  Xen: 0000000000000000 - 000000000009e000 (usable)
[    0.000000]  Xen: 00000000000a0000 - 0000000000100000 (reserved)
[    0.000000]  Xen: 0000000000100000 - 000000002f000000 (usable)
[    0.000000]  Xen: 00000000bf699000 - 00000000bf6af000 (reserved)
[    0.000000]  Xen: 00000000bf6af000 - 00000000bf6ce000 (ACPI data)
[    0.000000]  Xen: 00000000bf6ce000 - 00000000c0000000 (reserved)
[    0.000000]  Xen: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  Xen: 00000000fe000000 - 0000000100000000 (reserved)
[    0.000000]  Xen: 0000000240000000 - 00000002d069b000 (usable)
[    0.000000] bootconsole [xenboot0] enabled
[    0.000000] DMI 2.6 present.
[    0.000000] last_pfn = 0x2d069b max_arch_pfn = 0x400000000
[    0.000000] x86 PAT enabled: cpu 0, old 0x50100070406, new 0x7010600070106
[    0.000000] last_pfn = 0x2f000 max_arch_pfn = 0x400000000
[    0.000000] init_memory_mapping: 0000000000000000-000000002f000000
[    0.000000] init_memory_mapping: 0000000100000000-00000002d069b000
(XEN) d0:v0: unhandled page fault (ec=0000)
(XEN) Pagetable walk from ffffffff817d2030:
(XEN)  L4[0x1ff] = 0000000239003067 0000000000001003
(XEN)  L3[0x1fe] = 0000000239007067 0000000000001007
(XEN)  L2[0x00b] = 0000000000000000 ffffffffffffffff 
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
(XEN) ----[ Xen-4.1-unstable  x86_64  debug=y  Not tainted ]----
(XEN) CPU:    0
(XEN) RIP:    e033:[<ffffffff81212bbf>]
(XEN) RFLAGS: 0000000000000246   EM: 1   CONTEXT: pv guest
(XEN) rax: ffffffff817d2000   rbx: 0000000000000046   rcx: 00000000ffffffff
(XEN) rdx: 00000000deadbeef   rsi: 00000000deadbeef   rdi: 00000000deadbeef
(XEN) rbp: ffffffff813c7c58   rsp: ffffffff813c7be0   r8:  0000000000000766
(XEN) r9:  00000000ffffffff   r10: 0000000000000006   r11: ffffffff813c7c88
(XEN) r12: ffffffff8148bb87   r13: 0000000000000767   r14: 0000000000000046
(XEN) r15: 00000000ffffffff   cr0: 000000008005003b   cr4: 00000000000026f0
(XEN) cr3: 0000000239001000   cr2: ffffffff817d2030
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=ffffffff813c7be0:
(XEN)    00000000ffffffff ffffffff813c7c88 0000000000000000 ffffffff81212bbf
(XEN)    000000010000e030 0000000000010046 ffffffff813c7c28 000000000000e02b
(XEN)    ffffffff81212b13 ffffffff813c7c78 ffffffff813e7ee0 ffffffff813ffae0
(XEN)    0000000000000767 0000000000000046 00000000ffffffff ffffffff813c7c88
(XEN)    ffffffff8104c284 00000000000007ad 00000000000007ad 00000000000007ad
(XEN)    0000000000000000 ffffffff813c7ca8 ffffffff8104c2e5 ffffffff813c7ca8
(XEN)    00000000fffff853 ffffffff813c7cd8 ffffffff8104c580 ffffffff8150b55a
(XEN)    000000000000004c ffffffff813c7d08 0000000000000036 ffffffff813c7d78
(XEN)    ffffffff8104cb25 ffffffff813c7d16 0000000000000000 0000000faaaaaaaa
(XEN)    ffffffff813c7d17 302e30202020205b 00205d3030303030 0000000000000000
(XEN)    aaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaa 0000000000007ff0 0000000000000000
(XEN)    00000000deadbeef 0000000000000000 000000000153b3c5 0000000000000000
(XEN)    ffffffff813c7f60 ffffffffffffffff 0000000000000000 ffffffff813c7dd8
(XEN)    ffffffff81322650 0000000000000018 ffffffff813c7de8 ffffffff813c7da8
(XEN)    00003ffffffff000 ffffffff813c7dd8 0000000100000000 00000002d069b000
(XEN)    0000000000100000 0000000000007ff0 aaaaaaaaaaaaaaaa ffffffff813c7eb8
(XEN)    ffffffff81311686 302e30202020205b 0000000000000000 0000000100000000
(XEN)    00000002d069b000 0000000000000000 000000002f000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) Domain 0 crashed: rebooting machine in 5 seconds.


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