From owner-freebsd-embedded@freebsd.org Fri Sep 27 19:19:30 2019 Return-Path: Delivered-To: freebsd-embedded@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E7C7512AA8D for ; Fri, 27 Sep 2019 19:19:30 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-vs1-xe42.google.com (mail-vs1-xe42.google.com [IPv6:2607:f8b0:4864:20::e42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g1nY5Csqz4Cdj for ; Fri, 27 Sep 2019 19:19:29 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by mail-vs1-xe42.google.com with SMTP id d204so2586535vsc.12 for ; Fri, 27 Sep 2019 12:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ddteam-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=stzHSqCRyK8vupNlLCFRdFECStT83Xo0QMdh+MWg8Zw=; b=YT4rErSamQuK1z7qFwCdi5HTv2b9EaFOGBcGBXWkodhYxOHL0rWOVdjNwZPo1M9s0p u55eDG9fJ0X8T+F4S20yBaUJvjuT0LXQ2FgmvtF+5wfwsM5rsJwWpRNpudAzL7ZFtjpz 6zlfX+u6LpeIjTyFnXZ4bXloqKuUgYKZVAeIOgttlWqSPs6rojE8iKA1GfM7VAnfgLPP 2fOviUF5AKmg7rVc2TyYRQ39saGI5Kg94JCXVa7q9wmgY1ceT5olUOV39x8MdSbw54L9 SOEouihqp8s6T9+XoV5V2cgDyhWokwf3aIQ8vuJHWy1a/W4spOiB6areyHL+wJT9hbV1 H0pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=stzHSqCRyK8vupNlLCFRdFECStT83Xo0QMdh+MWg8Zw=; b=ffdhIwZG5f8E/ckO3frKxKYP2AFgDb/45RTe04PtHlURloBn/cI7WGTmeMrx+EtivL /eYfq0TW55/SqC0edRANbEZH9h0CmmrQmUL31Bc0KlFIy9KfM4sYU06kqNUvz++YBDGf C/uHynLUesz/LhBhdb9ydejVtPM7sF3lkqaYPYuXtg4PAILzcia6p+43tg5JQvFUS23D HU3zGaDVWskoTxtRIb55/CXuy4QsxTlYkUlz5eZeNP4esL98RX3wzbKqFQfiQjiuWgyZ BhgMhDbJxZ6dVCTB8yHyDSl5Sp/jG3G0ZOUCmf1/ga09R4aXY61H8tT8iHKcYWI0PhAH BcmA== X-Gm-Message-State: APjAAAUSVEZmH3nMO9OU6y25Pk0eeNeLmJ9m4Yw0bHlFfSiK7VH47fjg Hzyeo9DK2sGPXJPV4MRmHTMdMYs0RIG70XaN+EjuNg== X-Google-Smtp-Source: APXvYqzK5nKFcidZz09OWB8qDjNLeo2P92E7yrtJQfxNm6lVDsE76f5TaIBCsv2R3s2wCBO3iI5a3jEe7duFgsH/RXk= X-Received: by 2002:a67:d594:: with SMTP id m20mr3557695vsj.144.1569611967745; Fri, 27 Sep 2019 12:19:27 -0700 (PDT) MIME-Version: 1.0 References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> In-Reply-To: From: Oleksandr Rybalko Date: Fri, 27 Sep 2019 22:19:16 +0300 Message-ID: Subject: Re: watchdogd stat location To: Warner Losh Cc: mike tancsa , freebsd-embedded X-Rspamd-Queue-Id: 46g1nY5Csqz4Cdj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ddteam-net.20150623.gappssmtp.com header.s=20150623 header.b=YT4rErSa; dmarc=none; spf=softfail (mx1.freebsd.org: 2607:f8b0:4864:20::e42 is neither permitted nor denied by domain of ray@ddteam.net) smtp.mailfrom=ray@ddteam.net X-Spamd-Result: default: False [-1.81 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_DKIM_ALLOW(-0.20)[ddteam-net.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-embedded@freebsd.org]; DMARC_NA(0.00)[ddteam.net]; R_SPF_SOFTFAIL(0.00)[~all]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ddteam-net.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2.4.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-0.52)[ip: (2.23), ipnet: 2607:f8b0::/32(-2.59), asn: 15169(-2.17), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2019 19:19:31 -0000 =D0=BF=D1=82, 27 =D0=B2=D0=B5=D1=80. 2019 =D0=BE 19:22 Warner Losh =D0=BF=D0=B8=D1=88=D0=B5: > On Fri, Sep 27, 2019 at 9:36 AM mike tancsa wrote: > > > We sometimes run into an issue where our embedded devices that boot off > > a read only SD card, hang with a controller error. Its not clear if > > this is a BIOS/firmware/SDCard or driver bug issue. Its pretty > > infrequent, but annoying enough that I started to dig to see why the bo= x > > is not rebooting via the hardware watchdog. It seems to fail to reboo= t > > the box as the stat that it does on the filesystem is off the md backed > > /etc which is not impacted. I know I could run an external program, bu= t > > would it be safer to change the default directory where the stat is don= e > > to something that is generally not mounted via ramdisk ? > > > > eg. > > > > > > diff -u watchdogd.c.orig watchdogd.c > > --- watchdogd.c.orig 2019-09-27 10:51:04.273113000 -0400 > > +++ watchdogd.c 2019-09-27 10:51:23.592200000 -0400 > > @@ -365,7 +365,7 @@ > > if (test_cmd !=3D NULL) > > failed =3D system(test_cmd); > > else > > - failed =3D stat("/etc", &sb); > > + failed =3D stat("/boot", &sb); > > > > error =3D watchdog_getuptime(&ts_end); > > if (error) { > > > > I think this is good. > > Warner > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.or= g > " > Why not just stat "/". I think embedded devices may have monolithic kernel w/o any loadable modules and book config. --=20 WBW ------- Rybalko Aleksandr