Article View: muc.lists.freebsd.hackers
Article #58Re: watchdogd rc ordering
From: Sulev-Madis Silber
Date: Mon, 26 Oct 2026 11:01
Date: Mon, 26 Oct 2026 11:01
109 lines
8219 bytes
8219 bytes
On October 26, 2026 12:20:09 PM GMT+02:00, Dave Cottlehuber <dch@FreeBSD.org> wrote: >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. that would be ok if driver has some <5min timeout there after which it decides that boot is stalled and resets system in a hope to boot cleanly some boards have really short timeout like 8s and you have to start patting immediately and boot really fast if you want to stay up while ultra fast timeouts would be fine if it boots up, as 8s missed is likely frozen system, a boot might take slightly longer and it's fine. unless it just bootloops but watchdog is not really meant to solve this in some applications a bootloop due timed out network is even ok if network is critical for system operation i think some intermediate timeout in kernel would be needed to allow boot to take reasonable time on systems with super short hw wdt timeouts (adhd dogs?) > >> 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:
<B941D742-B50E-4DAC-A486-A28076DE3E5D@ketas.si.pri.ee>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:
<880f1d4f-766e-4329-8353-aa4c7ce2a672@app.fastmail.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: Sulev-Madis Silber <freebsd-hackers-freebsd-org952@ketas.si.pri.ee> Newsgroups: muc.lists.freebsd.hackers Subject: Re: watchdogd rc ordering Date: Mon, 26 Oct 2026 13:01:39 +0200 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-hackers@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <B941D742-B50E-4DAC-A486-A28076DE3E5D@ketas.si.pri.ee> References: <880f1d4f-766e-4329-8353-aa4c7ce2a672@app.fastmail.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="25317"; mail-complaints-to="news-admin@muc.de" User-Agent: K-9 Mail for Android DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793012514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=wJWZwRozuE3lF+V8etERFmh5WpfWIh7w/R/FYdC/jDo=; b=NZbeHDgqo1t5x/yb+IefphDyUF+Y/BenWt64RzTjFH1DzKxRDlP5Is6f4/I+VBudSy2ILL TKh2vwqdy0LVrhKPVGIFg1k/L++TmkUa2edx+Pmeik4ZbWZwDp6ZmJ0jk/LKs8wuXj6nPv NM3HrdiZaMzGSrrzInc4/G4OBehSOzcR0msvpeOTygvdSNBhfc32NR7T1QsFWJBs6NqPwq eSSG1mE72RVzcjDSSMTOZ5iA6PsXzj9w02lIutOg2z+MbJg+LMjMg2zH/wTlxYuW8uOfUl D4wxtf7BRgCdChj24jpl+V//3UEdPTuuyyZSG3P9XB+3x1lMd0hFIZk0/ce1XA== X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ketas.si.pri.ee header.s=ketas-si-pri-ee-20240416002854-4096 header.b=rdbc81uy; spf=pass (mx1.freebsd.org: domain of freebsd-hackers-freebsd-org952@ketas.si.pri.ee designates 2001:7d0:8437:13e8:21e:bff:fea2:d004 as permitted sender) smtp.mailfrom=freebsd-hackers-freebsd-org952@ketas.si.pri.ee; dmarc=pass (policy=reject) header.from=ketas.si.pri.ee X-Clacks-Overhead: GNU Terry Pratchett DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ketas.si.pri.ee; s=ketas-si-pri-ee-20240416002854-4096; t=1793012500; bh=oD9RW2/Ecijz+4p0JuPx7nVboszWxYpltgGZpY2CXps=; h=Date:From:To:Subject:In-Reply-To:References; b=rdbc81uyrExaO9aBq3vtb5lMsYwi58C0GDRacb6eztCByJLHamIAdHDvbFk+YQi+J zF/ke+IVZWFlbZyd6q3aE79z0SucN0QgRS8ZkMH/GNUI1lvDAdd4DCIsZ+17isVqJM JNQbdA2yRolEY9Eij8DlbrjqBYHCg4nS9KjHtYGlnucoKQmzrIo1uvphqZzpNGOzHX ib5lz/Zq4B+TsbFaz/uQpzNL3jBLt4NXEu7UTGBJFawNbPFIyjJJ0b9E+Sevw5rlby 7Eh1T3YqZyvmA+NQuJOr5eGh1XUe0s6CnhqxT+d5WhPvivloXYgEvbb5hvkXs2shNV fBhgSEc1nOcBwKwBQkB1uiCYBqxbEufGOU3fcQCLftciEUPaCzmGeqYbmXS9hIl/tr UMvT/mcZDdHHDxN1ahku9TWbJ7fhEFY/xwE4B1HxBEIIy+vWpTL3IjGZvC/g+ro/Bj lAeWYNZIecznklRVnGDAJ5HjAnTU87Fduz0CXMaPl98KzFDfPAMOH6NMChkyYQ5BXS /ZnOe/0xRfMrVLiKQqG6OveSOMBmafLXRShc4a5w6K9CuUU9XcCJxPnBwd4sYJjDfN +WnB0Lx8WqbxeIiv6v6AnKsooudSa6iURwjZFA7W3M0U/D1mkbqA/LewqFvl90lGKq Krdx4n8nQ8JJbJ8xQvrqR508= X-Passed-Through: http://ketas.si.pri.ee/ In-Reply-To: <880f1d4f-766e-4329-8353-aa4c7ce2a672@app.fastmail.com> Precedence: list X-Spamd-Bar: ++ X-Spamd-Result: default: False [2.20 / 15.00]; HFILTER_HOSTNAME_5(3.00)[d004-fea2-0bff-021e-13e8-8437-07d0-2001.dyn.estpak.ee]; DMARC_POLICY_ALLOW(-0.50)[ketas.si.pri.ee,reject]; R_SPF_ALLOW(-0.20)[+ip6:2001:7d0:8437:1300::/56]; ONCE_RECEIVED(0.20)[]; R_DKIM_ALLOW(-0.20)[ketas.si.pri.ee:s=ketas-si-pri-ee-20240416002854-4096]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:3249, ipnet:2001:7d0::/32, country:EE]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_ALL(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[ketas.si.pri.ee:+] X-Rspamd-Queue-Id: 4jCrKn1DNZz4CvB X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes