Re: kernel BUG at mm/huge_memory.c:2736(linux 5.10.29)
From: Yang Shi <hidden>
Date: 2021-04-12 20:18:42
On Mon, Apr 12, 2021 at 3:07 AM Wang Yugui [off-list ref] wrote:
Hi,
kernel BUG at mm/huge_memory.c:2736(linux 5.10.29) is triggered
by some files write test.
mm/huge_memory.c:
if (IS_ENABLED(CONFIG_DEBUG_VM) && mapcount) {
pr_alert("total_mapcount: %u, page_count(): %u\n",
mapcount, count);
if (PageTail(page))
dump_page(head, NULL);
dump_page(page, "total_mapcount(head) > 0");
L2736: BUG();
}We just can tell the mapcount of the page is not zero from the current log, it might mean the unmap_page() call is failed. It seems you have CONFIG_DEBUG_VM enabled, could you please paste more log? There is "VM_BUG_ON_PAGE(!unmap_success, page)" in unmap_page(). It should be able to tell us if unmap_page() is failed or not, or something else happened.
kernel version:5.10.29 kernel BUG at mm/huge_memory.c:2736 invalid opcode: 0000 [#1] SMP NOPTI CPU:9 pid:351 Comm: kswapd0 Tainted: G S RIP: 0010:split_huge_page_to_list.cold.86+0x19/8x1b ... Call Trace: ? shrink_inactive_list+0x241/0x3d0 deferred_split_scan+0x1ca/0x320 do_shrink_slab+0x20f/0x2c0 shrink_node+0x24b/0x6d0 balanced_pgdat+0x2db/0x550 kswaped+0x201/0x390 ? finish_wait+0x80/0x80 ? balance_pgdat+0x550/0x550 kthread+0x116/0x130 ? ktrhead_park+0x80/0x80 ret_from_fork+0x1f/0x30 see OOPS.jpg for more info. Best Regards Wang Yugui (wangyugui@e16-tech.com) 2021/04/12