Bug 218163 - ubifs: gc racing with ubifs_tnc_locate: ubifs_read_node [ubifs]: bad node type
Summary: ubifs: gc racing with ubifs_tnc_locate: ubifs_read_node [ubifs]: bad node type
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: fs_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 01:33 UTC by Zhihao Cheng
Modified: 2023-11-20 01:33 UTC (History)
0 users

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
diff (2.50 KB, patch)
2023-11-20 01:33 UTC, Zhihao Cheng
Details | Diff
test.sh (813 bytes, application/x-shellscript)
2023-11-20 01:33 UTC, Zhihao Cheng
Details

Description Zhihao Cheng 2023-11-20 01:33:26 UTC
1. Apply diff and compile kernel
2. ./test.sh

[   13.236687] wait gc & reuse
[   13.314617] GCED
[   13.324946] REUSED
[   13.340803] wait done
[   13.341439] UBIFS error (ubi0:0 pid 1121): ubifs_read_node [ubifs]: bad node type (255 but expected 1)
[   13.344575] UBIFS error (ubi0:0 pid 1121): ubifs_read_node [ubifs]: bad node at LEB 13:0, LEB mapping status 1
[   13.347192] Not a node, first 24 bytes:
[   13.347197] 00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff                          ................
[   13.351438] CPU: 3 PID: 1121 Comm: cat Not tainted 6.6.0-15036-g799c789c3af8-dirty #303
[   13.353274] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014
[   13.355297] Call Trace:
[   13.355910]  <TASK>
[   13.356434]  dump_stack_lvl+0x86/0xc0
[   13.357318]  dump_stack+0x18/0x30
[   13.358113]  ubifs_read_node+0x386/0x3d0 [ubifs]
[   13.359244]  ? prb_read_valid+0x23/0x30
[   13.360167]  ubifs_read_node_wbuf+0xe1/0x3f0 [ubifs]
[   13.361290]  ubifs_tnc_read_node+0x72/0x320 [ubifs]
[   13.362159]  ? vprintk_default+0x25/0x30
[   13.362840]  ? vprintk+0x4d/0x70
[   13.363405]  ? _printk+0x64/0x90
[   13.363972]  ubifs_tnc_locate+0x354/0x3a0 [ubifs]
[   13.364815]  do_readpage+0x148/0x800 [ubifs]
[   13.365595]  ubifs_read_folio+0x7f/0x950 [ubifs]
[   13.366422]  ? __filemap_add_folio+0x2e8/0x7e0
[   13.367188]  ? folio_memcg+0xe0/0xe0
[   13.367818]  filemap_read_folio+0x2f/0xe0
[   13.368513]  filemap_get_pages+0x5eb/0xb30
[   13.369219]  filemap_read+0xef/0x500
[   13.369841]  ? folio_add_new_anon_rmap+0x68/0x150
[   13.370653]  ? folio_add_lru+0x83/0x150
[   13.371327]  ? folio_add_lru_vma+0x2e/0x80
[   13.371870]  ? do_pte_missing+0xb77/0x14a0
[   13.372371]  ? __handle_mm_fault+0x7db/0x1630
[   13.372893]  generic_file_read_iter+0x48/0x1b0
[   13.373441]  vfs_read+0x204/0x3c0
[   13.373853]  ksys_read+0x7b/0x170
[   13.374267]  __x64_sys_read+0x21/0x30
[   13.374710]  do_syscall_64+0x6f/0x140
[   13.375161]  entry_SYSCALL_64_after_hwframe+0x63/0x6b
[   13.375769] RIP: 0033:0x7f022df000d0
[   13.376207] Code: 86 fe ff ff 48 8d 3d 0f de 09 00 48 83 ec 08 e8 46 39 02 00 66 0f 1f 44 00 00 83 3d 19 46 2d 00 00 75 10 b8 00 00 004
[   13.378424] RSP: 002b:00007ffd0f985f48 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[   13.379343] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f022df000d0
[   13.380197] RDX: 0000000000020000 RSI: 00007f022e57d000 RDI: 0000000000000003
[   13.381055] RBP: 0000000000020000 R08: 00007f022e57c010 R09: 0000000000000000
[   13.381913] R10: 0000000000000022 R11: 0000000000000246 R12: 00007f022e57d000
[   13.382758] R13: 0000000000000003 R14: 00007f022e57d00f R15: 0000000000020000
Comment 1 Zhihao Cheng 2023-11-20 01:33:44 UTC
Created attachment 305430 [details]
diff
Comment 2 Zhihao Cheng 2023-11-20 01:33:55 UTC
Created attachment 305431 [details]
test.sh

Note You need to log in before you can comment on or make changes to this bug.