[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] RE: [PATCH] mem_sharing: fix race condition of nominate and unshare



Hi Tim:
 
      More strees test failed on lock issue.
      thanks.
 
(XEN) Error: p2m lock held by p2m_change_type
(XEN) Xen BUG at p2m-ept.c:38
(XEN) ----[ Xen-4.0.0  x86_64  debug=n  Not tainted ]----
(XEN) CPU:    9
(XEN) RIP:    e008:[<ffff82c4801df45a>] ept_pod_check_and_populate+0x13a/0x150
(XEN) RFLAGS: 0000000000010282   CONTEXT: hypervisor
(XEN) rax: 0000000000000000   rbx: ffff830402750000   rcx: 0000000000000092
(XEN) rdx: 000000000000000a   rsi: 000000000000000a   rdi: ffff82c48021e8c4
(XEN) rbp: ffff83023fed7f28   rsp: ffff83023fed7c18   r8:  0000000000000001
(XEN) r9:  0000000000000001   r10: ffff830000000000   r11: ffff82c4801318d0
(XEN) r12: ffff83058dda63e0   r13: 0000000000000001   r14: 0000000000000009
(XEN) r15: 000000000000f9c7   cr0: 0000000080050033   cr4: 00000000000026f0
(XEN) cr3: 000000058ddfb0 00   cr2: 00000000e1258000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: 0000   cs: e008
(XEN) Xen stack trace from rsp=ffff83023fed7c18:
(XEN)    0000000000000002 0000000000000001 0000000000000009 ffff830402750000
(XEN)    ffff83023fed7c78 0000000000000001 ffff83023fed7c70 ffff82c4801df5cf
(XEN)    0000000000000000 ffff83023fed7cc4 000000000000f9c7 000000000000f9c7
(XEN)    ffff83058dda6000 ffff830402750000 ffff83023fed7f28 000000000000f9c7
(XEN)    0000000000000002 0000000000000001 0000000000000030 ffff82c4801bcba4
(XEN)    ffff83058dda6000 000000043fed7f28 ffff83023fed7f28 000000000000f9c7
(XEN)    000000000003f7c7 0000000000000030 ffff83023fed7f28 ffff82c48019baf1
(XEN)    0000000000000000 00000001a8e46000 0000000000000000 0000000000000182
(XEN) &nbs p;  ffff8300a8e46000 ffff82c4801b3864 ffff830402750470 07008300a8e46000
(XEN)    ffff83023fe810e0 0000000000000009 ffff83023fe814c0 0000000000000040
(XEN)    ffff82c4801447da 0000000000000080 ffff83023fe814c0 0000000000000000
(XEN)    000000000f9c7000 000000000000e000 ffff83023fed7dc8 0000000000000080
(XEN)    ffff82c480251dd0 000000000000f9c7 00ff8304027504b0 ffff82c480251dc0
(XEN)    ffff82c480251080 ffff82c480251dc0 0000000000000080 ffff82c48011b3cc
(XEN)    ffff82c480263240 0000000000000040 ffff82c4801447da 0000000000000080
(XEN)    ffff83023fed7f28 0000000000000092 00000c2d0a7ff1db 00000000000000fc
(XEN)    0000000000000092 0000000000000009 ffff8304027504b0 0000000000000009
(XEN)    ffff82c480263100 ffff82c480251100 ffff82c480251100 0000000000000292
(XEN)    ffff8300a8e477f0 00000697315544 60 0000000000000292 ffff82c4801a93c3
(XEN)    00000000000000d1 ffff8300a8e46000 ffff8300a8e46000 ffff8300a8e477e8
(XEN) Xen call trace:
(XEN)    [<ffff82c4801df45a>] ept_pod_check_and_populate+0x13a/0x150
(XEN)    [<ffff82c4801df5cf>] ept_get_entry+0x15f/0x1c0
(XEN)    [<ffff82c4801bcba4>] p2m_change_type+0x144/0x1b0
(XEN)    [<ffff82c48019baf1>] hvm_hap_nested_page_fault+0x121/0x190
(XEN)    [<ffff82c4801b3864>] vmx_vmexit_handler+0x304/0x1a90
(XEN)    [<ffff82c4801447da>] __find_next_bit+0x6a/0x70
(XEN)    [<ffff82c48011b3cc>] vcpu_runstate_get+0xec/0xf0
(XEN)    [<ffff82c4801447da>] __find_next_bit+0x6a/0x70
(XEN)    [<ffff82c4801a93c3>] pt_update_irq+0x33/0x1e0
(XEN)    [<ffff82c4801a6082>] vlapic_has_pending_irq+0x 42/0x70
(XEN)    [<ffff82c4801a0cc8>] hvm_vcpu_has_pending_irq+0x88/0xa0
(XEN)    [<ffff82c4801b267b>] vmx_vmenter_helper+0x5b/0x150
(XEN)    [<ffff82c4801adaa3>] vmx_asm_do_vmentry+0x0/0xdd
(XEN)   
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 9:
 
> Date: Wed, 12 Jan 2011 14:02:23 +0000
> From: Tim.Deegan@xxxxxxxxxx
> To: tinnycloud@xxxxxxxxxxx
> CC: juihaochiang@xxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH] mem_sharing: fix race condition of nominate and unshare
>
> At 12:39 +0000 on 12 Jan (1294835994), MaoXiaoyun wrote:
> > Hi Tim:
> >
> > Seems not work. See log below.
> > Since the patch is for xen_unstable, I need to merge the code manually, I will check my code carefully later.
> >
>
> I think you need this change as well:
>
> diff -r d8eef6e395a8 xen/arch/x86/mm.c
> --- a/xen/arch/x86/mm.c Wed Jan 12 10:51:38 2011 +0000
> +++ b/xen/arch/x86/mm.c Wed Jan 12 14:01:11 2011 +0000
> @@ -2367,7 +2367,7 @@ static int __get_page_type(struct page_i
>
> /* No special validation needed for writable pages. */
> /* Page tables and GDT/LDT need to be scanned f or validity. */
> - if ( type == PGT_writable_page )
> + if ( type == PGT_writable_page || type == PGT_shared_page )
> nx |= PGT_validated;
> }
> }
>
>
> Cheers,
>
> Tim.
>
> --
> Tim Deegan <Tim.Deegan@xxxxxxxxxx>
> Principal Software Engineer, Xen Platform Team
> Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.