All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] trigger BUG_ON in mas_store_prealloc when low memory
@ 2023-06-09  8:37 John Hsu (許永翰)
  2023-06-13 14:11 ` Liam R. Howlett
  0 siblings, 1 reply; 15+ messages in thread
From: John Hsu (許永翰) @ 2023-06-09  8:37 UTC (permalink / raw)
  To: maple-tree, linux-kernel, linux-mm, liam.howlett
  Cc: Andrew Yang (楊智強),
	Qun-wei Lin (林群崴),
	Chinwen Chang (張錦文),
	Casper Li (李中榮),
	Kuan-Ying Lee (李冠穎),
	akpm, yuzhao, John Hsu (許永翰)

Hi reviewers and author liam.howlett@oracle.com,
Kindly ping.

We met BUG_ON in mas_store_prealloc with kernel-6.1 stress testing
environment.
According to coredump, BUG_ON is triggered by mas->node with error
number -ENOMEM(0xffffffffffffffd2).
There are some mas_node_count functions in mas_wr_store_entry, and it
seems that mas->node may be set to error node with -ENOMEM if there was
no enough memory spcace for maple tree operations.
We think that return -ENOMEM instead of directly triggering BUG_ON when
memory is not available is suitable, because in reality the tree
operation shouldn't be performed in this situation.

following are the backtrace:
mas_store_prealloc+0x23c/0x484
vma_mas_store+0xe4/0x2d0
__vma_adjust+0xab0/0x1470
vma_merge+0x5b8/0x5d4
mprotect_fixup+0x1f4/0x478
__arm64_sys_mprotect+0x6b0/0x8f0
invoke_syscall+0x84/0x264
el0_svc_common+0x118/0x1f0
do_el0_svc+0x5c/0x184
el0_svc+0x38/0x98

Any suggestion is appreciated.

Thank you.
BRs,
John Hsu

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [BUG] trigger BUG_ON in mas_store_prealloc when low memory
@ 2023-06-01  9:27 John Hsu (許永翰)
  0 siblings, 0 replies; 15+ messages in thread
From: John Hsu (許永翰) @ 2023-06-01  9:27 UTC (permalink / raw)
  To: maple-tree, linux-kernel, linux-mm
  Cc: Andrew Yang (楊智強),
	liam.howlett, Qun-wei Lin (林群崴),
	Chinwen Chang (張錦文),
	Kuan-Ying Lee (李冠穎),
	Casper Li (李中榮),
	akpm, yuzhao, John Hsu (許永翰)

Hi,
We met BUG_ON in mas_store_prealloc with kernel-6.1 stress testing
environment .
According to coredump, BUG_ON is triggered by mas->node with error
number -ENOMEM(0xffffffffffffffd2).
There are some mas_node_count functions in mas_wr_store_entry, and it
seems that mas->node may be set to error node with -ENOMEM if there was
no enough memory spcace for maple tree operations.
We think that return -ENOMEM instead of directly triggering BUG_ON when
memory is not available is suitable, because in reality the tree
operation shouldn't be performed in this situation.

following are the backtrace
mas_store_prealloc+0x23c/0x484
vma_mas_store+0xe4/0x2d0
__vma_adjust+0xab0/0x1470
vma_merge+0x5b8/0x5d4
mprotect_fixup+0x1f4/0x478
__arm64_sys_mprotect+0x6b0/0x8f0
invoke_syscall+0x84/0x264
el0_svc_common+0x118/0x1f0
do_el0_svc+0x5c/0x184
el0_svc+0x38/0x98

Any suggestion is appreciated.

Thank you.
BRs,
John Hsu

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

end of thread, other threads:[~2023-08-08 20:34 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09  8:37 [BUG] trigger BUG_ON in mas_store_prealloc when low memory John Hsu (許永翰)
2023-06-13 14:11 ` Liam R. Howlett
2023-06-14  7:06   ` John Hsu (許永翰)
2023-06-14 15:58     ` Liam R. Howlett
2023-06-16  9:18       ` John Hsu (許永翰)
2023-07-06 18:54         ` Liam R. Howlett
2023-07-10 12:49           ` John Hsu (許永翰)
2023-07-10 14:24             ` Liam R. Howlett
2023-07-13  3:25               ` John Hsu (許永翰)
2023-07-13  3:29                 ` John Hsu (許永翰)
2023-07-19 18:51                 ` Liam R. Howlett
2023-07-19 19:22                   ` Liam R. Howlett
2023-08-07  9:54                   ` John Hsu (許永翰)
2023-08-08 20:00                     ` Liam R. Howlett
  -- strict thread matches above, loose matches on Subject: below --
2023-06-01  9:27 John Hsu (許永翰)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.