naota / linux

Linux kernel source tree
Other
3 stars 1 forks source link

Lockdep splat in btrfs_lookup_ordered_extent() #24

Closed morbidrsa closed 3 years ago

morbidrsa commented 3 years ago
btrfs/001       [   33.774739] ------------[ cut here ]------------  
[   33.780035] DEBUG_LOCKS_WARN_ON(lockdep_hardirq_context())
[   33.780080] WARNING: CPU: 1 PID: 16 at kernel/locking/lockdep.c:4092 lockdep_hardirqs_on_prepare+0x11c/0x180    
[   33.784507] Modules linked in: btrfs blake2b_generic xor zstd_compress lzo_compress zlib_deflate raid6_pq null_blk
[   33.786264] CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.10.0-rc7+ #916
[   33.787232] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4-rebuilt.opensuse.org 04/01/2014
[   33.788842] RIP: 0010:lockdep_hardirqs_on_prepare+0x11c/0x180
[   33.789668] Code: 00 5d c3 c3 e8 85 38 74 00 85 c0 74 d6 8b 15 a3 28 38 01 85 d2 75 cc 48 c7 c6 40 27 ff 81 48 c7 c7 50 16 fe 81 e8 22 5c 6e 00 <0f> 0b 5d c3 e8 5b 38 74 00 85 c0 74 ac 8b 3d 79 28 38 01 85 ff 75
[   33.792332] RSP: 0018:ffffc900000a8e10 EFLAGS: 00010082
[   33.793092] RAX: 000000000000002e RBX: 0000000000000000 RCX: ffffc900000a8ca0
[   33.794106] RDX: 00000000ffffefff RSI: ffffffff810dfee1 RDI: ffffffff822deb80
[   33.795107] RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000000
[   33.796121] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88810c544000
[   33.797127] R13: ffff88810176aa60 R14: 0000000000000001 R15: ffffea000473a480
[   33.798129] FS:  0000000000000000(0000) GS:ffff88842fd00000(0000) knlGS:0000000000000000
[   33.799273] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   33.800076] CR2: 0000557db7de3c20 CR3: 000000010ce2e000 CR4: 00000000000006a0
[   33.801072] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[   33.802064] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[   33.803047] Call Trace:
[   33.803389]  <IRQ>
[   33.803680]  ? _raw_spin_unlock_irq+0x24/0x30
[   33.804291]  trace_hardirqs_on+0x1b/0xe0
[   33.804847]  _raw_spin_unlock_irq+0x24/0x30
[   33.805562]  btrfs_lookup_ordered_extent+0x98/0x100 [btrfs]
[   33.806370]  btrfs_record_physical_zoned+0x21/0x60 [btrfs]
[   33.807155]  end_bio_extent_writepage+0x123/0x160 [btrfs]
[   33.807940]  btrfs_end_bio+0x87/0x170 [btrfs]
[   33.808562]  blk_update_request+0x23d/0x770
[   33.809157]  blk_mq_end_request+0x1c/0x130
[   33.809739]  flush_smp_call_function_queue+0xeb/0x220
[   33.810445]  __sysvec_call_function_single+0x49/0x1d0
[   33.811156]  asm_call_irq_on_stack+0x12/0x20
[   33.811757]  </IRQ>
[   33.812065]  sysvec_call_function_single+0x7f/0xa0
[   33.812748]  asm_sysvec_call_function_single+0x12/0x20
[   33.813467] RIP: 0010:free_object_rcu+0x2c/0x100
[   33.814115] Code: 44 00 00 41 56 4c 8d 77 80 41 55 49 89 fd 41 54 49 bc 00 01 00 00 00 00 ad de 55 48 bd 22 01 00 00 00 00 ad de 53 48 8b 77 40 <48> 85 f6 75 15 eb 43 48 89 43 08 4c 89 26 48 89 6e 08 e8 ed e1 ff
[   33.816702] RSP: 0018:ffffc90000093dd8 EFLAGS: 00000282
[   33.817448] RAX: ffffffff811eef50 RBX: ffff88842fd28b80 RCX: e413df82b196cd17
[   33.818444] RDX: 000000009b07d681 RSI: 0000000000000000 RDI: ffff88810b1f4640
[   33.819434] RBP: dead000000000122 R08: 0000000000000000 R09: 0000000000000000
[   33.820427] R10: 0000000000000246 R11: ffff8881003e5300 R12: dead000000000100
[   33.821431] R13: ffff88810b1f4640 R14: ffff88810b1f45c0 R15: ffff88810b1f4640
[   33.822416]  ? find_and_remove_object+0x90/0x90
[   33.823052]  ? rcu_core+0x245/0x5b0
[   33.823542]  rcu_core+0x276/0x5b0
[   33.824005]  ? rcu_core+0x245/0x5b0
[   33.824496]  __do_softirq+0x17c/0x58e
[   33.825020]  ? smpboot_thread_fn+0x26/0x210
[   33.825600]  run_ksoftirqd+0x26/0x50
[   33.826102]  smpboot_thread_fn+0x114/0x210
[   33.826674]  ? smpboot_register_percpu_thread+0x140/0x140
[   33.827421]  kthread+0x137/0x150
[   33.827882]  ? __kthread_bind_mask+0x60/0x60
[   33.828476]  ret_from_fork+0x22/0x30
[   33.828981] irq event stamp: 1015365
[   33.829481] hardirqs last  enabled at (1015364): [<ffffffff811e7f09>] slab_free_freelist_hook+0xa9/0x130
[   33.830796] hardirqs last disabled at (1015365): [<ffffffff81816e4b>] sysvec_call_function_single+0xb/0xa0
[   33.832119] softirqs last  enabled at (1015262): [<ffffffff81073756>] run_ksoftirqd+0x26/0x50
[   33.833311] softirqs last disabled at (1015265): [<ffffffff81073756>] run_ksoftirqd+0x26/0x50
[   33.834483] ---[ end trace c9280247486681cf ]---
morbidrsa commented 3 years ago

Likely already fixed as of v5.12.