btrfs / btrfs-todo

An issues only repo to organize our TODO items
21 stars 2 forks source link

generic/041: soft lockup #12

Closed morbidrsa closed 3 years ago

morbidrsa commented 3 years ago

generic/041 reliably panics on my environment with CONFIG_SOFTLOCKUP_DETECTOR=y:

rapido1:/home/johannes/src/xfstests-dev# ./check generic/041 FSTYP -- btrfs PLATFORM -- Linux/x86_64 rapido1 5.9.0-rc4+ #757 SMP Sun Sep 13 17:11:54 JST 2020 MKFS_OPTIONS -- /dev/zram1 MOUNT_OPTIONS -- /dev/zram1 /mnt/scratch

generic/041 [ 52.314955] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [xfs_io:6734] [ 52.317482] Kernel panic - not syncing: softlockup: hung tasks [ 52.318129] CPU: 1 PID: 6734 Comm: xfs_io Tainted: G L 5.9.0-rc4+ #757 [ 52.318991] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4-rebuilt.opensuse.org 04/01/2014 [ 52.320216] Call Trace: [ 52.320498] [ 52.320733] dump_stack+0x77/0xa0 [ 52.321109] panic+0xfa/0x2cb [ 52.321441] watchdog_timer_fn.cold+0x85/0xa5 [ 52.321926] ? lockup_detector_update_enable+0x50/0x50 [ 52.322499] hrtimer_run_queues+0x99/0x4c0 [ 52.322979] ? recalibrate_cpu_khz+0x10/0x10 [ 52.323457] hrtimer_run_queues+0x9f/0xb0 [ 52.323902] update_process_times+0x28/0x80 [ 52.324360] tick_handle_periodic+0x1b/0x60 [ 52.324834] sysvec_apic_timer_interrupt+0x76/0x210 [ 52.325391] asm_call_on_stack+0x12/0x20 [ 52.325824] [ 52.326060] sysvec_apic_timer_interrupt+0x7f/0x90 [ 52.326591] asm_sysvec_apic_timer_interrupt+0x12/0x20 [ 52.327157] RIP: 0010:_raw_spin_unlock_irqrestore+0x25/0x40 [ 52.327767] Code: 80 00 00 00 00 55 48 89 fd 48 83 c7 18 53 48 89 f3 48 8b 74 24 10 e8 da 4a 9e ff 48 89 ef e8 f2 a3 9e ff f6 c7 02 75 0c 53 9d <65> ff 0d 74 c8 94 7e 5b 5d c3 e8 2c bc a4 ff eb ed 66 2e 0f 1f 84 [ 52.329746] RSP: 0018:ffffc900051f7a58 EFLAGS: 00000202 [ 52.330296] RAX: 0000000002ec766f RBX: 0000000000000202 RCX: 0000000000000006 [ 52.331030] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff816ca4d4 [ 52.331763] RBP: ffff8881bb9bc5c0 R08: 0000000000000001 R09: 0000000000000001 [ 52.332499] R10: 0000000000000000 R11: 0000000000000046 R12: ffff888236c41b00 [ 52.333230] R13: ffffea00087f1240 R14: ffffffffa00fc598 R15: 0000000000000c68 [ 52.333984] ? overwrite_item+0x268/0x570 [btrfs] [ 52.334467] ? _raw_spin_unlock_irqrestore+0x34/0x40 [ 52.334987] delete_object+0x2b/0x50 [ 52.335375] kfree+0x133/0x2f0 [ 52.335725] overwrite_item+0x268/0x570 [btrfs] [ 52.336217] ? btrfs_get_64+0x60/0x110 [btrfs] [ 52.336709] log_dir_items+0x287/0x4e0 [btrfs] [ 52.337192] log_directory_changes+0x6d/0xb0 [btrfs] [ 52.337727] btrfs_log_inode+0xbf7/0x1ed0 [btrfs] [ 52.338222] ? static_obj+0x40/0x60 [ 52.338605] ? do_async_commit+0x80/0x80 [btrfs] [ 52.339102] ? btrfs_opendir+0x70/0x70 [btrfs] [ 52.339570] ? iget5_locked+0x58/0x100 [ 52.339986] btrfs_log_inode_parent+0xa0f/0xc00 [btrfs] [ 52.340530] ? dget_parent+0x74/0x280 [ 52.340938] btrfs_log_dentry_safe+0x35/0x50 [btrfs] [ 52.341472] btrfs_sync_file+0x220/0x560 [btrfs] [ 52.341956] x64_sys_fsync+0x2f/0x60 [ 52.342355] do_syscall_64+0x33/0x40 [ 52.342729] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 52.343258] RIP: 0033:0x7f4cd2a146ab [ 52.343637] Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 23 f7 ff ff 8b 7c 24 0c 41 89 c0 b8 4a 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2f 44 89 c7 89 44 24 0c e8 61 f7 ff ff 8b 44 [ 52.345551] RSP: 002b:00007ffc78d8fba0 EFLAGS: 00000293 ORIG_RAX: 000000000000004a [ 52.346323] RAX: ffffffffffffffda RBX: 0000560892332e40 RCX: 00007f4cd2a146ab [ 52.347055] RDX: 0000560892331ab0 RSI: 0000560892332e60 RDI: 0000000000000003 [ 52.347791] RBP: 0000560892332e60 R08: 0000000000000000 R09: 0000000000000003 [ 52.348520] R10: fffffffffffff0e5 R11: 0000000000000293 R12: 0000000000000001 [ 52.349252] R13: 0000560892332e40 R14: 0000000000000001 R15: 0000560892332290 [ 52.350187] Kernel Offset: disabled [ 52.350596] ---[ end Kernel panic - not syncing: softlockup: hung tasks ]---

johannes@redsun60:linux(btrfs-misc-next)$ ./scripts/faddr2line fs/btrfs/btrfs.ko overwrite_item+0x268 overwrite_item+0x268/0x570: overwrite_item at /home/johannes/src/linux/fs/btrfs/tree-log.c:399

 344 static noinline int overwrite_item(struct btrfs_trans_handle *trans,
 345                                    struct btrfs_root *root,
 346                                    struct btrfs_path *path,
 347                                    struct extent_buffer *eb, int slot,
 348                                    struct btrfs_key *key)

[...]

 391                 read_extent_buffer(eb, src_copy, src_ptr, item_size);
 392 
 393                 dst_ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]);
 394                 read_extent_buffer(path->nodes[0], dst_copy, dst_ptr,
 395                                    item_size);
 396                 ret = memcmp(dst_copy, src_copy, item_size);
 397 
 398                 kfree(dst_copy);
 399                 kfree(src_copy);
morbidrsa commented 3 years ago

Ah crap wrong repo