Bug 215373
Summary: | ubifs: ubifs_assert_failed [ubifs]: UBIFS assert failed: 0, in fs/ubifs/file.c:1499 (writepage races with truncate) | ||
---|---|---|---|
Product: | File System | Reporter: | Zhihao Cheng (chengzhihao1) |
Component: | Other | Assignee: | fs_other |
Status: | NEW --- | ||
Severity: | normal | ||
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.16-rc5 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
delay.patch
setup.sh a.c |
Description
Zhihao Cheng
2021-12-20 07:38:17 UTC
reproducer: 1. Apply diff.patch 2. ./setup.sh 1 3. compile a.c -> aa 4. dd if=/dev/urandom of=/root/temp/file bs=20K 5. truncate -s 0 /root/temp/file // Execute it after seeing message "... wait truncate" 6. ./aa // Execute it after seeing message "... wait fadvise" [ 28.232326] ubifs_writepage: index 4, size 20480, wait truncate [ 29.471054] truncate_setsize: new isize 0 [ 31.251556] ubifs_writepage: index 4, size 0, truncated [ 31.252434] ubifs_writepage: unlock page 4, wait fadvise [ 32.084340] UBIFS error (ubi0:0 pid 1683): ubifs_assert_failed [ubifs]: UBIFS assert failed: 0, in fs/ubifs/file.c:1513 [ 32.086765] UBIFS warning (ubi0:0 pid 1683): ubifs_ro_mode [ubifs]: switched to read-only mode, error -22 [ 32.088648] CPU: 2 PID: 1683 Comm: aa Not tainted 5.16.0-rc5-00184-g0bca5994cacc-dirty #308 [ 32.090211] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 [ 32.092653] Call Trace: [ 32.093125] <TASK> [ 32.093532] ? dump_stack_lvl+0x73/0x9f [ 32.094272] ? dump_stack+0x13/0x1b [ 32.094761] ? ubifs_ro_mode+0x54/0x60 [ubifs] [ 32.095355] ? ubifs_assert_failed+0x4b/0x80 [ubifs] [ 32.096040] ? ubifs_releasepage+0x67/0x1d0 [ubifs] [ 32.096684] ? try_to_release_page+0x57/0xe0 [ 32.097238] ? invalidate_inode_page+0xfb/0x130 [ 32.097823] ? __invalidate_mapping_pages+0xb9/0x280 [ 32.098472] ? do_writepages+0x1b8/0x200 [ 32.098981] ? filemap_fdatawrite_wbc+0xb1/0x100 [ 32.099581] ? __filemap_fdatawrite_range+0x5c/0x80 [ 32.100210] ? invalidate_mapping_pagevec+0x12/0x20 [ 32.100833] ? generic_fadvise+0x303/0x3c0 [ 32.101364] ? putname+0x75/0xb0 [ 32.101786] ? vfs_fadvise+0x35/0x40 [ 32.102253] ? ksys_fadvise64_64+0x4c/0xb0 [ 32.102781] ? __x64_sys_fadvise64+0x22/0x30 [ 32.103339] ? do_syscall_64+0x35/0x80 [ 32.103829] ? entry_SYSCALL_64_after_hwframe+0x44/0xae [ 32.104513] </TASK> [ 35.667523] truncate_setsize: truncate pages Created attachment 300083 [details]
delay.patch
Created attachment 300085 [details]
setup.sh
Created attachment 300087 [details]
a.c
|