From nobody Fri Nov 1 01:07:34 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XfjQH4Hm8z5bH3h; Fri, 01 Nov 2024 01:07:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XfjQH3pBTz4JBq; Fri, 1 Nov 2024 01:07:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730423255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6iEbChIGCuhkZMoX8e4sfyKdKv5aBuFKrd1g4ncZJz8=; b=s4HzTpuQR98BDMoN5cLnUyhqwQu42GZBo9GkQTJd4bEwtKcNULsujoQGKnxFfKoN0q5+Uq Y2Xw4SAhE54fdx0BDpsE8y+hZ5UZb2203SibQ2K0l4PRWUz6DLD2/sd0xWW7AiPMPP2UY/ hNmmUbb8IH+FNAoS1PyLmBR1SDHFQoDN0nFXc9+UY0vy/pLkwzJJdQAO+Bfrc48q4iMglJ oSUZVjDkp0PEa7Va6ggpXgiE+l2sKbXLmhmtL7BMaavecxm7qnngjLbkhH95wBIegzveoV iFIUUVy3yXZ/M2S6E9JdNg5YHYXqtsRZuaCTpA9gRpsg2p1F4W8lpGQgfp15vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730423255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6iEbChIGCuhkZMoX8e4sfyKdKv5aBuFKrd1g4ncZJz8=; b=AQKaajgvRVcA42S6WsN8fiFeq7o/bVJUbxu73nuWPMNVSrrFbB/ZzYDTJ8R/jA5EfQyGuN B6Ir9V5y06Orvke+09bIP3lrIt22iC04i1eiFu+4hyqrnKBlkfxfa2uwaRY8fzZQ0Ah9NK kN0d//DlOqQBpdKGBACmuFBFcArJmJiGdYJfNoQs53wnUGSf7JbCWy8zZ8NIreBFDqkmc5 trAbBvTPquG4FLF00YYGvSyMl6EVrPqkiz42p39DR2WYJtMrrVhR4gR8gs7ODbpjTiDrg+ rW0qlB3MfOmXeAG5Ps4T971ZSPdZLZmsLvqa+bT/Rz19vO21T7mGYFDAHePRbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730423255; a=rsa-sha256; cv=none; b=Ee0dMRekntMAe/GAZI8pk999A7XlRWB7aqVsKImYcO+y+fpZTbrUZ1CXOlCclaRN/uX+tn S3vTPYL7ue8jEVmK9frncWDB+ThjhuxJGgMn5ludlyQo/zzIAjvSbZJydI/39gYMk/OUfG SVU4FTTfyQRgDivQAkkkDsKDSf7HEY1I36kp9n0iIj4ua1PjKI9dxSROmDbyphesdh4hk7 y2JW3i4GunW5LbNKyxjkeTmiuSDV5a2r0AJRMu426/eRWXZxMSR5fPw+wR3Ns3Ns/6ntkY 5Qs55Y/S8J0ljUq6KyCdLEYWDAlnDHSz/xZwe3/Sy23jT47nlzeAnjlli7P+DA== Received: from ralga.knownspace (unknown [IPv6:2600:2b00:a720:d301:9f03:382a:d672:81f0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XfjQH2JpKz1JQs; Fri, 1 Nov 2024 01:07:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Thu, 31 Oct 2024 21:07:34 -0400 From: Justin Hibbits To: Ravi Pokala Cc: , Subject: Re: Direct dumped kernel cores Message-ID: <20241031210734.283a2fb5@ralga.knownspace> In-Reply-To: <63B5260F-C835-4BFF-92ED-767AD0CEFE05@panasas.com> References: <20241031182354.14fa48aa@ralga.knownspace> <63B5260F-C835-4BFF-92ED-767AD0CEFE05@panasas.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.43; powerpc64le-unknown-linux-gnu) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 31 Oct 2024 15:33:39 -0700 Ravi Pokala wrote: > Hi Justin, >=20 > So, this is like the 'crashkernel' thing Linux has, where it kexec()s > an alternate kernel when the main one panics? If your description is accurate, then probably. I don't know if the crashkernel thing from Linux existed when this was started, and actually hadn't even heard of it until now. >=20 > I haven't looked at the patch -- most of it will be way out of my > expertise -- but what, if anything, is done to make sure the on-disk > state of the target filesystem is okay, before the "rescue" kernel > starts writing to it? Good question. The rescue kernel embeds its own small rootfs it fscks the target fs before writing to it. - Justin >=20 > Thanks, >=20 > Ravi (rpokala@) >=20 > =EF=BB=BF-----Original Message----- > From: > on behalf of Justin Hibbits > > Date: Thursday, > October 31, 2024 at 15:23 To: >, > Subject: Direct dumped kernel cores >=20 >=20 > Hi everyone, >=20 >=20 > At Juniper we've been using a so-called 'rescue' kernel for dumping > vmcores directly to the filesystem after a panic. We're now > contributing this feature, implemented by Klara Systems, to FreeBSD, > and looking for feedback. I posted a review > at https://reviews.freebsd.org/D47358 > for anyone interested. >=20 >=20 > Interesting bits to keep in mind: > * It requires a 2-stage build process, one to build the rescue kernel, > the other to build the main kernel, which embeds the rescue kernel > inside its image. This might need some further work. > * Thus far it's been implemented for amd64 and arm64, once proven out, > other architectures (powerpc64/le, riscv64) can follow suit. > * Kernel environment bits to pass down to the rescue kernel are > prefixed `debug.rescue.`, for instance > `debug.rescue.vfs.root.mountfrom`. >=20 >=20 > There are many more details in the review summary. >=20 >=20 > We'd love to get feedback from anyone interested. >=20 >=20 > Thanks, > Justin Hibbits >=20 >=20 >=20 >=20 >=20 >=20