Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jan 2022 09:16:46 -0500
From:      Mark Johnston <markj@freebsd.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Mateusz Guzik <mjguzik@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: Debugging a (potentially?) ZFS-related panic, and discussion about large patchsets
Message-ID:  <Yd2RTqQxO4JqJ5gr@nuc>
In-Reply-To: <1bf39343-c9b2-353c-63e7-8604adc9d391@FreeBSD.org>
References:  <20220110221116.gustgfgfge6pb5fe@mutt-hbsd> <YdzCatNYBVDFi9So@nuc> <CAGudoHHuNbYNFsc3vqihFkQ0xA9Hojp21-QuHczVXvMVSHfQ5w@mail.gmail.com> <1bf39343-c9b2-353c-63e7-8604adc9d391@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 11, 2022 at 09:28:27AM +0200, Andriy Gapon wrote:
> On 11/01/2022 01:43, Mateusz Guzik wrote:
> > imo the kernel should be patched to obtain the trace on its own. As
> > the target has interrupts disabled it will have to do it with NMI, but
> > support for that got scrapped in
> > 
> > commit 1c29da02798d968eb874b86221333a56393a94c3
> > Author: Mark Johnston<markj@FreeBSD.org>
> > Date:   Fri Jan 31 15:43:33 2020 +0000
> > 
> >      Reimplement stack capture of running threads on i386 and amd64.
> 
> This is an off-topic for the thread, but as far as I recall, even when the stack 
> capture (e.g., for procstat -k) was implemented using NMI there was a piece of 
> code in the corresponding NMI handler that skipped the stack tracing if 
> interrupts were disabled.  I don't recall / know why.
> You can see that in the removed stack_nmi_handler() that used to be in 
> sys/x86/x86/stack_machdep.c.

I think it may have been to avoid tracing threads in the middle of a
context switch, but I can't remember exactly which inconsistencies were
problematic.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Yd2RTqQxO4JqJ5gr>