Re: Lockdep warnings on kexec (virtio_blk, hrtimers)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2024-12-11 at 07:42 -0500, Stefan Hajnoczi wrote:
> On Tue, Dec 10, 2024 at 09:56:43AM +0800, Jason Wang wrote:
> > Adding more virtio-blk people here.
> 
> Please try Ming Lei's recent fix in Jens' tree:
> 
>   virtio-blk: don't keep queue frozen during system suspend
>   commit: 7678abee0867e6b7fb89aa40f6e9f575f755fb37
> 
> https://git.kernel.dk/cgit/linux/commit/?h=block-6.13&id=7678abee0867e6b7fb89aa40f6e9f575f755fb37

Thanks. That does make those warnings go away. I do still get this one
occasionally though. It seems to go away without 'no_console_suspend'
on the command line, but I'm not sure that makes it OK.

B[   23.665211] ------------[ cut here ]------------
[   23.665790] Interrupts enabled after irqrouter_resume+0x0/0x50
[   23.666596] WARNING: CPU: 0 PID: 560 at drivers/base/syscore.c:103 syscore_resume+0x18a/0x220
[   23.667587] Modules linked in:
[   23.667964] CPU: 0 UID: 0 PID: 560 Comm: loadret Not tainted 6.13.0-rc1+ #2033
[   23.668806] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[   23.670086] RIP: 0010:syscore_resume+0x18a/0x220
[   23.670614] Code: 00 e9 21 ff ff ff 80 3d 62 d0 d3 01 00 0f 85 03 ff ff ff 48 8b 73 18 48 c7 c7 06 f6 e9 a9 c6 05 4a d0 d3 01 01 e8 16 56 46 ff <0f> 0b e9 e5 fe ff ff e8 ea e9 54 ff 84 c0 0f 85 fb fe ff ff 80 3d
[   23.672525] RSP: 0018:ffffb2f640aefbb8 EFLAGS: 00010282
[   23.673060] RAX: 0000000000000000 RBX: ffffffffaa9918c0 RCX: 0000000000000027
[   23.673759] RDX: ffff8d75fdc21a88 RSI: 0000000000000001 RDI: ffff8d75fdc21a80
[   23.674474] RBP: 0000000000037e0c R08: 0000000000000000 R09: 0000000000000000
[   23.675198] R10: 0000000000000001 R11: ffffffffaa782fd8 R12: ffffb2f640aefbe8
[   23.675905] R13: ffffffffaa68ebe0 R14: 00000000fee1dead R15: 0000000000000000
[   23.676610] FS:  00007f058661a540(0000) GS:ffff8d75fdc00000(0000) knlGS:0000000000000000
[   23.677431] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   23.678015] CR2: 000055a0b9f49b70 CR3: 0000000014798001 CR4: 0000000000170ef0
[   23.678727] Call Trace:
[   23.679015]  <TASK>
[   23.679248]  ? __warn.cold+0xb7/0x151
[   23.679629]  ? syscore_resume+0x18a/0x220
[   23.680086]  ? report_bug+0xff/0x140
[   23.680484]  ? console_unlock+0x9d/0x150
[   23.680891]  ? handle_bug+0x58/0x90
[   23.681257]  ? exc_invalid_op+0x17/0x70
[   23.681643]  ? asm_exc_invalid_op+0x1a/0x20
[   23.682077]  ? syscore_resume+0x18a/0x220
[   23.682493]  ? syscore_resume+0x18a/0x220
[   23.682929]  kernel_kexec+0xf6/0x180
[   23.683305]  __do_sys_reboot+0x206/0x250
[   23.683721]  do_syscall_64+0x95/0x180
[   23.684163]  ? __lock_acquire+0x45f/0x25c0
[   23.684622]  ? __lock_acquire+0x45f/0x25c0
[   23.685100]  ? __handle_mm_fault+0x7df/0xfa0
[   23.685612]  ? reacquire_held_locks+0xd2/0x1f0
[   23.686118]  ? do_user_addr_fault+0x555/0x8a0
[   23.686615]  ? lock_acquire+0xd0/0x310
[   23.687022]  ? find_held_lock+0x2b/0x80
[   23.687470]  ? do_user_addr_fault+0x59f/0x8a0
[   23.687928]  ? do_user_addr_fault+0x5a9/0x8a0
[   23.688406]  ? trace_hardirqs_off+0x4b/0xc0
[   23.688837]  ? lockdep_hardirqs_on_prepare+0xdb/0x190
[   23.689367]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[   23.689866] RIP: 0033:0x7f058654c15d
[   23.690244] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fb 5c 0c 00 f7 d8 64 89 01 48
[   23.692088] RSP: 002b:00007ffccf368718 EFLAGS: 00000246 ORIG_RAX: 00000000000000a9
[   23.692857] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f058654c15d
[   23.693575] RDX: 0000000045584543 RSI: 0000000028121969 RDI: 00000000fee1dead
[   23.694317] RBP: 00007ffccf368760 R08: 0000004d00000000 R09: 0000004d00000000
[   23.695017] R10: 00007f0586640f30 R11: 0000000000000246 R12: 0000000000401070
[   23.695719] R13: 00007ffccf368840 R14: 0000000000000000 R15: 0000000000000000
[   23.696453]  </TASK>
[   23.696681] irq event stamp: 15565
[   23.697043] hardirqs last  enabled at (15573): [<ffffffffa8281b8e>] __up_console_sem+0x7e/0x90
[   23.697855] hardirqs last disabled at (15580): [<ffffffffa8281b73>] __up_console_sem+0x63/0x90
[   23.698673] softirqs last  enabled at (14798): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.699481] softirqs last disabled at (14777): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.700284] ---[ end trace 0000000000000000 ]---
[   23.702460] ------------[ cut here ]------------
[   23.702963] WARNING: CPU: 0 PID: 560 at kernel/time/hrtimer.c:995 hrtimers_resume_local+0x29/0x40
[   23.703885] Modules linked in:
[   23.704223] CPU: 0 UID: 0 PID: 560 Comm: loadret Tainted: G        W          6.13.0-rc1+ #2033
[   23.705089] Tainted: [W]=WARN
[   23.705415] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[   23.706536] RIP: 0010:hrtimers_resume_local+0x29/0x40
[   23.707068] Code: 90 66 0f 1f 00 0f 1f 44 00 00 8b 05 c5 57 81 02 85 c0 74 18 65 8b 05 0e 8c d4 57 85 c0 75 0d 65 8b 05 c7 88 d4 57 85 c0 74 02 <0f> 0b 31 ff e9 de ee ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f
[   23.708834] RSP: 0018:ffffb2f640aefb50 EFLAGS: 00010202
[   23.709429] RAX: 0000000000000001 RBX: 000000059af022d0 RCX: 00000000000006e0
[   23.710121] RDX: 000000000000000e RSI: 000000008e2b60ca RDI: 00000000000006e0
[   23.710831] RBP: ffffb2f640aefba8 R08: 0000000000000001 R09: 0000000000000000
[   23.711559] R10: 0000000000000001 R11: ffffffffac18d188 R12: 0000000000000206
[   23.712249] R13: ffffffffaa666ca0 R14: 00000000fee1dead R15: 0000000000000000
[   23.712952] FS:  00007f058661a540(0000) GS:ffff8d75fdc00000(0000) knlGS:0000000000000000
[   23.713746] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   23.714301] CR2: 000055a0b9f49b70 CR3: 0000000014798001 CR4: 0000000000170ef0
[   23.714997] Call Trace:
[   23.715274]  <TASK>
[   23.715512]  ? __warn.cold+0xb7/0x151
[   23.715884]  ? hrtimers_resume_local+0x29/0x40
[   23.716330]  ? report_bug+0xff/0x140
[   23.716711]  ? handle_bug+0x58/0x90
[   23.717071]  ? exc_invalid_op+0x17/0x70
[   23.717465]  ? asm_exc_invalid_op+0x1a/0x20
[   23.717890]  ? hrtimers_resume_local+0x29/0x40
[   23.718356]  timekeeping_resume+0x148/0x190
[   23.718772]  syscore_resume+0x67/0x220
[   23.719151]  kernel_kexec+0xf6/0x180
[   23.719568]  __do_sys_reboot+0x206/0x250
[   23.720044]  do_syscall_64+0x95/0x180
[   23.720429]  ? __lock_acquire+0x45f/0x25c0
[   23.720849]  ? __lock_acquire+0x45f/0x25c0
[   23.721258]  ? __handle_mm_fault+0x7df/0xfa0
[   23.721697]  ? reacquire_held_locks+0xd2/0x1f0
[   23.722139]  ? do_user_addr_fault+0x555/0x8a0
[   23.722618]  ? lock_acquire+0xd0/0x310
[   23.723053]  ? find_held_lock+0x2b/0x80
[   23.723505]  ? do_user_addr_fault+0x59f/0x8a0
[   23.724010]  ? do_user_addr_fault+0x5a9/0x8a0
[   23.724467]  ? trace_hardirqs_off+0x4b/0xc0
[   23.724916]  ? lockdep_hardirqs_on_prepare+0xdb/0x190
[   23.725404]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[   23.725935] RIP: 0033:0x7f058654c15d
[   23.726318] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fb 5c 0c 00 f7 d8 64 89 01 48
[   23.728079] RSP: 002b:00007ffccf368718 EFLAGS: 00000246 ORIG_RAX: 00000000000000a9
[   23.728827] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f058654c15d
[   23.729560] RDX: 0000000045584543 RSI: 0000000028121969 RDI: 00000000fee1dead
[   23.730358] RBP: 00007ffccf368760 R08: 0000004d00000000 R09: 0000004d00000000
[   23.731089] R10: 00007f0586640f30 R11: 0000000000000246 R12: 0000000000401070
[   23.731755] R13: 00007ffccf368840 R14: 0000000000000000 R15: 0000000000000000
[   23.732455]  </TASK>
[   23.732681] irq event stamp: 16269
[   23.733016] hardirqs last  enabled at (16277): [<ffffffffa8281b8e>] __up_console_sem+0x7e/0x90
[   23.733823] hardirqs last disabled at (16286): [<ffffffffa8281b73>] __up_console_sem+0x63/0x90
[   23.734639] softirqs last  enabled at (15872): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.735463] softirqs last disabled at (15863): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.736316] ---[ end trace 0000000000000000 ]---
[   23.736789] 
[   23.736993] ================================
[   23.737439] WARNING: inconsistent lock state
[   23.737908] 6.13.0-rc1+ #2033 Tainted: G        W         
[   23.738493] --------------------------------
[   23.738900] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[   23.739468] loadret/560 [HC0[0]:SC0[0]:HE1:SE1] takes:
[   23.739957] ffff8d75fdc267d8 (hrtimer_bases.lock){?.-.}-{2:2}, at: retrigger_next_event+0x38/0xd0
[   23.740813] {IN-HARDIRQ-W} state was registered at:
[   23.741276]   lock_acquire+0xd0/0x310
[   23.741628]   _raw_spin_lock_irqsave+0x48/0x70
[   23.742058]   hrtimer_run_queues+0x4d/0x150
[   23.742455]   update_process_times+0x34/0xf0
[   23.742853]   tick_periodic+0x29/0xe0
[   23.743216]   tick_handle_periodic+0x24/0x70
[   23.743621]   timer_interrupt+0x18/0x30
[   23.743999]   __handle_irq_event_percpu+0x87/0x260
[   23.744449]   handle_irq_event+0x38/0x90
[   23.744819]   handle_level_irq+0x8e/0x160
[   23.745212]   __common_interrupt+0x5c/0x120
[   23.745603]   common_interrupt+0x80/0xa0
[   23.745986]   asm_common_interrupt+0x26/0x40
[   23.746395]   __x86_return_thunk+0x0/0x10
[   23.746772]   _raw_spin_unlock_irqrestore+0x45/0x70
[   23.747251]   __setup_irq+0x34d/0x6a0
[   23.747602]   request_threaded_irq+0x115/0x1b0
[   23.748039]   hpet_time_init+0x31/0x50
[   23.748396]   x86_late_time_init+0x1b/0x40
[   23.748786]   start_kernel+0x998/0xa40
[   23.749154]   x86_64_start_reservations+0x24/0x30
[   23.749600]   x86_64_start_kernel+0xed/0xf0
[   23.750011]   common_startup_64+0x13e/0x141
[   23.750398] irq event stamp: 16325
[   23.750745] hardirqs last  enabled at (16325): [<ffffffffa8281b8e>] __up_console_sem+0x7e/0x90
[   23.751549] hardirqs last disabled at (16324): [<ffffffffa8281b73>] __up_console_sem+0x63/0x90
[   23.752349] softirqs last  enabled at (15872): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.753138] softirqs last disabled at (15863): [<ffffffffa81c6c12>] __irq_exit_rcu+0xe2/0x100
[   23.753956] 
[   23.753956] other info that might help us debug this:
[   23.754597]  Possible unsafe locking scenario:
[   23.754597] 
[   23.755163]        CPU0
[   23.755397]        ----
[   23.755637]   lock(hrtimer_bases.lock);
[   23.756010]   <Interrupt>
[   23.756264]     lock(hrtimer_bases.lock);
[   23.756640] 
[   23.756640]  *** DEADLOCK ***
[   23.756640] 
[   23.757197] 1 lock held by loadret/560:
[   23.757555]  #0: ffffffffaa6902c8 (system_transition_mutex){+.+.}-{4:4}, at: __do_sys_reboot+0xc5/0x250
[   23.758426] 
[   23.758426] stack backtrace:
[   23.758867] CPU: 0 UID: 0 PID: 560 Comm: loadret Tainted: G        W          6.13.0-rc1+ #2033
[   23.759806] Tainted: [W]=WARN
[   23.760151] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[   23.761228] Call Trace:
[   23.761481]  <TASK>
[   23.761713]  dump_stack_lvl+0x84/0xd0
[   23.762117]  print_usage_bug.part.0+0x257/0x340
[   23.762553]  mark_lock+0x735/0x960
[   23.762911]  ? vprintk_emit+0x111/0x460
[   23.763288]  ? hrtimers_resume_local+0x29/0x40
[   23.763704]  ? _printk+0x6c/0x90
[   23.764018]  __lock_acquire+0x7ee/0x25c0
[   23.764385]  ? __warn.cold+0x7f/0x151
[   23.764727]  ? hrtimers_resume_local+0x29/0x40
[   23.765161]  ? nbcon_get_cpu_emergency_nesting+0xa/0x30
[   23.765643]  ? nbcon_cpu_emergency_exit+0xe/0x40
[   23.766081]  ? report_bug+0xff/0x140
[   23.766428]  lock_acquire+0xd0/0x310
[   23.766771]  ? retrigger_next_event+0x38/0xd0
[   23.767189]  _raw_spin_lock+0x30/0x40
[   23.767542]  ? retrigger_next_event+0x38/0xd0
[   23.767967]  retrigger_next_event+0x38/0xd0
[   23.768365]  timekeeping_resume+0x148/0x190
[   23.768763]  syscore_resume+0x67/0x220
[   23.769136]  kernel_kexec+0xf6/0x180
[   23.769478]  __do_sys_reboot+0x206/0x250
[   23.769851]  do_syscall_64+0x95/0x180
[   23.770205]  ? __lock_acquire+0x45f/0x25c0
[   23.770590]  ? __lock_acquire+0x45f/0x25c0
[   23.770987]  ? __handle_mm_fault+0x7df/0xfa0
[   23.771395]  ? reacquire_held_locks+0xd2/0x1f0
[   23.771812]  ? do_user_addr_fault+0x555/0x8a0
[   23.772229]  ? lock_acquire+0xd0/0x310
[   23.772584]  ? find_held_lock+0x2b/0x80
[   23.772934]  ? do_user_addr_fault+0x59f/0x8a0
[   23.773350]  ? do_user_addr_fault+0x5a9/0x8a0
[   23.773761]  ? trace_hardirqs_off+0x4b/0xc0
[   23.774169]  ? lockdep_hardirqs_on_prepare+0xdb/0x190
[   23.774643]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[   23.775111] RIP: 0033:0x7f058654c15d
[   23.775451] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d fb 5c 0c 00 f7 d8 64 89 01 48
[   23.777180] RSP: 002b:00007ffccf368718 EFLAGS: 00000246 ORIG_RAX: 00000000000000a9
[   23.777872] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f058654c15d
[   23.778535] RDX: 0000000045584543 RSI: 0000000028121969 RDI: 00000000fee1dead
[   23.779181] RBP: 00007ffccf368760 R08: 0000004d00000000 R09: 0000004d00000000
[   23.779836] R10: 00007f0586640f30 R11: 0000000000000246 R12: 0000000000401070
[   23.780497] R13: 00007ffccf368840 R14: 0000000000000000 R15: 0000000000000000
[   23.781181]  </TASK>
[   23.781485] Enabling non-boot CPUs ...
[   23.781875] crash hp: kexec_trylock() failed, kdump image may be inaccurate
[   23.782558] smpboot: Booting Node 0 Processor 1 APIC 0x1
[   23.784675] CPU1 is up
[   23.789380] virtio_blk virtio1: 2/0/0 default/read/poll queues
[   23.794137] OOM killer enabled.
Success794454] Restarting tasks ... done.

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux