From nobody Fri Feb 24 21:05:02 2023 X-Original-To: freebsd-arm@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 4PNj8R1PtMz3twXc; Fri, 24 Feb 2023 21:05:11 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (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 (2048 bits) client-digest SHA256) (Client CN "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PNj8Q2BQcz3tBQ; Fri, 24 Feb 2023 21:05:10 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net; dmarc=none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 31OL53v4008207 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 24 Feb 2023 13:05:03 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 31OL53w4008206; Fri, 24 Feb 2023 13:05:03 -0800 (PST) (envelope-from fbsd) Date: Fri, 24 Feb 2023 13:05:02 -0800 From: bob prohaska To: freebsd-current@freebsd.org Cc: freebsd-arm@freebsd.org Subject: Timekeeping problem in /usr/src on new RPI aarch64 snapshot Message-ID: <20230224210502.GA8127@www.zefox.net> List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Result: default: False [-0.69 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.59)[-0.594]; MID_RHS_WWW(0.50)[]; WWW_DOT_DOMAIN(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org,freebsd-arm@freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_NA(0.00)[zefox.net]; RCVD_COUNT_THREE(0.00)[3]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PNj8Q2BQcz3tBQ X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N After installing FreeBSD-14.0-CURRENT-arm64-aarch64-RPI-20230223-fe5c211ba873-261074.img on a Pi3 and setting up the hard disk to use separate swap and /usr partitions an oddity came to light regarding dates. The image file was written to disk the night of the 23rd, from a Pi3 with a correctly-set time and date. It was left idle overnight, configured the morning of the 24th and booted without issue. It then cloned -current into /usr/src, at which point the time was noticed to be wrong, apparently fast. It turned out ntpdate wasn't running, so it was started and then tzsetup run. After a reboot the time reported correctly. However, make buildworld in /usr/src triggers an exhortation to "check your time" and refuses run further. running date on the system reports Fri Feb 24 12:49:41 PST 2023 but ls -l /usr/src reports time around Feb 24 19:10 an obvious inconsistency. Presumably just waiting until the system clock catches up with the /usr/src timestamps will fix the error. Is there a better method? Still, the date and time handling don't seem quite right. In at least one earlier instance it appeared that tzsetup altered the reported timeszone without shifting the time stamp by the UTC/PDT offset. I always thought timestamps were internally in UTC+timezone, displayed with the right offset. It looks to a casual observer like something else is going on. An earlier fiasco (on this same Pi3) included wildly wrong timestamps in a filesystem. The Pi3 has no hardware clock, how does it set time when booted without a reference? Thanks for reading, bob prohaska