Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	 Jason Wang <jasowang@redhat.com>
Cc: "x86@kernel.org" <x86@kernel.org>, hpa <hpa@zytor.com>,
	dyoung <dyoung@redhat.com>, kexec <kexec@lists.infradead.org>,
	linux-ext4 <linux-ext4@vger.kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Stefano Garzarella <sgarzare@redhat.com>,
	eperezma <eperezma@redhat.com>,
	Paolo Bonzini <bonzini@redhat.com>,
	 ming.lei@redhat.com, Petr Mladek <pmladek@suse.com>,
	John Ogness <jogness@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: Lockdep warnings on kexec (virtio_blk, hrtimers)
Date: Thu, 12 Dec 2024 19:19:36 +0000	[thread overview]
Message-ID: <dd06cd643ee7fa0be08ac3082cff443b8bfbfb58.camel@infradead.org> (raw)
In-Reply-To: <87a5d0aibc.ffs@tglx>

[-- Attachment #1: Type: text/plain, Size: 2633 bytes --]

On Thu, 2024-12-12 at 19:04 +0100, Thomas Gleixner wrote:
> 
> I tried to reproduce, but failed. Do you have a simple reproducer
> recipe?

Build current master (231825b2e1ff here). The config I'm using is at
http://david.woodhou.se/config-x86-kjump-irqs although I don't think
there's anything special other than CONFIG_KEXEC_JUMP and enough
lockdep to trigger the complaints.

Build the test case from
https://git.kernel.org/torvalds/c/07fa619f2a40c (which at some point
I'll clean up and add to the kernel selftests).

Then just run it repeatedly. Ten or twenty invocations should trigger
it at least once.

I've been running in qemu with the test case shoved into an initrd for
faster testing, but it works just as well done manually. If it matters,
the QEMU command line on my Haswell box is

 qemu-system-x86_64 -accel kvm,kernel-irqchip=split -display none \
   -serial mon:stdio -kernel arch/x86/boot/bzImage -smp 2 -m 2g \
   -append "console=ttyS0 root=/dev/vda1 no_console_suspend earlyprintk=serial" \
   -drive file=/var/lib/libvirt/images/fedora.qcow2,if=virtio \
   -cpu host --no-reboot -nic user,model=virtio 

Probably the only important part of that is the no_console_suspend.

A normal invocation looks like this:

[root@localhost ~]# ./loadret
[   83.908243] Freezing user space processes
[   83.910587] Freezing user space processes completed (elapsed 0.001 seconds)
[   83.911614] OOM killer disabled.
[   83.923550] ata2: found unknown device (class 0)
[   83.938623] Disabling non-boot CPUs ...
[   83.962083] smpboot: CPU 1 is now offline
[   83.963022] crash hp: kexec_trylock() failed, kdump image may be inaccurate
B[   83.983498] Enabling non-boot CPUs ...
[   83.984410] crash hp: kexec_trylock() failed, kdump image may be inaccurate
[   83.985792] smpboot: Booting Node 0 Processor 1 APIC 0x1
[   83.989823] CPU1 is up
[   83.999270] virtio_blk virtio1: 2/0/0 default/read/poll queues
[   84.004705] OOM killer enabled.
[   84.005299] Restarting tasks ... done.
Success


But sometimes it looks like this...

[root@localhost ~]# ./loadret
[   84.618610] Freezing user space processes
[   84.621427] Freezing user space processes completed (elapsed 0.001 seconds)
[   84.622510] OOM killer disabled.
[   84.628613] ata2: found unknown device (class 0)
[   84.652758] Disabling non-boot CPUs ...
[   84.672223] smpboot: CPU 1 is now offline
[   84.673091] crash hp: kexec_trylock() failed, kdump image may be inaccurate
B[   84.682946] ------------[ cut here ]------------
[   84.683584] Interrupts enabled after irqrouter_resume+0x0/0x50


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]

  reply	other threads:[~2024-12-12 19:32 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:28 Lockdep warnings on kexec (virtio_blk, hrtimers) David Woodhouse
2024-12-10  1:56 ` Jason Wang
2024-12-11 12:42   ` Stefan Hajnoczi
2024-12-12 11:07     ` David Woodhouse
2024-12-12 13:34       ` Thomas Gleixner
2024-12-12 13:46         ` David Woodhouse
2024-12-12 18:04           ` Thomas Gleixner
2024-12-12 19:19             ` David Woodhouse [this message]
2024-12-13  0:14               ` Thomas Gleixner
2024-12-13  9:31                 ` David Woodhouse
2024-12-13  9:43                   ` David Woodhouse
2024-12-13 10:42                     ` Thomas Gleixner
2024-12-13 11:09                       ` Ming Lei
2024-12-13 11:31                         ` Thomas Gleixner
2024-12-13 11:48                           ` Ming Lei
2024-12-13 13:23                             ` Thomas Gleixner
2024-12-13 14:07                               ` David Woodhouse
2024-12-13 17:05                                 ` Thomas Gleixner
2024-12-13 17:17                                   ` David Woodhouse
2024-12-13 17:48                                     ` Rafael J. Wysocki
2024-12-13 17:32                                   ` Rafael J. Wysocki
2024-12-13 19:06                                     ` Rafael J. Wysocki
2024-12-13 20:16                                       ` David Woodhouse
2024-12-14  9:57                                         ` David Woodhouse
2024-12-16 12:14                                           ` Rafael J. Wysocki
2024-12-13 17:59                                   ` Rafael J. Wysocki
2024-12-13 13:17                           ` David Woodhouse
2024-12-13 11:12                       ` David Woodhouse
2024-12-13 11:33                         ` Ming Lei
2024-12-13 11:20                 ` Peter Zijlstra
2024-12-13 13:13                   ` Thomas Gleixner
2024-12-16 13:20                     ` [PATCH] sched: Prevent rescheduling when interrupts are disabled Thomas Gleixner
2024-12-16 17:41                       ` David Woodhouse
2024-12-12 11:12     ` Lockdep warnings on kexec (virtio_blk, hrtimers) Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd06cd643ee7fa0be08ac3082cff443b8bfbfb58.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=bonzini@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=eperezma@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jasowang@redhat.com \
    --cc=jogness@linutronix.de \
    --cc=kexec@lists.infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=mst@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox