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

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1bf39343-c9b2-353c-63e7-8604adc9d391>