Article View: muc.lists.freebsd.hackers
Article #57Re: watchdogd rc ordering
From: Dave Cottlehuber
Date: Mon, 26 Oct 2026 10:20
Date: Mon, 26 Oct 2026 10:20
79 lines
6069 bytes
6069 bytes
On Fri, 23 Oct 2026, at 23:23, Adrian Chadd wrote: > hi! > > On Thu, 22 Oct 2026 at 04:26, Dave Cottlehuber <dch@freebsd.org> wrote: >> hi, >> >> I am working on a driver that attaches the ARM SBSA Generic Watchdog >> described by GTDT and takes it over from firmware, for DGX Spark[1]. >> >> Watchdogd starts via rc, and then all is well. But between when >> the driver loads, and when rc kicks in, I need to wait for network, >> because the rc ordering puts it after: >> >> # PROVIDE: watchdogd >> # REQUIRE: FILESYSTEMS syslogd >> # KEYWORD: nojail shutdown >> >> Would this not make more sense to happen earlier, such as `REQUIRE: DISK`? >> >> This seems mostly to be working so far, unless the NICs take longer >> than ~ 20s to initialise, in which case the watchdog timer fires *before* >> the userland watchdog rc script gets called to "pet the dog" in time. >> >> In my case, the mlx5en driver does take longer to initialise, because I >> don't have anything to plug it into, so the box times out & panics. >> > > Is the problem here that the watchdog is already armed by the firmware? Yes > Are you explicitly re-configuring the timeout to some defined value? That’s what watchdogd does, in the rc script - the driver just follows its lead. > IIRC when working on this stuff for MIPS platforms you'll want a couple > of things: > > * the driver self pats the watchdog until userland says "i'm ready to > pat the watchdog again" Ok that’s good to know, I wondered if this is ok, because if something happens during boot we could be wedged indefinitely and not trigger. > at which point it goes back to userland triggered patting; > * some optional configuration that you can set that starts the watchdog > at attach time > to set to some value that's notionally useful (ie, "the watchdog > should fire if the box > doesn't boot far enough in say, 60 seconds.") > > So I /can/ see having watchdogd started earlier being useful - as long > as whatever > it needs is available! - but unless we're defining it ourselves in the > driver, we may > see weird platform behaviour differences that lead to unwanted reboots. > > nice work though, I'm glad we're booting and running on it! I won’t confess how long it took me to realise that the reason there’s no crash dump was because of a watchdog, but it was measured in days not hours… A+ Dave ——— O for a muse of fire, that would ascend the brightest heaven of invention! -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<880f1d4f-766e-4329-8353-aa4c7ce2a672@app.fastmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<> <CAJ-Vmo=augejFnsmY8FUapZmUADjWnK6pR6tiKxZdZ7LSiL4sQ@mail.gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: "Dave Cottlehuber" <dch@FreeBSD.org>
Newsgroups: muc.lists.freebsd.hackers
Subject: Re: watchdogd rc ordering
Date: Mon, 26 Oct 2026 11:20:09 +0100
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-hackers@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <880f1d4f-766e-4329-8353-aa4c7ce2a672@app.fastmail.com>
References: <> <CAJ-Vmo=augejFnsmY8FUapZmUADjWnK6pR6tiKxZdZ7LSiL4sQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="94104"; mail-complaints-to="news-admin@muc.de"
X-Original-To: hackers@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1793010031;
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-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