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

[Xen-devel] xenconsoled is blocked by unmap_if_in_range()



Hi,

I hit an issue on xen dom0 when working with most recent mainline linux. I am
posting this to share the symptom and commit fixing the issue, so that people
would be able to search via google in the future when hit the same issue.

The issue is already fixed by Michal Hocko <mhocko@xxxxxxxx> and the patch set
is queued in linux-next.

When I boot either HVM or PV guest, xenconsoled is blocked in Running state.
The backtrace obtained via 'echo "l" > /proc/sysrq-trigger' is as below:

[ 1379.128399] NMI backtrace for cpu 3
[ 1379.128400] CPU: 3 PID: 2184 Comm: xenconsoled Not tainted 4.19.0-rc2 #1
[ 1379.128400] RIP: e030:xen_hypercall_grant_table_op+0xa/0x20
[ 1379.128401] RSP: e02b:ffffc9004040bb68 EFLAGS: 00000246
[ 1379.128402] RAX: 0000000000000000 RBX: ffffc9004040bbd8 RCX: ffffffff8100128a
[ 1379.128402] RDX: 0000000000000000 RSI: ffff8800045bd8a0 RDI: 0000000000000001
[ 1379.128403] RBP: ffff8800045bdd40 R08: 0000000000000000 R09: ffff8800048acd78
[ 1379.128403] R10: ffffc9004036fdc0 R11: 0000000000000246 R12: 0000000000000000
[ 1379.128403] R13: ffff8800298d8900 R14: ffff880004885888 R15: ffff880004885860
[ 1379.128404] FS:  00007f2c3a837700(0000) GS:ffff880030ac0000(0000) 
knlGS:0000000000000000
[ 1379.128404] CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1379.128404] CR2: 0000559b5255bd80 CR3: 000000002abc0000 CR4: 0000000000042660
[ 1379.128405] Call Trace:
[ 1379.128405]  ? __gnttab_unmap_refs_async+0x7d/0xb0
[ 1379.128405]  ? gnttab_unmap_refs_sync+0x4b/0x80
[ 1379.128406]  ? __unmap_grant_pages+0x88/0x130 [xen_gntdev]
[ 1379.128406]  ? gnttab_unmap_refs_sync+0x80/0x80
[ 1379.128406]  ? __queue_work+0x3f0/0x3f0
[ 1379.128406]  ? gnttab_foreach_grant_in_range+0xf0/0xf0
[ 1379.128407]  ? unmap_grant_pages+0x65/0x90 [xen_gntdev]
[ 1379.128407]  ? unmap_if_in_range+0x2a/0x40 [xen_gntdev]
[ 1379.128407]  ? mn_invl_range_start+0x46/0xd0 [xen_gntdev]
[ 1379.128408]  ? __mmu_notifier_invalidate_range_start+0x79/0xe0
[ 1379.128408]  ? change_protection+0x6f5/0x7a0
[ 1379.128408]  ? mprotect_fixup+0x117/0x310
[ 1379.128408]  ? file_has_perm+0x94/0xa0
[ 1379.128409]  ? do_mprotect_pkey+0x209/0x380
[ 1379.128409]  ? __x64_sys_mprotect+0x16/0x20
[ 1379.128409]  ? do_syscall_64+0x49/0x100
[ 1379.128409]  ? entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1379.128411] NMI backtrace for cpu 0


The guest cannot destroy successfully.

The cpu running xenconsoled is consuming 100% sys cpu usage.

'strace' shows xenconsoled is blocked at read().

Commands like "xl dmesg" and "ps aux" are blocked and hung.


The issue is introduce by:

mm, oom: distinguish blockable mode for mmu notifiers
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=93065ac753e4443840a057bfef4be71ec766fde9


The issue is fixed by below commit in linux-next:

xen/gntdev: fix up blockable calls to mn_invl_range_start
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=756f6574d1bac39d47bb8f18e2e8aab9fda5d4a1

Dongli Zhang

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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