代码拉取完成,页面将自动刷新
对于如下时序,UBIFS可能在commit时触发断言失败
P1 P2 P3
run_gc
ubifs_garbage_collect
do_commit
ubifs_return_leb
ubifs_lpt_lookup_dirty
dirty_cow_nnode
do_commit
nothing_to_commit
if (test_bit(DIRTY_CNODE, &c->nroot->flags)
// false
test_and_set_bit(DIRTY_CNODE, &nnode->flags)
c->dirty_nn_cnt += 1
ubifs_assert(c, c->dirty_nn_cnt == 0)
// false !
复现用例见https://bugzilla.kernel.org/show_bug.cgi?id=218162
合入补丁前
[ 51.573662] COMMIT
[ 51.671867] COMMIT
[ 51.778638] Wait sync commit1 twice
[ 51.830773] COMMIT
[ 51.854184] COMMIT
[ 51.888462] wait done
[ 51.893241] wait sync commit2
[ 51.904395] COMMIT
[ 51.904819] sync dirty
[ 52.093823] wait2 done
[ 52.094280] Add dirty A
[ 52.102687] Add dirty A
[ 52.111500] sync done
[ 52.112023] UBIFS error (ubi0:0 pid 6641): ubifs_assert_failed [ubifs]: UBIFS assert failed: c->dirty_pn_cnt == 0, in fs/ubifs/commit.c:97
[ 52.114861] UBIFS warning (ubi0:0 pid 6641): ubifs_ro_mode [ubifs]: switched to read-only mode, error -22
[ 52.116767] CPU: 3 PID: 6641 Comm: sync Not tainted 5.10.0-00050-g844b9b09b393-dirty #197
[ 52.118150] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014
[ 52.120349] Call Trace:
[ 52.120818] dump_stack+0xa6/0xd5
[ 52.121390] ubifs_ro_mode+0x54/0x60 [ubifs]
[ 52.122131] ubifs_assert_failed+0x4b/0x80 [ubifs]
[ 52.122950] do_commit.cold+0x2af/0x7e3 [ubifs]
[ 52.123747] ? sync_inodes_sb+0x27c/0x420
[ 52.124409] ? hrtimer_try_to_cancel+0x20/0x170
[ 52.125239] ubifs_run_commit+0xd5/0x1d0 [ubifs]
[ 52.126059] ubifs_sync_fs+0xca/0x110 [ubifs]
[ 52.126808] sync_filesystem+0xb2/0x130
[ 52.127491] __se_sys_syncfs+0x56/0xf0
[ 52.128114] __x64_sys_syncfs+0x16/0x20
[ 52.128761] do_syscall_64+0x57/0xc0
[ 52.129359] entry_SYSCALL_64_after_hwframe+0x61/0xc6
[ 52.130326] RIP: 0033:0x7fa068faef27
合入后不复现
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论