From nobody Thu May 4 20:59:18 2023 X-Original-To: stable@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 4QC5lx2ylpz49X2c for ; Thu, 4 May 2023 20:59:25 +0000 (UTC) (envelope-from SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QC5lv5q3nz3Lct; Thu, 4 May 2023 20:59:23 +0000 (UTC) (envelope-from SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of "SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz" has no SPF policy when checking 94.124.105.4) smtp.mailfrom="SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz"; dmarc=none Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 36054D78FD; Thu, 4 May 2023 22:59:21 +0200 (CEST) Received: from [192.168.145.50] (ip-89-177-27-225.bb.vodafone.cz [89.177.27.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 5BB43D78B7; Thu, 4 May 2023 22:59:18 +0200 (CEST) Message-ID: <7afb4128-3eef-f2d9-07c0-035a237cba45@quip.cz> Date: Thu, 4 May 2023 22:59:18 +0200 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: etcupdate created empty files = system unbootable Content-Language: cs-Cestina From: Miroslav Lachman <000.fbsd@quip.cz> To: Dimitry Andric Cc: Dave Cottlehuber , stable@freebsd.org References: <312ae63f-4fab-e194-c603-a85fd11f6edd@quip.cz> <0db3bbf1-9e98-d721-c734-fdfe2483cbf0@quip.cz> <95169DC0-5DB6-41D1-8B04-5A450094529F@FreeBSD.org> <19399711-4a71-7025-7ceb-8dd481ec0038@quip.cz> In-Reply-To: <19399711-4a71-7025-7ceb-8dd481ec0038@quip.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-1.74 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_LONG(-0.99)[-0.987]; NEURAL_HAM_MEDIUM(-0.95)[-0.952]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; R_SPF_NA(0.00)[no SPF record]; MLMMJ_DEST(0.00)[stable@freebsd.org]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=hJ80=AZ=quip.cz=000.fbsd@elsa.codelab.cz]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[quip.cz]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QC5lv5q3nz3Lct X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On 28/04/2023 16:24, Miroslav Lachman wrote: > On 28/04/2023 15:16, Dimitry Andric wrote: > >>> yes, I have Boot Environment created before system upgrade (I always >>> create BE before system or pkg upgrades) and there are automatic >>> snapshot from cron. >>> >>> Should I try to clone it and reproduce it again? >>> >>> I will file a PR today. >> >> I have seen some bad behavior in the past from etcupdate, when you >> interrupted it (with control-C) at the 'wrong' time. In that case, it >> would have built up a bad tree in /var/db/etcupdate, and as a result >> *delete* almost all files in /etc! However, this problem has been >> solved, as far as I know, and the effect was definitely not zero-sized >> files, but really deleted ones. >> >> If you have a good way of reproducing it, I think the etcupdate >> maintainers will be interested enough, moreover since mergemaster is >> going to go away. > > I have saved screens of the whole upgrade process so I am sure > everything was fine without any error printed on the screen, nothing was > interrupted etc. but the result was more than 80 empty files. > > And the next thing which bothers me there is no way to fix the half > updated state of /etc/ by etcupdate. I had to use mergemaster to fix it. > How can we fix something like this in 14 without mergemaster? I still don't know how to reproduce it / what is the root cause, but it has happend again. This is the resulting list of empty files after a "successful" run of etcupdate after upgrading from 12.3 to 13.2. # find /etc/ -type f -empty ! -mtime +15m -ls 65994 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/rc.firewall 66060 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/network.subr 65814 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/ssh/ssh_config 65813 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/ssh/moduli 98731 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/kyua/kyua.conf 65981 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/devd.conf 66070 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/local 66073 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/ctld 66402 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/netif 66404 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/routed 66197 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/ldconfig 66077 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/cleanvar 66088 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/fsck 66092 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/wpa_supplicant 66394 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/FILESYSTEMS 66397 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/dumpon 66172 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/jail 66334 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/nfsd 66101 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/hostid 66255 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/pf 66109 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/statd 66110 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/lockd 66112 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/archdep 66859 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/devmatch 66398 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/hostid_save 66234 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/ntpd 66290 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/tlsclntd 66130 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/mountd 66345 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/var_run 66143 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/dhclient 66146 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/motd 66150 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/mountlate 66158 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/tmp 66320 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/local_unbound 66862 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/os-release 66405 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/routing 66281 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/growfs_fstab 66181 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/bluetooth 66140 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/ipfw 66191 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/ipfs 66409 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zfs 66207 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/gssd 66411 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zvol 66861 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/linux 66215 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/hostapd 66227 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/syscons 66228 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/auditd 66308 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/tlsservd 66231 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/mountcritremote 67848 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/growfs 66410 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zfsbe 66359 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zfskeys 66367 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zpool 66376 0 -r-xr-xr-x 1 root wheel 0 May 4 22:19 /etc/rc.d/zpoolreguid 65860 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/defaults/rc.conf 66235 0 -rw------- 1 root wheel 0 May 4 22:19 /etc/defaults/devfs.rules 66062 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.sendmail.dist 65990 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.root.dist 67614 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.var.dist 65993 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.usr.dist 66373 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.include.dist 65985 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.debug.dist 67609 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.lib32.dist 66008 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mtree/BSD.tests.dist 66375 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/devd/hyperv.conf 66252 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/devd/zfs.conf 66834 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/devd/iwmbtfw.conf 66262 0 -rw-r--r-- 1 root wheel 0 May 4 22:21 /etc/inetd.conf 66303 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/services 65923 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/disktab 66291 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/freebsd.cf 66267 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/freebsd.submit.mc 66265 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/freebsd.mc 66287 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/Makefile 66318 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/submit.cf 66314 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/sendmail.cf 66294 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/freebsd.submit.cf 66001 0 -r--r--r-- 1 root wheel 0 May 4 22:19 /etc/mail/helpfile 65911 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/ttys 65929 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/libalias.conf 66111 0 -rw-r--r-- 1 root wheel 0 May 4 22:21 /etc/portsnap.conf 66178 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/regdomain.xml 66351 0 -r--r--r-- 1 root wheel 0 May 4 22:20 /etc/security/audit_event 66274 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/login.conf 66285 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/rc.initdiskless 65989 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/rc 66293 0 -rw-r--r-- 1 root wheel 0 May 4 22:19 /etc/rc.subr 66209 0 -rw-r--r-- 1 root wheel 0 May 4 22:20 /etc/motd.template Kind regards Miroslav Lachman