All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: xen-devel@lists.xenproject.org
Subject: Re: NetBSD dom0 PVH: hardware interrupts stalls
Date: Tue, 24 Nov 2020 16:23:11 +0100	[thread overview]
Message-ID: <ca994a9d-92c2-9cc6-1315-cb71cd3ffeed@suse.com> (raw)
In-Reply-To: <20201124145927.zrbsmvs6qvaxh4hf@Air-de-Roger>


[-- Attachment #1.1.1: Type: text/plain, Size: 3058 bytes --]

On 24.11.20 15:59, Roger Pau Monné wrote:
> On Tue, Nov 24, 2020 at 03:42:28PM +0100, Jan Beulich wrote:
>> On 24.11.2020 11:05, Jan Beulich wrote:
>>> On 23.11.2020 18:39, Manuel Bouyer wrote:
>>>> On Mon, Nov 23, 2020 at 06:06:10PM +0100, Roger Pau Monné wrote:
>>>>> OK, I'm afraid this is likely too verbose and messes with the timings.
>>>>>
>>>>> I've been looking (again) into the code, and I found something weird
>>>>> that I think could be related to the issue you are seeing, but haven't
>>>>> managed to try to boot the NetBSD kernel provided in order to assert
>>>>> whether it solves the issue or not (or even whether I'm able to
>>>>> repro it). Would you mind giving the patch below a try?
>>>>
>>>> With this, I get the same hang but XEN outputs don't wake up the interrupt
>>>> any more. The NetBSD counter shows only one interrupt for ioapic2 pin 2,
>>>> while I would have about 8 at the time of the hang.
>>>>
>>>> So, now it looks like interrupts are blocked forever.
>>>
>>> Which may be a good thing for debugging purposes, because now we have
>>> a way to investigate what is actually blocking the interrupt's
>>> delivery without having to worry about more output screwing the
>>> overall picture.
>>>
>>>> At
>>>> http://www-soc.lip6.fr/~bouyer/xen-log5.txt
>>>> you'll find the output of the 'i' key.
>>>
>>> (XEN)    IRQ:  34 vec:59 IO-APIC-level   status=010 aff:{0}/{0-7} in-flight=1 d0: 34(-MM)
>>>
>>> (XEN)     IRQ 34 Vec 89:
>>> (XEN)       Apic 0x02, Pin  2: vec=59 delivery=LoPri dest=L status=1 polarity=1 irr=1 trig=L mask=0 dest_id:00000001
>>
>> Since it repeats in Manuel's latest dump, perhaps the odd combination
>> of status=1 and irr=1 is to tell us something? It is my understanding
>> that irr ought to become set only when delivery-status clears. Yet I
>> don't know what to take from this...
> 
> My reading of this is that one interrupt was accepted by the lapic
> (irr=1) and that there's a further interrupt pending that hasn't yet
> been accepted by the lapic (status=1) because it's still serving the
> previous one. But that's all weird because there's no matching
> vector in ISR, and hence the IRR bit on the IO-APIC has somehow become
> stale or out of sync with the lapic state?
> 
> I'm also unsure about how Xen has managed to reach this state, it
> shouldn't be possible in the first place.
> 
> I don't think I can instrument the paths further with printfs because
> it's likely to result in the behavior itself changing and console
> spamming. I could however create a static buffer to trace relevant
> actions and then dump all them together with the 'i' debug key output.

debugtrace is your friend here. It already has a debug key for printing
the buffer contents to console ('T').

As the buffer is wrap-around you can even add debug prints in the
related interrupt paths for finding out which paths have been called in
which order and on which cpu. Depending on the findings you might want
to use percpu buffers.


Juergen

[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  parent reply	other threads:[~2020-11-24 15:23 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17 15:09 NetBSD dom0 PVH: hardware interrupts stalls Manuel Bouyer
2020-11-17 15:58 ` Roger Pau Monné
2020-11-17 16:40   ` Manuel Bouyer
2020-11-18  8:57     ` Roger Pau Monné
2020-11-18  9:24       ` Manuel Bouyer
2020-11-18 10:00         ` Roger Pau Monné
2020-11-18 12:14           ` Manuel Bouyer
2020-11-18 14:39             ` Roger Pau Monné
2020-11-18 14:59               ` Jan Beulich
2020-11-19 14:19                 ` Roger Pau Monné
2020-11-19 15:57                   ` Manuel Bouyer
2020-11-19 16:57                     ` Manuel Bouyer
2020-11-19 17:57                       ` Manuel Bouyer
2020-11-20  8:09                         ` Jan Beulich
2020-11-20  8:28                           ` Roger Pau Monné
2020-11-20  8:52                             ` Manuel Bouyer
2020-11-20  8:59                               ` Jan Beulich
2020-11-20  9:27                                 ` Manuel Bouyer
2020-11-20 10:00                                   ` Jan Beulich
2020-11-20 10:38                                     ` Manuel Bouyer
2020-11-23  9:57                                       ` Roger Pau Monné
2020-11-23 11:32                                         ` Manuel Bouyer
2020-11-23 12:51                                           ` Roger Pau Monné
2020-11-23 14:31                                             ` Manuel Bouyer
2020-11-23 17:06                                               ` Roger Pau Monné
2020-11-23 17:39                                                 ` Manuel Bouyer
2020-11-24 10:05                                                   ` Jan Beulich
2020-11-24 12:21                                                     ` Roger Pau Monné
2020-11-24 13:59                                                       ` Manuel Bouyer
2020-11-24 14:09                                                         ` Jan Beulich
2020-11-24 14:27                                                           ` Manuel Bouyer
2020-11-24 14:33                                                             ` Jan Beulich
2020-11-24 14:36                                                               ` Jan Beulich
2020-11-24 14:52                                                             ` Jan Beulich
2020-11-24 15:00                                                               ` Roger Pau Monné
2020-11-24 15:08                                                               ` Manuel Bouyer
2020-11-24 15:49                                                                 ` Roger Pau Monné
2020-11-24 16:09                                                                   ` Manuel Bouyer
2020-11-26 13:34                                                                     ` Roger Pau Monné
2020-11-26 14:16                                                                       ` Manuel Bouyer
2020-11-26 14:26                                                                         ` Roger Pau Monné
2020-11-26 15:09                                                                           ` Roger Pau Monné
2020-11-26 17:20                                                                             ` Manuel Bouyer
2020-11-27 10:59                                                                               ` Roger Pau Monné
2020-11-27 11:18                                                                                 ` Jan Beulich
2020-11-27 11:19                                                                                 ` Manuel Bouyer
2020-11-27 11:21                                                                                   ` Jan Beulich
2020-11-27 13:10                                                                                     ` Manuel Bouyer
2020-11-27 13:14                                                                                       ` Jan Beulich
2020-11-27 13:18                                                                                         ` Manuel Bouyer
2020-11-27 11:29                                                                                 ` Jan Beulich
2020-11-27 13:13                                                                                   ` Manuel Bouyer
2020-11-27 13:18                                                                                     ` Jan Beulich
2020-11-27 13:31                                                                                       ` Manuel Bouyer
2020-11-27 13:40                                                                                         ` Jan Beulich
2020-11-27 13:49                                                                                           ` Jürgen Groß
2020-11-27 13:59                                                                                           ` Manuel Bouyer
2020-11-27 20:22                                                                                             ` Roger Pau Monné
2020-11-27 21:44                                                                                               ` Manuel Bouyer
2020-11-28 14:53                                                                                                 ` Roger Pau Monné
2020-11-28 17:14                                                                                                   ` Manuel Bouyer
2020-11-29  9:23                                                                                                     ` Manuel Bouyer
2020-11-30 10:00                                                                                                     ` Jan Beulich
2020-11-30 10:28                                                                                                       ` Manuel Bouyer
2020-11-30 11:35                                                                                                       ` Manuel Bouyer
2020-11-30 11:44                                                                                                         ` Jan Beulich
2020-11-30 11:50                                                                                                           ` Manuel Bouyer
2020-11-30 12:09                                                                                                             ` Jan Beulich
2020-11-24 14:42                                                     ` Jan Beulich
2020-11-24 14:59                                                       ` Roger Pau Monné
2020-11-24 15:18                                                         ` Manuel Bouyer
2020-11-24 15:23                                                         ` Jürgen Groß [this message]
2020-11-20  8:54                             ` Jan Beulich
2020-11-20  9:13                               ` Manuel Bouyer
2020-11-23  9:49                               ` Roger Pau Monné
2020-11-18 15:03               ` Manuel Bouyer
2020-11-18  9:16     ` Jan Beulich
2020-11-18  9:28       ` Manuel Bouyer
2020-11-18  9:43         ` Jan Beulich
2020-11-18 10:14           ` Manuel Bouyer
2020-11-18 11:17             ` Jan Beulich

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=ca994a9d-92c2-9cc6-1315-cb71cd3ffeed@suse.com \
    --to=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.