linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* kernel BUG at /src/linux-dev/mm/mempolicy.c:1738! on v3.16-rc1
@ 2014-06-19 21:56 Naoya Horiguchi
  2014-06-20  4:35 ` Hugh Dickins
  2014-06-20 14:24 ` Christoph Lameter
  0 siblings, 2 replies; 9+ messages in thread
From: Naoya Horiguchi @ 2014-06-19 21:56 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, Andrew Morton, Hugh Dickins, Christoph Lameter,
	KOSAKI Motohiro, Naoya Horiguchi

Hi,

I triggered the following bug on v3.16-rc1 when I did mbind() testing
where multiple processes repeat calling mbind() for a shared mapped file
(causing pingpong of page migration.)

In my investigation, it seems that some vma accidentally has vma->vm_start
= 0, which makes new_vma_page() choose a wrong vma and results in breaking
the assumption that the address passed to alloc_pages_vma() should be
inside a given vma.
I'm suspecting that mbind_range() do something wrong around vma handling,
but I don't have enough luck yet. Anyone has an idea?

Thanks,
Naoya Horiguchi

[  339.133960] ------------[ cut here ]------------
[  339.134893] kernel BUG at /src/linux-dev/mm/mempolicy.c:1738!
[  339.134893] invalid opcode: 0000 [#1] SMP
[  339.134893] Modules linked in: stap_2acbad8c3ba47062dbdc6f227d00f8f4__1958(O) bnep bluetooth cfg80211 rfkill ip6t_rpfilter ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ppdev microcode i2c_piix4 pcspkr i2c_core virtio_balloon parport_pc parport serio_raw nfsd auth_rpcgss oid_registry nfs_acl lockd sunrpc virtio_blk virtio_net floppy ata_generic pata_acpi
[  339.134893] CPU: 2 PID: 2840 Comm: mbind_fuzz Tainted: G           O  3.16.0-rc1-140619-1205-00003-g80aa6b64a44e #157
[  339.134893] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
[  339.134893] task: ffff88007c133b60 ti: ffff88007dd28000 task.ti: ffff88007dd28000
[  339.134893] RIP: 0010:[<ffffffff811ebfe0>]  [<ffffffff811ebfe0>] policy_zonelist+0x50/0xb0
[  339.134893] RSP: 0000:ffff88007dd2bcf8  EFLAGS: 00010293
[  339.134893] RAX: 0000000000000000 RBX: ffff88007c133b60 RCX: 0000000000000000
[  339.134893] RDX: 0000000000000002 RSI: ffff88011bd3fad0 RDI: 00000000000200da
[  339.134893] RBP: ffff88007dd2bd00 R08: 0000000000000002 R09: 0000000000000002
[  339.134893] R10: ffff88007d8f3958 R11: 0000000000000001 R12: 00000000000200da
[  339.134893] R13: 0000000000000000 R14: ffff88011bd3fad0 R15: 0000000000000000
[  339.134893] FS:  00007f457cf90740(0000) GS:ffff8800bec00000(0000) knlGS:0000000000000000
[  339.134893] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  339.134893] CR2: 0000700000184000 CR3: 000000007959b000 CR4: 00000000000006e0
[  339.134893] Stack:
[  339.134893]  ffff88007c133b60 ffff88007dd2bd68 ffffffff811eeac8 ffff88007c133b60
[  339.134893]  ffff88007c133b60 0000000000000000 000000020000000c 0000000000000000
[  339.134893]  ffff88007c387e60 ffff88007c387e60 ffffea0000e19340 ffff88007d8f3958
[  339.134893] Call Trace:
[  339.134893]  [<ffffffff811eeac8>] alloc_pages_vma+0x88/0x1a0
[  339.134893]  [<ffffffff811eec7b>] new_vma_page+0x9b/0xb0
[  339.134893]  [<ffffffff811fee4d>] unmap_and_move+0x3d/0x200
[  339.134893]  [<ffffffff811ff235>] migrate_pages+0xe5/0x1e0
[  339.134893]  [<ffffffff811eebe0>] ? alloc_pages_vma+0x1a0/0x1a0
[  339.134893]  [<ffffffff811ef3c2>] do_mbind+0x1f2/0x3a0
[  339.134893]  [<ffffffff811ef60b>] SyS_mbind+0x9b/0xb0
[  339.134893]  [<ffffffff8174798b>] tracesys+0xdd/0xe2
[  339.134893] Code: 63 d2 31 c0 85 db 48 8b 14 d5 00 2d d6 81 0f 95 c0 48 69 c0 20 22 01 00 5b 5d 48 8d 84 02 00 1d 00 00 c3 0f 1f 84 00 00 00 00 00 <0f> 0b 66 0f 1f 44 00 00 f6 46 06 02 75 12 89 fb 48 0f bf 56 08
[  339.134893] RIP  [<ffffffff811ebfe0>] policy_zonelist+0x50/0xb0
[  339.134893]  RSP <ffff88007dd2bcf8>
[  339.178924] ---[ end trace 37c12438b6936769 ]---

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-06-20 21:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 21:56 kernel BUG at /src/linux-dev/mm/mempolicy.c:1738! on v3.16-rc1 Naoya Horiguchi
2014-06-20  4:35 ` Hugh Dickins
2014-06-20 15:40   ` Naoya Horiguchi
2014-06-20 14:24 ` Christoph Lameter
2014-06-20 19:46   ` Naoya Horiguchi
2014-06-20 20:03     ` Hugh Dickins
2014-06-20 20:32       ` Christoph Lameter
2014-06-20 21:12       ` Naoya Horiguchi
2014-06-20 21:42         ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).