From owner-freebsd-embedded@freebsd.org Mon Sep 23 21:12:48 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 C0ABD121397 for ; Mon, 23 Sep 2019 21:12:48 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ccV747LTz4Y8Z for ; Mon, 23 Sep 2019 21:12:47 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:8c5f:a86d:d91d:3a2f] ([IPv6:2607:f3e0:0:4:8c5f:a86d:d91d:3a2f]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTPS id x8NLCkS1090715 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 23 Sep 2019 17:12:46 -0400 (EDT) (envelope-from mike@sentex.net) To: freebsd-embedded From: mike tancsa Subject: sdhci_pci0-slot0 errors Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hflX4nXqhenaNiia4iaZ9ft3I1ebd7GEbGnsWCvAnob5MvDZyStDAuRxPJK1ya/s +6rOvr+eQiXYNVvfBhrCfrtR/esSkitBGxhUkBjOti8QwzD71JVF5YaOjBAs7jZUKyLGj0kW yDg4jUndudWU7G2yc9GwpHJ9aRSUN8e/mWdIogK0v+QBHfv/dsI6zVB7YuxCC9Fx8WPwfhDH VZC4kdYCQWKXrm7yb4TiVdBh5kgvlO9q3js1yYdfR1x8m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M4pHELuUuVHS5XTpHa/wwulUtI5w/zyKlUDsIvqTPZLUEwH7DfNBueVM WyNaIjV2kxSmM8rNMC+RkgyfbjGLCkmWsMRVuLIUYpl5D9WHmenUbiErlKU2KvEEXEg/aLKq 3m/AdM9RAYsP9O4l+sAZEfyYoNJzDhTZMzn/9Q0uFPLK9smDQh4WBTFaApveVJPHRKmHPoNF Xxj+yScYdQ4SKH34WnhNSELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: <69eae90e-7fa7-f6f7-d702-469074f60cfa@sentex.net> Date: Mon, 23 Sep 2019 17:12:46 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46ccV747LTz4Y8Z X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::18 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-4.15 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-embedded@freebsd.org]; DMARC_NA(0.00)[sentex.net]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.85)[ip: (-0.68), ipnet: 2607:f3e0::/32(-4.94), asn: 11647(-3.56), country: CA(-0.09)]; TO_DN_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Mon, 23 Sep 2019 21:12:48 -0000 Not sure if its just bad luck as of late, but I am see a lot of such errors on RELENG_11 on my PCEngines APU3.  Are these bad SD cards, or am I hitting some recently introduced bug in the driver ?  A power cycle fixes the issue for a bit. vm_fault: pager read error, pid 1 (init) sdhci_pci0-slot0: Got AutoCMD12 error 0x0001, but there is no active command. sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x07020000 | Version:  0x00001001 sdhci_pci0-slot0: mmcsd0: Error indicated: 1 Timeout Blk size: 0x00005200 | Blk cnt:  0x00000008 sdhci_pci0-slot0: Argument: 0x0007f817 | Trn mode: 0x00000037 sdhci_pci0-slot0: Present:  0x01ff0000 | Host ctl: 0x00000007 sdhci_pci0-slot0: Power:    0x0000000f | Blk gap:  0x00000000 sdhci_pci0-slot0: Wake-up:  0x00000000 | Clock:    0x00000007 sdhci_pci0-slot0: Timeout:  0x0000000d | Int stat: 0x00000000 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000001 | Host ctl2:0x00000080 sdhci_pci0-slot0: Caps:     0x21fe32b2 | Caps2:    0x00000070 sdhci_pci0-slot0: Max curr: 0x00c80064 | ADMA err: 0x00000000 sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x000000ff sdhci_pci0-slot0: =========================================== g_vfs_done():mmcsd0s1a[READ(offset=267358208, length=4096)]error = 5 vnode_pager_generic_getpages_done: I/O read err BIOS Information         Vendor: coreboot         Version: 4.0.7         Release Date: 03/02/2017         ROM Size: 8192 kB         Characteristics:                 PCI is supported                 PC Card (PCMCIA) is supported                 BIOS is upgradeable                 Selectable boot is supported                 ACPI is supported                 Targeted content distribution is supported         BIOS Revision: 4.0         Firmware Revision: 0.0 From owner-freebsd-embedded@freebsd.org Fri Sep 27 15:36:06 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 EF296125FE4 for ; Fri, 27 Sep 2019 15:36:06 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46fwqn5v3Mz3xhp for ; Fri, 27 Sep 2019 15:36:05 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:297b:a41b:bb85:4128] ([IPv6:2607:f3e0:0:4:297b:a41b:bb85:4128]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTPS id x8RFa4x4055895 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 27 Sep 2019 11:36:04 -0400 (EDT) (envelope-from mike@sentex.net) To: freebsd-embedded From: mike tancsa Subject: watchdogd stat location Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hflX4nXqhenaNiia4iaZ9ft3I1ebd7GEbGnsWCvAnob5MvDZyStDAuRxPJK1ya/s +6rOvr+eQiXYNVvfBhrCfrtR/esSkitBGxhUkBjOti8QwzD71JVF5YaOjBAs7jZUKyLGj0kW yDg4jUndudWU7G2yc9GwpHJ9aRSUN8e/mWdIogK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mjQf/dBCjAVn1J0GzSsHiLvSAQz1cchbdy8LD0Tnpzjgp5KLU7sNojbI8vqt4yKAi cayI88j8+xxNXPMWM4pHELuUuVHS5XTpHa/wwulUtI5w/zyKlUDsIvqTPZLUEwH7DfNBueVM WyNaIjV2kxSmM8rNMC+RkgyfbjGLCkmWsMRVuLIUYpl5D9WHmenUbiErlKU2KvEEXEg/aLKq 3m/AdM9RAYsP9O4l+sAZEfyYoNJzDhTZMzn/9Q0uFPLK9smDQh4WBTFaApveVJPHRKmHPoNF Xxj+yScYdQ4SKH34WnhNSELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> Date: Fri, 27 Sep 2019 11:36:05 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46fwqn5v3Mz3xhp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::18 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-4.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-embedded@freebsd.org]; DMARC_NA(0.00)[sentex.net]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.90)[ip: (-0.90), ipnet: 2607:f3e0::/32(-4.94), asn: 11647(-3.56), country: CA(-0.09)]; TO_DN_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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 15:36:07 -0000 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 box is not rebooting via the hardware watchdog.   It seems to fail to reboot 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, but would it be safer to change the default directory where the stat is done 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 != NULL)                         failed = system(test_cmd);                 else -                       failed = stat("/etc", &sb); +                       failed = stat("/boot", &sb);                   error = watchdog_getuptime(&ts_end);                 if (error) {     ---Mike From owner-freebsd-embedded@freebsd.org Fri Sep 27 16:22:10 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 ABCBB12714E for ; Fri, 27 Sep 2019 16:22:10 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (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 46fxrx5hLfz41GD for ; Fri, 27 Sep 2019 16:22:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id f16so2413583qkl.9 for ; Fri, 27 Sep 2019 09:22:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aCwBBw8NxBS71Nug3A8OG7LcHDH5yvrZ3UjsoeQkzx0=; b=NFjuf09wZoSEzwyp/ONIVrAdBvXjcv9OnbeZ1Dc82InGZFTn4WFAhx6NUtFKN1o57Q lalZnn7ycu7QU5m1FSM6E1YX5GOesYU7Ho9htmxJq+cT6c3XkrvwfVmeNx7h0VehTqUH EE3KIuh5/w7/OVFbcDszfexShVkP320lahLMSmwPMlX/WzC0jbSXp6gTYeDaTfO/sdIj 3nTUQEteYk2ERnbC6Ksr4jccv2uqlz3uel3TZTbvD12crNgXL2FT/TpmFAd2mQH7R2fE VYhL4/71xRuLc6gas1JQI9Rny4VAvCD3DdeVEmVQ0H9wYvEDe/syg+PcwJZ157bIQ3xG /KEg== 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=aCwBBw8NxBS71Nug3A8OG7LcHDH5yvrZ3UjsoeQkzx0=; b=pviu9HqJOB+/cVF7nN+skiu6Rwi4h4O+OaZLNum0T8HHsFFw7PuVRGCbTM9A3pCimx e2FBwMdI/ga9om4/qV7TdPNm7BlHXdgHGr7dEQV8ib3SiUMtM1GFIevQ/qa4ASxHIwWE TUEG9a29fVhFuepUIoTPZhYXf3jRKfvyIe8nJ2Kfn8dqbXIPiKNQFp9Od7cCw+PgLzhR pruoiUrr5kx+yKRVZnpiHfhBMjOU4KlYO64Ia95Lc6Ddb4muHE+/crQDaiD+jiqdqjAc 6t5eSthCY3xo1SGKgLbhhs5QMLbK4WZp+aWc80sIkrH6DtDhvcRrTvvymTx0iQLgAC+E Pj+w== X-Gm-Message-State: APjAAAXJzn67/zxLqQjDuulPhWCx/rr6YMxy2f4p3aO/2LjZGi+qIWiv sybzAPTtZjIkFyGYZeizMu8M/jRARouLgnVBjfkByA== X-Google-Smtp-Source: APXvYqxpycbrhhLCRvVTJ0DVxU76eO0umKSIdwQi71CUk7Wj/lIJkweXDoMqcaSik/bao6MFxLxAA9MT8POGLPAMQUg= X-Received: by 2002:a37:7bc7:: with SMTP id w190mr5615625qkc.215.1569601326877; Fri, 27 Sep 2019 09:22:06 -0700 (PDT) MIME-Version: 1.0 References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> In-Reply-To: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> From: Warner Losh Date: Fri, 27 Sep 2019 10:21:55 -0600 Message-ID: Subject: Re: watchdogd stat location To: mike tancsa Cc: freebsd-embedded X-Rspamd-Queue-Id: 46fxrx5hLfz41GD X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=NFjuf09w; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.85 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; 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)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[b.2.7.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]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.85)[ip: (-9.45), 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]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" 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 16:22:10 -0000 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 box > is not rebooting via the hardware watchdog. It seems to fail to reboot > 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, but > would it be safer to change the default directory where the stat is done > 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 != NULL) > failed = system(test_cmd); > else > - failed = stat("/etc", &sb); > + failed = stat("/boot", &sb); > > error = watchdog_getuptime(&ts_end); > if (error) { > I think this is good. Warner 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 From owner-freebsd-embedded@freebsd.org Fri Sep 27 19:21:18 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 E97DA12AB63 for ; Fri, 27 Sep 2019 19:21:18 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g1qf0pqdz4Crh for ; Fri, 27 Sep 2019 19:21:18 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:6102:ebfe:a220:3977] ([IPv6:2607:f3e0:0:4:6102:ebfe:a220:3977]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTPS id x8RJLDv3068703 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO); Fri, 27 Sep 2019 15:21:13 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: watchdogd stat location To: Oleksandr Rybalko Cc: freebsd-embedded References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> From: mike tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hflX4nXqhenaNiia4iaZ9ft3I1ebd7GEbGnsWCvAnob5MvDZyStDAuRxPJK1ya/s +6rOvr+eQiXYNVvfBhrCfrtR/esSkitBGxhUkBjOti8QwzD71JVF5YaOjBAs7jZUKyLGj0kW yDg4jUndudWU7G2yc9GwpHJ9aRSUN8e/mWdIogK0v+QBHfv/dsI6zVB7YuxCC9Fx8WPwfhDH VZC4kdYCQWKXrm7yb4TiVdBh5kgvlO9q3js1yYdfR1x8mjK2bH2RSv4bV3zkNmsDCIxjABEB AAG0HW1pa2UgdGFuY3NhIDxtaWtlQHNlbnRleC5uZXQ+iQFUBBMBCAA+FiEEmuvCXT0aY6hs 4SbWeVOEFl5WrMgFAlywzOYCGwMFCQHhM4AFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ eVOEFl5WrMhnPAf7Bf+ola0V9t4i8rwCMGvzkssGaxY/5zNS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ELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> Date: Fri, 27 Sep 2019 15:21:14 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46g1qf0pqdz4Crh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::18 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-4.24 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sentex.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(-1.94)[ip: (-1.11), ipnet: 2607:f3e0::/32(-4.94), asn: 11647(-3.56), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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:21:19 -0000 On 9/27/2019 3:19 PM, Oleksandr Rybalko wrote: > > пт, 27 вер. 2019 о 19:22 Warner Losh > пише: > > 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 box > > is not rebooting via the hardware watchdog.   It seems to fail > to reboot > > 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, but > > would it be safer to change the default directory where the stat > is done > > to something that is generally not mounted via ramdisk ? > > > Why not just stat "/". > > I think embedded devices may have monolithic kernel w/o any loadable > modules and book config. > I am all for that too. Just something other than /etc or /var which are often mounted on ramdisk.     ---Mike From owner-freebsd-embedded@freebsd.org Fri Sep 27 19:53:22 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 9450612B612 for ; Fri, 27 Sep 2019 19:53:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (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 46g2Xd4Rxpz4FSw for ; Fri, 27 Sep 2019 19:53:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x729.google.com with SMTP id u186so2961403qkc.5 for ; Fri, 27 Sep 2019 12:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wasbeVCW2iasYPjmYRXN0+KqK28Wd3Je+P6pkrADSBc=; b=Z2FYAKWHXNUU2lFLjS/nI8Qt5w8/z+2P6ECCk/csQesd18noDQr/zOaDLDKgwzTDw4 Sy5KmnkT2+wNPNmHETCUaSdqMoijB1niqS+xqn8wZt9cyerRxp0Yyyqtea02I6DKYPLZ 8SJKU7oSOVYn6gGdwTJ63/MAHPJ7jCFU8Wtcz/fPq8EbLwDfe/zGqaQHz3vbF47e6WuL 29Hc7hqdE4R1BDUEgyDKJAKClPPRzd+CZIi3vVSjCvhPCXSSoE6E8sPV5qMv9Ae34aLo 5hrmn3zmwAzNdGC5k6S7YbySiyhCCf9SESyuWML6OVqTxIWxEx4q3/liRwVuiZmnHoK+ eBZQ== 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=wasbeVCW2iasYPjmYRXN0+KqK28Wd3Je+P6pkrADSBc=; b=MfWj9Gz//UH1brCKVOdtz/r887vb+MlYrOCiLL7abS9lJYv351L0KhOTRhTcyQd5jS IS/cnr9jP1gFGlrjqUqtWGQv6vDVQ5+oCrQo9xI9M1mk6HyrqTmc2HFIiA/FB+KJM1hH 2cAJZxYx5ajyQ7xYYjYA7izfLBigMMgr2y/puISyDuwaEvEI+IrxtGFpHYaJLSxIZA8j LCC9fIYOt95CHtx9qACGUhqBEygBeOxM5crNFCFh2SbjVOLLvfmkKghAANa/gF/9vZw/ mfEhxTtVfYC4pat86y2F4XRCwac+lYfDXg+KnZvTH3AdFZA8o9RM2o0oydDk2uGGhyS0 yUAg== X-Gm-Message-State: APjAAAWbsAAt5SE6SZ51GKv+XBiDqFNqOzpm78wsmQk8aDEURYCOCbi+ MFiszZ+gmhWdYlKLf/IgOvG/KxQBhj1nzwhVgQx4KA== X-Google-Smtp-Source: APXvYqzn7JYXsVoQGZ/h5FjwkMSB4L0Fi+QQs8vrmpg1R9LGouMvZG7sAl1o0GU529A7iZgIAg4zoQZeJaOHqdGHmQM= X-Received: by 2002:a37:7bc7:: with SMTP id w190mr6749314qkc.215.1569613999842; Fri, 27 Sep 2019 12:53:19 -0700 (PDT) MIME-Version: 1.0 References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> In-Reply-To: <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> From: Warner Losh Date: Fri, 27 Sep 2019 13:53:07 -0600 Message-ID: Subject: Re: watchdogd stat location To: Mike Tancsa Cc: Aleksandr Rybalko , freebsd-embedded X-Rspamd-Queue-Id: 46g2Xd4Rxpz4FSw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=Z2FYAKWH; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::729) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.82 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.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)[bsdimp.com]; URI_COUNT_ODD(1.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[9.2.7.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]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.82)[ip: (-9.27), 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]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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:53:22 -0000 On Fri, Sep 27, 2019, 1:21 PM mike tancsa wrote: > On 9/27/2019 3:19 PM, Oleksandr Rybalko wrote: > > > > =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 box > > > is not rebooting via the hardware watchdog. It seems to fail > > to reboot > > > 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, but > > > would it be safer to change the default directory where the stat > > is done > > > to something that is generally not mounted via ramdisk ? > > > > > > Why not just stat "/". > > > > I think embedded devices may have monolithic kernel w/o any loadable > > modules and book config. > > > I am all for that too. Just something other than /etc or /var which are > often mounted on ramdisk. > I think that / is too special to cause disk IO to ever happen. Other dirs will sometimes not be in the cache.... The notion here, perhaps bogus, is that we want to check the root FS is sane. The stat(2) is a cheap way to do this that will eventually fail if / goes wonky enough. It's weak. Warner ---Mike > > _______________________________________________ > 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 > " > From owner-freebsd-embedded@freebsd.org Fri Sep 27 20:30:22 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 6DA1512BFD5 for ; Fri, 27 Sep 2019 20:30:22 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g3MK62klz4HHp for ; Fri, 27 Sep 2019 20:30:21 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [IPv6:2607:f3e0:0:4:6102:ebfe:a220:3977] ([IPv6:2607:f3e0:0:4:6102:ebfe:a220:3977]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTPS id x8RKUIHi072621 (version=TLSv1.2 cipher=AES128-SHA bits=128 verify=NO); Fri, 27 Sep 2019 16:30:19 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: watchdogd stat location To: Warner Losh Cc: Aleksandr Rybalko , freebsd-embedded References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> From: mike tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; keydata= mQENBFywzOMBCACoNFpwi5MeyEREiCeHtbm6pZJI/HnO+wXdCAWtZkS49weOoVyUj5BEXRZP xflV2ib2hfl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GRaeigGppTxzAHVjf5 o9KKu4O7gC2KKVHPegbXS+GK7DU0fjzX57H5bZ6komE5eY4p3oWT/CwVPSGfPs8jOwARAQAB iQE8BBgBCAAmFiEEmuvCXT0aY6hs4SbWeVOEFl5WrMgFAlywzOQCGwwFCQHhM4AACgkQeVOE Fl5WrMhmjQf/dBCjAVn1J0GzSsHiLvSAQz1cchbdy8LD0Tnpzjgp5KLU7sNojbI8vqt4yKAi cayI88j8+xxNXPMWM4pHELuUuVHS5XTpHa/wwulUtI5w/zyKlUDsIvqTPZLUEwH7DfNBueVM WyNaIjV2kxSmM8rNMC+RkgyfbjGLCkmWsMRVuLIUYpl5D9WHmenUbiErlKU2KvEEXEg/aLKq 3m/AdM9RAYsP9O4l+sAZEfyYoNJzDhTZMzn/9Q0uFPLK9smDQh4WBTFaApveVJPHRKmHPoNF Xxj+yScYdQ4SKH34WnhNSELvnZQ3ulH5tpASmm0w+GxfZqSc8+QCwoKtBRDUxoE56A== Message-ID: Date: Fri, 27 Sep 2019 16:30:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46g3MK62klz4HHp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:3::18 as permitted sender) smtp.mailfrom=mike@sentex.net X-Spamd-Result: default: False [-4.28 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ptr]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sentex.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; IP_SCORE(-1.98)[ip: (-1.31), ipnet: 2607:f3e0::/32(-4.94), asn: 11647(-3.56), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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 20:30:22 -0000 On 9/27/2019 3:53 PM, Warner Losh wrote: > > > > I am all for that too. Just something other than /etc or /var > which are > often mounted on ramdisk. > > > I think that / is too special to cause disk IO to ever happen. Other > dirs will sometimes not be in the cache.... The notion here, perhaps > bogus, is that we want to check the root FS is sane. The stat(2) is a > cheap way to do this that will eventually fail if / goes wonky enough. > It's weak. > > Would something like this buy any extra sanity ? or not worth it. I guess fancier checks belong in a passed program # diff -u watchdogd.c.orig watchdogd.c --- watchdogd.c.orig    2019-09-27 16:27:14.456973000 -0400 +++ watchdogd.c 2019-09-27 16:27:18.904885000 -0400 @@ -364,9 +364,23 @@                   if (test_cmd != NULL)                         failed = system(test_cmd); -               else -                       failed = stat("/etc", &sb); - +               else { + +                       srand(time(NULL)); +                       switch(rand() % 4) { +                               case 0: +                                       failed = stat("/", &sb); +                                       break; +                               case 1: +                                       failed = stat("/bin", &sb); +                                       break; +                               case 2: +                                       failed = stat("/sbin", &sb); +                                       break; +                               default: +                                       failed = stat("/usr", &sb); +                       } +               }                 error = watchdog_getuptime(&ts_end);                 if (error) {                         end_program = 1; From owner-freebsd-embedded@freebsd.org Fri Sep 27 20:37:56 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 BBFFF12C3FB for ; Fri, 27 Sep 2019 20:37:56 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-vs1-xe35.google.com (mail-vs1-xe35.google.com [IPv6:2607:f8b0:4864:20::e35]) (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 46g3X36LRqz4HqJ for ; Fri, 27 Sep 2019 20:37:55 +0000 (UTC) (envelope-from ray@ddteam.net) Received: by mail-vs1-xe35.google.com with SMTP id m22so2744655vsl.9 for ; Fri, 27 Sep 2019 13:37:55 -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=evVAOLtBkkw309pT8y2uE2KkQxE3sBRM2i2leUhsxfY=; b=NYiBvPMAeW8xVAdddHAQGU+s6bMyZuGLci9d6G/jzEcpuFbuTc4jGsBe2Q9FEv5bIE CGLYkTsHAPSwIx8tBKHinGzKp+5/epC8Axlql7HJGNiY84LAit4RfKIo4TCgklR5bdWk laGIVvYFm42y/6ElW5hIURM25gKZZok1J5MT6auo9cQ+EO4nULtOvVXM+Bj1KhZWPuyt S8oSfQuZc93dCx1OxbvOZzqzyFigZDHWQYX3rc/7qyklh+x9F+kqE9vmlICpj0KJgLX1 o++LjoN1HXHNj+Z3Uj0dFHdczOQuKIW4KqRh/BshOgBXqfpuUicq8PqSbC1RYGYP7PRO Wlcw== 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=evVAOLtBkkw309pT8y2uE2KkQxE3sBRM2i2leUhsxfY=; b=G+aWIBWyz+4u57ZAhvMcSPhOHL70/vxGDGeb/dkU/+ObmLXzGYBkRtjZMMQs0J5mg9 LGD/GhVt+J/ck+UZa9NO9tjUT1ngVZ2aMg27R7EJBnACSN0A5yUVSXzqWqp3EK71sm7l 1j+Q5MC8wGW7vXsVmP4g34rAM/vfjk/YIX67keto8WhNqfD3hJNiJIxSFt3eQtJZLg4g twG0+JK5AFWvvd9DaLsjkSlY3dG6DXwAvaHS/kvtm0FjwqdaXTEo7TQ9GapngrBRor6z wwTTYy66HWfWhD3vXybpvZqOXsQ08ixYLaSrViYu91AtUe3MIadxTGOX007RDVoB0026 EFWQ== X-Gm-Message-State: APjAAAVsLf5K0FY/oNR41aEV8WhYgacwfFTVJfM+Kd4itx2VkAEygLJQ fEfhaSktugkfUgAbrMNdUGhtn+Z79Eek1CxaRzJrGukNCtg= X-Google-Smtp-Source: APXvYqxi5ia8iFsxCLd9t+FykgC6vG/9SJdwLNv0rPUBTZ0pt3O6SqjXAKrIFuVnvGLDQRr7+jPbXek++LM5mzDHQFY= X-Received: by 2002:a67:b44b:: with SMTP id c11mr3497141vsm.137.1569616674782; Fri, 27 Sep 2019 13:37:54 -0700 (PDT) MIME-Version: 1.0 References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> In-Reply-To: From: Oleksandr Rybalko Date: Fri, 27 Sep 2019 23:37:43 +0300 Message-ID: Subject: Re: watchdogd stat location To: mike tancsa Cc: Warner Losh , freebsd-embedded X-Rspamd-Queue-Id: 46g3X36LRqz4HqJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ddteam-net.20150623.gappssmtp.com header.s=20150623 header.b=NYiBvPMA; dmarc=none; spf=softfail (mx1.freebsd.org: 2607:f8b0:4864:20::e35 is neither permitted nor denied by domain of ray@ddteam.net) smtp.mailfrom=ray@ddteam.net X-Spamd-Result: default: False [-5.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,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]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ddteam-net.20150623.gappssmtp.com:+]; MIME_BASE64_TEXT(0.10)[]; RCVD_IN_DNSWL_NONE(0.00)[5.3.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(-2.80)[ip: (-9.16), 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 20:37:56 -0000 /sbin and /usr may fail in many case. Maybe readdir, then rand stat? =D0=BF=D1=82, 27 =D0=B2=D0=B5=D1=80. 2019 =D0=BE 23:30 mike tancsa =D0=BF=D0=B8=D1=88=D0=B5: > On 9/27/2019 3:53 PM, Warner Losh wrote: > > > > > > > I am all for that too. Just something other than /etc or /var > > which are > > often mounted on ramdisk. > > > > > > I think that / is too special to cause disk IO to ever happen. Other > > dirs will sometimes not be in the cache.... The notion here, perhaps > > bogus, is that we want to check the root FS is sane. The stat(2) is a > > cheap way to do this that will eventually fail if / goes wonky enough. > > It's weak. > > > > > Would something like this buy any extra sanity ? or not worth it. I > guess fancier checks belong in a passed program > > > # diff -u watchdogd.c.orig watchdogd.c > --- watchdogd.c.orig 2019-09-27 16:27:14.456973000 -0400 > +++ watchdogd.c 2019-09-27 16:27:18.904885000 -0400 > @@ -364,9 +364,23 @@ > > if (test_cmd !=3D NULL) > failed =3D system(test_cmd); > - else > - failed =3D stat("/etc", &sb); > - > + else { > + > + srand(time(NULL)); > + switch(rand() % 4) { > + case 0: > + failed =3D stat("/", &sb); > + break; > + case 1: > + failed =3D stat("/bin", &sb); > + break; > + case 2: > + failed =3D stat("/sbin", &sb); > + break; > + default: > + failed =3D stat("/usr", &sb); > + } > + } > error =3D watchdog_getuptime(&ts_end); > if (error) { > end_program =3D 1; > > > > > --=20 WBW ------- Rybalko Aleksandr From owner-freebsd-embedded@freebsd.org Fri Sep 27 21:31:39 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 7C27212E02D for ; Fri, 27 Sep 2019 21:31:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 46g4k22NCcz4PnS for ; Fri, 27 Sep 2019 21:31:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id q203so3206983qke.1 for ; Fri, 27 Sep 2019 14:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DyCmALwV3ldKmGeKvnv9ZJAI+1s6g9rSp6sdfDlLwIY=; b=t2vwjBwecQGv+XHdcLLy1i1frM2h/cvRadNn9AdUhN9ZdFrK+sC/6k5yfHjXo+/J+T RZYVg9X/ypkgsSCovuSd6eTcUPFScCm1tWRKLwjcus4c/Fb0TV8J9SNSEdo3rKHuz7BY 0ktopvnmRnTa9uG+zHqjRFNCQJi+QXhXGHZ9Aq8NfAn1r8/MnZ8YmMkmuov76kdGbvuR aJL1dJdM/f8zJ1tPkk3eN2zK1TygexMJa+qFWvUmSOnYKyI/rGCh6hXZEljEDDpgojd+ BXbu/BwoFjcxE3zmPCgNBcW5dTABYLpgUVdFxjHiIf8pERc2NOcvDRnJG6uS6XAkhAZ2 C16A== 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=DyCmALwV3ldKmGeKvnv9ZJAI+1s6g9rSp6sdfDlLwIY=; b=rwbpoip3BIwhI+jv5b2+dQ4YgfhtRSijV9wmnHVsTSXEbruIsW53HjoOvk93+VELRn 3bxTRLPTFe2ItJmgDizxi891t7ubezGPXjt263ubfl2xpYzRgg3J7rXXezV8JTXzYbh/ XSsR5eMTzWaR4nQG+2DxJ0/bQx2ojT4H1W6P00D9TOue1NCmodJ5bUfUdHGMydMN8fgA PfEhQQlJMtr29NUlWl9HtsfIiT6qSrrEfHRHw/pqgnj9FUvHYMKDTDqsWa4pWNpph4X8 pKJGfd0u4+0OW1sAkKIHrDJYdDTUSAlw9WNxoVl0tpk9ty1ExWeazrp3Wp/RX99kluNp TocQ== X-Gm-Message-State: APjAAAXhyG3a8NPTk3IQ6HCpy/mBwrC+oyYTNgMyaksRYOQoFwle5xMP 3ktk+LiwjwYdj+j5YyQRi8rGwouQzlD9lF8ICOoSBw== X-Google-Smtp-Source: APXvYqykRhDbh/zmcrbnS5mkBdhXw4FUbeRH2bYckyitG/CQRKXpwm/Jbn0+RzNn7r3oV9qTGHxmZtEE6haL6Si2H0U= X-Received: by 2002:a05:620a:6af:: with SMTP id i15mr6946967qkh.380.1569619897010; Fri, 27 Sep 2019 14:31:37 -0700 (PDT) MIME-Version: 1.0 References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> In-Reply-To: From: Warner Losh Date: Fri, 27 Sep 2019 15:31:25 -0600 Message-ID: Subject: Re: watchdogd stat location To: mike tancsa Cc: Aleksandr Rybalko , freebsd-embedded X-Rspamd-Queue-Id: 46g4k22NCcz4PnS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=t2vwjBwe; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-4.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.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)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MIME_BASE64_TEXT(0.10)[]; RCVD_IN_DNSWL_NONE(0.00)[d.2.7.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]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.84)[ip: (-9.36), 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]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" 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 21:31:39 -0000 On Fri, Sep 27, 2019 at 2:30 PM mike tancsa wrote: > On 9/27/2019 3:53 PM, Warner Losh wrote: > > > > > > > I am all for that too. Just something other than /etc or /var > > which are > > often mounted on ramdisk. > > > > > > I think that / is too special to cause disk IO to ever happen. Other > > dirs will sometimes not be in the cache.... The notion here, perhaps > > bogus, is that we want to check the root FS is sane. The stat(2) is a > > cheap way to do this that will eventually fail if / goes wonky enough. > > It's weak. > > > > > Would something like this buy any extra sanity ? or not worth it. I > guess fancier checks belong in a passed program > > > # diff -u watchdogd.c.orig watchdogd.c > --- watchdogd.c.orig 2019-09-27 16:27:14.456973000 -0400 > +++ watchdogd.c 2019-09-27 16:27:18.904885000 -0400 > @@ -364,9 +364,23 @@ > > if (test_cmd != NULL) > failed = system(test_cmd); > - else > - failed = stat("/etc", &sb); > - > + else { > + > + srand(time(NULL)); > + switch(rand() % 4) { > + case 0: > + failed = stat("/", &sb); > + break; > + case 1: > + failed = stat("/bin", &sb); > + break; > + case 2: > + failed = stat("/sbin", &sb); > + break; > + default: > + failed = stat("/usr", &sb); > + } > + } > error = watchdog_getuptime(&ts_end); > if (error) { > end_program = 1; > I don't think the rand helps at all. I think you'd really rather do things sequentially. And this introduces more assumptions about the underlying filesystem(s). Warner From owner-freebsd-embedded@freebsd.org Sat Sep 28 19:30:41 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 8E9B612E4E4 for ; Sat, 28 Sep 2019 19:30:41 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46gf012gyvz4Vk7 for ; Sat, 28 Sep 2019 19:30:41 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1569699039; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MEMrTct8MIOi0guatnWrZAqP/FE7wWMLwdB1sba6x3aewzUjjuqUp0XA1Hb1xVUC2AOVRfyQSQTFC biMj3QaDL4ktdld227up2xrba9frZIqvS9SZoaqjXi/N/Vd9mtUl1Jl2cD0M6Czh0HYNAcMQpj6DQT xdYBSJH/e4ViHkrMfIDhw0Vw2slgrEzV44nUL3jAE2VYdUA+hbqXlN8xY88V72hIspcba3AABwX0ra 5vgZY4WaNqLJfpuXiaqL/VIDUtZR/A4Ot+vtBUmZPWVQQXn5Xr/wQmhAYRXynzZ87okmzyXCaSkqIc HNYWbXJif5GX4M3jantu/TFWGey6Qwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=X1v/jdV+lEXtxF2EU87QFgR9hoMMbvSGxG+UVIzTKr8=; b=lEehjVLTkJRchAyZlcS7zvZodxvCmWXu8hIrFJTYomaXuOGb2NQFcWRMwNOZWJFF6JhcKt6QwhQaZ keHPsMuApF41UVq5dsA973OXEWpHzG52/Rb/k9Mhj05b2WBE0NGbXVh8TOHBMjDmCO0vBTb0oFGIBx Y3BVpA3J5XGE1dfHrcMgZgTfgZbB7nQ7+mkTS0nBlYGuagQY2M0UmlBmdM1SWiu5C1PhDqol7tkX5O ieAIalAUUsILUqFLECId8smjN4L6W5kU1cRyIddgfK/ctFKsPdZ2o4JgPk7vMPAQu8ebXpWNdRMjzt IBSCGvBn5ApQ3VH/0e9jw9huWrOvGFg== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=X1v/jdV+lEXtxF2EU87QFgR9hoMMbvSGxG+UVIzTKr8=; b=gyguKDtumBItEK44Y94sr4aANRYmY5nccLSdFwN66pig+Z2+8NQrPskRtbIo8Qvz/in3hZwhAmaQw kszaN5JmkS3+A5lckCk9cYyAc1qYbA7Lm7km7jGJHd9e150jVeeBTcWsuG1PbyFSuvzV3NCARCV6Jw 0HuZQGfLiWBNsaLINwGUu+vj1kUcV9ufB+0HS4czGGFy3rKlURtfrySv8Je978OtsN6cXQ0s2OOxpA 3bV9pjc1q6qQMlfgbSh/H5irTA+YmMbYlUwW2QkOopA7ibQkbKcLOHSrjKgb8R7HiftfxTQvo8reeQ dTYJGcl0hF1R2zPoKxPddTHOCjzrdJA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 72634348-e226-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 72634348-e226-11e9-85ed-13b9aae3a1d2; Sat, 28 Sep 2019 19:30:38 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x8SJUaWu045110; Sat, 28 Sep 2019 13:30:36 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <817c7ed712d6b7da3015b7312be485a9044b14e1.camel@freebsd.org> Subject: Re: watchdogd stat location From: Ian Lepore To: Warner Losh , mike tancsa Cc: freebsd-embedded Date: Sat, 28 Sep 2019 13:30:36 -0600 In-Reply-To: References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46gf012gyvz4Vk7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.97)[-0.970,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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: Sat, 28 Sep 2019 19:30:41 -0000 On Fri, 2019-09-27 at 15:31 -0600, Warner Losh wrote: > On Fri, Sep 27, 2019 at 2:30 PM mike tancsa wrote: > > > On 9/27/2019 3:53 PM, Warner Losh wrote: > > > > > > > > > > I am all for that too. Just something other than /etc or /var > > > which are > > > often mounted on ramdisk. > > > > > > > > > I think that / is too special to cause disk IO to ever happen. > > > Other > > > dirs will sometimes not be in the cache.... The notion here, > > > perhaps > > > bogus, is that we want to check the root FS is sane. The stat(2) > > > is a > > > cheap way to do this that will eventually fail if / goes wonky > > > enough. > > > It's weak. > > > > > > > > > > Would something like this buy any extra sanity ? or not worth it. I > > guess fancier checks belong in a passed program > > > > > > # diff -u watchdogd.c.orig watchdogd.c > > --- watchdogd.c.orig 2019-09-27 16:27:14.456973000 -0400 > > +++ watchdogd.c 2019-09-27 16:27:18.904885000 -0400 > > @@ -364,9 +364,23 @@ > > > > if (test_cmd != NULL) > > failed = system(test_cmd); > > - else > > - failed = stat("/etc", &sb); > > - > > + else { > > + > > + srand(time(NULL)); > > + switch(rand() % 4) { > > + case 0: > > + failed = stat("/", &sb); > > + break; > > + case 1: > > + failed = stat("/bin", &sb); > > + break; > > + case 2: > > + failed = stat("/sbin", > > &sb); > > + break; > > + default: > > + failed = stat("/usr", &sb); > > + } > > + } > > error = watchdog_getuptime(&ts_end); > > if (error) { > > end_program = 1; > > > > I don't think the rand helps at all. I think you'd really rather do > things > sequentially. And this introduces more assumptions about the > underlying > filesystem(s). > > Warner > If we want to be sure to force physical IO, how about dd if=/ of=/dev/null count=1 ? But I question the premise of forcing physical IO as being somehow a better indicator of a non-hung system. I think it's just a better indicator of the sdcard problem that Mike is experiencing. For anyone else, forcing periodic physical IO is going to do annoying things like spin up idle drives. -- Ian From owner-freebsd-embedded@freebsd.org Sat Sep 28 19:45:46 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 5C14812E83C for ; Sat, 28 Sep 2019 19:45:46 +0000 (UTC) (envelope-from mike@sentex.net) Received: from pyroxene.sentex.ca (pyroxene.sentex.ca [IPv6:2607:f3e0:0:3::18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "pyroxene.sentex.ca", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46gfKQ1QCLz4WDK; Sat, 28 Sep 2019 19:45:46 +0000 (UTC) (envelope-from mike@sentex.net) Received: from [192.168.43.26] (saphire3.sentex.ca [192.168.43.26]) by pyroxene.sentex.ca (8.15.2/8.15.2) with ESMTP id x8SJjiLl056416; Sat, 28 Sep 2019 15:45:44 -0400 (EDT) (envelope-from mike@sentex.net) Subject: Re: watchdogd stat location To: Ian Lepore , Warner Losh Cc: freebsd-embedded References: <5eba25eb-9ba4-0c93-27c8-e834491298ad@sentex.net> <83831ae6-9275-4f0c-a23d-c9cca3dc28f4@sentex.net> <817c7ed712d6b7da3015b7312be485a9044b14e1.camel@freebsd.org> From: Mike Tancsa Openpgp: preference=signencrypt Autocrypt: addr=mike@sentex.net; prefer-encrypt=mutual; keydata= mQENBEzcA24BCACpwI/iqOrs0GfQSfhA1v6Z8AcXVeGsRyKEKUpxoOYxXWc2z3vndbYlIP6E YJeifzKhS/9E+VjhhICaepLHfw865TDTUPr5D0Ed+edSsKjlnDtb6hfNJC00P7eoiuvi85TW F/gAxRY269A5d856bYrzLbkWp2lKUR3Bg6NnORtflGzx9ZWAltZbjYjjRqegPv0EQNYcHqWo eRpXilEo1ahT6nmOU8V7yEvT2j4wlLcQ6qg7w+N/vcBvyd/weiwHU+vTQ9mT61x5/wUrQhdw 2gJHeQXeDGMJV49RT2EEz+QVxaf477eyWsdQzPVjAKRMT3BVdK8WvpYAEfBAbXmkboOxABEB AAG0HG1pa2UgdGFuY3NhIDxtaWtlQHNlbnRleC5jYT6JATgE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ztMVh9qDcdP5tzANW5J7nvgXjska+VFGY ryZK4SPDczh74mn6GI/+RBi7OUzXXPgpPBrhS5FByjwCqjjsSpTjTds+NGIY Organization: Sentex Communications Message-ID: Date: Sat, 28 Sep 2019 15:45:43 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <817c7ed712d6b7da3015b7312be485a9044b14e1.camel@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 46gfKQ1QCLz4WDK X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-5.99 / 15.00]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] 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: Sat, 28 Sep 2019 19:45:46 -0000 On 9/28/2019 3:30 PM, Ian Lepore wrote: > If we want to be sure to force physical IO, how about dd if=/ > of=/dev/null count=1 ? > > But I question the premise of forcing physical IO as being somehow a > better indicator of a non-hung system. I think it's just a better > indicator of the sdcard problem that Mike is experiencing. For anyone > else, forcing periodic physical IO is going to do annoying things like > spin up idle drives. I think in my case, I am going to need to do that.  I was hoping doing a simple stat on / or /boot would do the trick to recover from mmcsd0: Error indicated: 1 Timeout g_vfs_done():mmcsd0s1a[READ(offset=267358208, length=4096)]error = 5 vnode_pager_generic_getpages_done: I/O read error 5 vm_fault: pager read error, pid 1 (init) sdhci_pci0-slot0: Got AutoCMD12 error 0x0001, but there is no active command. sdhci_pci0-slot0: ============== REGISTER DUMP ============== sdhci_pci0-slot0: Sys addr: 0x74ee0000 | Version:  0x00001001 sdhci_pci0-slot0: Blk size: 0x00005200 | Blk cnt:  0x00000008 sdhci_pci0-slot0: Argument: 0x0007f817 | Trn mode: 0x00000037 sdhci_pci0-slot0: Present:  0x01ff0000 | Host ctl: 0x00000007 sdhci_pci0-slot0: Power:    0x0000000f | Blk gap:  0x00000000 sdhci_pci0-slot0: Wake-up:  0x00000000 | Clock:    0x00000007 sdhci_pci0-slot0: Timeout:  0x0000000d | Int stat: 0x00000000 sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb sdhci_pci0-slot0: AC12 err: 0x00000001 | Host ctl2:0x00000080 sdhci_pci0-slot0: Caps:     0x21fe32b2 | Caps2:    0x00000070 sdhci_pci0-slot0: Max curr: 0x00c80064 | ADMA err: 0x00000000 sdhci_pci0-slot0: ADMA addr:0x00000000 | Slot int: 0x000000ff sdhci_pci0-slot0: =========================================== g_vfs_done():mmcsd0s1a[READ(offset=267358208, length=4096)]error = 5 vnode_pager_generic_getpages_done: I/O read error 5 but it looks like no dice, at least in the one case I hit over the weekend. However from the captured logs, not sure if watchogd really got armed or not. I think doing an actual raw read is the way to go, but to put that in watchdogd feels like it would violate POLA.  I think instead, I will make it an external command as it will fix my needs, or even roll my own watchdogd which might even be better for me.     ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 x203 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada