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

Re: [Xen-devel] xen-gntdev gets stuck unmapping a 2nd page



On 10 Sep 2014, at 13:41, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:

> On 05/09/14 22:04, Dave Scott wrote:
>> Hi,
>> 
>> I've been playing more with vchan and I think I've hit a bug in xen-gntdev.
>> It works ok if I map/unmap in a single page. If I increase the buffer size
>> and cause vchan to map a second page (non-contiguous mappings via 2 distinct
>> libxc calls), the process gets stuck in disk sleep when unmapping the second
>> page. The same happens if I comment out the unmap and let the program exit.
>> 
>> I'm using a 3.13 kernel:
> 
> Can you try the latest kernel?  This looks like it may be a bug in the
> generic memory hotplug device driver rather than something specific to
> gntdev.

On a 3.17.0-rc4 (is that new enough?) it fails a bit differently:

    $ sudo xenstore-read domid
    9
    $ sudo ./test-gnt 9
    src=0x7fd8e9600000 ref=880 dest=0x7fd8e95fe000
    src=0x7fd8e95ff000 ref=879 dest=0x7fd8e95fd000
    Unmapped first page

<— previously it blocked here

    Unmapped second page

<- now it hangs here (2 out of 2 times so far) and hits a NULL pointer 
deference:

Sep 12 12:03:47 ubuntu kernel: [  136.738101] test-gnt[1192]: segfault at 0 ip 
00007f4dc7160407 sp 00007fff65bf0260 error 4 in 
libc-2.19.so[7f4dc7123000+1bb000]
Sep 12 12:05:03 ubuntu kernel: [  212.021101] BUG: unable to handle kernel NULL 
pointer dereference at 0000000000000007
Sep 12 12:05:03 ubuntu kernel: [  212.021161] IP: [<ffffffff81177420>] 
tlb_flush_mmu_free+0x20/0x50
Sep 12 12:05:03 ubuntu kernel: [  212.021202] PGD 0 
Sep 12 12:05:03 ubuntu kernel: [  212.021217] Oops: 0000 [#1] SMP 
Sep 12 12:05:03 ubuntu kernel: [  212.021241] Modules linked in: xen_gntalloc 
xen_gntdev ext2 ppdev microcode serio_raw i2c_piix4 parport_pc joydev mac_hid 
lp parport hid_generic usbhid hid psmouse floppy
Sep 12 12:05:03 ubuntu kernel: [  212.021371] CPU: 0 PID: 1225 Comm: sudo Not 
tainted 3.17.0-rc4 #4
Sep 12 12:05:03 ubuntu kernel: [  212.021407] Hardware name: Xen HVM domU, BIOS 
4.4.0-xs88167-d 09/07/2014
Sep 12 12:05:03 ubuntu kernel: [  212.021446] task: ffff88002fbd8000 ti: 
ffff880024a04000 task.ti: ffff880024a04000
Sep 12 12:05:03 ubuntu kernel: [  212.021489] RIP: 0010:[<ffffffff81177420>]  
[<ffffffff81177420>] tlb_flush_mmu_free+0x20/0x50
Sep 12 12:05:03 ubuntu kernel: [  212.021541] RSP: 0018:ffff880024a07ce8  
EFLAGS: 00010286
Sep 12 12:05:03 ubuntu kernel: [  212.021572] RAX: ffffffffffffffff RBX: 
ffffffffffffffff RCX: ffff880024a07c68
Sep 12 12:05:03 ubuntu kernel: [  212.021613] RDX: 0000000000000000 RSI: 
0000000000000000 RDI: ffff880024a07c68
Sep 12 12:05:03 ubuntu kernel: [  212.021654] RBP: ffff880024a07d00 R08: 
ffff880025c772d0 R09: 0000000000000000
Sep 12 12:05:03 ubuntu kernel: [  212.021695] R10: ffffea0000bb1e80 R11: 
0000000000000206 R12: ffff880024a07e58
Sep 12 12:05:03 ubuntu kernel: [  212.021736] R13: ffff880024a07e30 R14: 
00007f4867e72000 R15: ffff880024a07e30
Sep 12 12:05:03 ubuntu kernel: [  212.021782] FS:  00007f486a257840(0000) 
GS:ffff88003f400000(0000) knlGS:0000000000000000
Sep 12 12:05:03 ubuntu kernel: [  212.021828] CS:  0010 DS: 0000 ES: 0000 CR0: 
0000000080050033
Sep 12 12:05:03 ubuntu kernel: [  212.021863] CR2: 0000000000000007 CR3: 
000000002f7a2000 CR4: 00000000000006f0
Sep 12 12:05:03 ubuntu kernel: [  212.021905] Stack:
Sep 12 12:05:03 ubuntu kernel: [  212.021918]  00007f4868086000 
ffffea0000a70ac0 00007f4867e78000 ffff880024a07de0
Sep 12 12:05:03 ubuntu kernel: [  212.021967]  ffffffff81178d0d 
00007f4867e77fff 00007f4867e77fff ffff88002f7a27f0
Sep 12 12:05:03 ubuntu kernel: [  212.022017]  00007f4867e78000 
ffff88002ec70908 00007f4867e78000 00007f4867e77fff
Sep 12 12:05:03 ubuntu kernel: [  212.022066] Call Trace:
Sep 12 12:05:03 ubuntu kernel: [  212.022084]  [<ffffffff81178d0d>] 
unmap_single_vma+0x50d/0x8a0
Sep 12 12:05:03 ubuntu kernel: [  212.022119]  [<ffffffff81179af9>] 
unmap_vmas+0x49/0x90
Sep 12 12:05:03 ubuntu kernel: [  212.022151]  [<ffffffff8117ef6d>] 
unmap_region+0x9d/0x110
Sep 12 12:05:03 ubuntu kernel: [  212.022183]  [<ffffffff8117ecb8>] ? 
vma_gap_callbacks_rotate+0x18/0x30
Sep 12 12:05:03 ubuntu kernel: [  212.022222]  [<ffffffff81181288>] 
do_munmap+0x228/0x3b0
Sep 12 12:05:03 ubuntu kernel: [  212.022253]  [<ffffffff81181451>] 
vm_munmap+0x41/0x60
Sep 12 12:05:03 ubuntu kernel: [  212.022284]  [<ffffffff811823a2>] 
SyS_munmap+0x22/0x30
Sep 12 12:05:03 ubuntu kernel: [  212.022316]  [<ffffffff816f4ce9>] 
system_call_fastpath+0x16/0x1b
Sep 12 12:05:03 ubuntu kernel: [  212.022350] Code: 5d c3 66 0f 1f 84 00 00 00 
00 00 66 66 66 66 90 55 48 89 e5 41 55 49 89 fd 41 54 4c 8d 67 28 4d 85 e4 53 
4c 89 e3 74 1e 0f 1f 00 <8b> 73 08 48 8d 7b 10 e8 74 4e 01 00 c7 43 08 00 00 00 
00 48 8b 
Sep 12 12:05:03 ubuntu kernel: [  212.025083] RIP  [<ffffffff81177420>] 
tlb_flush_mmu_free+0x20/0x50
Sep 12 12:05:03 ubuntu kernel: [  212.025083]  RSP <ffff880024a07ce8>
Sep 12 12:05:03 ubuntu kernel: [  212.025083] CR2: 0000000000000007
Sep 12 12:05:03 ubuntu kernel: [  212.028713] ---[ end trace c15bddd8545d0fb1 ]—

Cheers,
Dave


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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