From owner-freebsd-questions@freebsd.org Fri Mar 13 16:08:22 2020 Return-Path: Delivered-To: freebsd-questions@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 147F3263811 for ; Fri, 13 Mar 2020 16:08:22 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48f9bS3Xx7z42hb for ; Fri, 13 Mar 2020 16:08:20 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.7.217]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPA (Nemesis) id 1M4b5s-1jDKYQ36CU-001eN2; Fri, 13 Mar 2020 17:08:08 +0100 Date: Fri, 13 Mar 2020 17:08:08 +0100 From: Polytropon To: freebsd@dreamchaser.org Cc: FreeBSD Mailing List Subject: Re: "directory not empty", "no such file or directory" errors on upgrade Message-Id: <20200313170808.e9b1f4ad.freebsd@edvax.de> In-Reply-To: <38fde868-7d2b-d396-449b-973ac9c39963@dreamchaser.org> References: <20200312235749.5e10fb02.freebsd@edvax.de> <38fde868-7d2b-d396-449b-973ac9c39963@dreamchaser.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:69fs/I9Xhf5s7sd6K6vskWc4Xft+kVlM6ZKVyUzVaZLjSH9MctY uKBk7IYQz9qVSa3Dny314b773h8MmyL/3+4jOJo6bjZxrTIRYr0usZeZjjDC7mFwI/Gcb68 /8IQCqkKigXl088rUSQj2jQ52jecErpto/RVeu0buf3+thEZ1G9K8H8j0TIhuph1i+BV2DB MR8DNdANc06kaiQrDnrjQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:+CO01/9jUzU=:vX5YTVUb6d4QWtf9Q4+TxP VxG525YzxXZA2xAF4V2IfhCZa23YGGV1mP26KwO2EAT9j9DnB4g8hfUJrEBYUTCpJafB/4XzM Uf5blk0zoPYQBaGBsRWNuuW0EQb6WgPZEQKh5DhaWmXssC66McUEHwShnBgsX2pKHBgv4wotd MM/PfD+mTcdt3ZcEtGkuAgqHVr48F5VTc3I68sWlFc6mCYns0NOa+eQbMudsDqvTOk1DmIRsU ve5aRBm1V27Hjhhr6tq+UMGy3FRu6s7Gp6FQPC25T2ur4tlq3CSRBAiFEXHjD5m19vGH8tnYd RZldp0qA22IdVendcH36g27eAehESOzzhx49TL9R8BGlNYw6BQ/F3SjEtHh8W9ZEUox5uhe3u ChHK4QELQ349MrsNa3syi53mLiXL5cDvKW39y2Xr4JBb813VkgQ13d6NqnLkqrn6zBAhLhi21 uNGaS0QxN2J8TiM3/j75cTO3zdVZ9b5PjsNUtydSi4ae/FO4YosGVUKF6K2X/0coez58bEwUq vN2BbLPtKhC1V+jgEErlPdP0HIyDCAS0IGt8U9fqVwS4JTOExhWvJLXliISky6Q+m/jDnc7My +INnDnrq6NzApLT0JWfhR4QnOYht78+VcOLxDFvcEYVwSw/2PNFIRq4Ww+XhsfZeczcTxHE5S Fbh9r9zH7pZShCvelh5dBcPpqlcSp2lGZFb9kYKkoByy++STvgWwuqqy3IvsIlcbA2rST8L+z RwOJo3Vcnxk6OUE0ccVBJGtJ1fANBrR7/BATQ09ssRPDCE40DnmkcRCCIl5CKDPqVbFz7oQYp W3vGz4bi/ezpmAEe2dTlZx+R3BFHqDnH/1n/l6/98tmHn1CsvsRpJsfc3fNR9LOL8nilKon X-Rspamd-Queue-Id: 48f9bS3Xx7z42hb X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 217.72.192.74) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:217.72.192.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; RECEIVED_SPAMHAUS_PBL(0.00)[217.7.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.993,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.192.72.217.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.40)[ip: (-0.49), ipnet: 217.72.192.0/20(0.36), asn: 8560(2.17), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2020 16:08:22 -0000 On Fri, 13 Mar 2020 07:04:24 -0600, Gary Aitken wrote: > On 3/12/20 4:57 PM, Polytropon wrote: > > On Thu, 12 Mar 2020 13:03:27 -0600, Gary Aitken wrote: > >> Upgrading from 11.2-RELEASE to 11.3-RELEASE > >> > >> The final invoke of freebsd-update install completed with the following > >> messages: > >> > >> ///usr/src/sys/pc98/include/acpica_machdep.h no such file or directory > >> rmdir: ///usr/src/contrib/ofed/usr.lib directory not empty > >> rmdir: ///usr/src/contrib/ofed/usr.bin directory not empty > >> rmdir: ///usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer directory not empty > >> rmdir: ///usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer directory not empty > >> > >> The upgraded system has no > >> /usr/src/sys/pc98/ directory > >> > >> The files in > >> /usr/src/contrib/ofed/usr.lib > >> /usr/src/contrib/ofed/usr.bin > >> /usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer > >> /usr/src/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer > >> > >> appear to be old versions left over from the original 11.2 install > >> > >> Hints on the proper way to fix this? > > > > When I read such messages, the first thing that comes to mind > > is filesystem inconsistency. Reboot into single-user mode and > > run a forced (!) fsck on all file systems, maybe repeat it if > > needed. > > fsck reported all clean. Okay - that would have been the most obvious problem. :-) > > You probably don't have > > > > background_fsck="NO" > > > > in your /etc/rc.conf which in my opinion should be the default > > setting (instead of YES). See "man 8 fsck" for further options > > that might be needed. > > Thanks for the reminder; I used to have it set but on this rebuilt- > after-a-crash system lost it. As I said, I don't understand why this isn't the default. A faster boot process into a potentially unstable filesystem environment does not justify delegating low-level filesystem check (and repair, and if needed, user interaction) into the background. > > Things like "directory not empty" can also be due to files that > > haven't been removed. This is possible if the schg (immutable) > > flag has been set for a file; use "chflags noschg "; see > > "man 1 chflags" for details. > > > > First step: Always rule out the obvious. ;-) > > The remaining question is: > Are those directories supposed to be repopulated > with more recent versions? Or should they simply be removed? > If they need to be repopulated, how does one repopulate them? You can entirely remove /usr/src. Depending on your source retrieval method (freebsd-update, the "src" component, or a normal SVN checkout) will create any directories beneath /usr/src as they are needed. Probably a fresh new start for /usr/src would be a good idea. A way to identify offending files that stop you from removing /usr/src completely could be the following: # ls -Rlao /usr/src | grep "schg" However, it's rather untypical to have immutable files in the /usr/src subtree; they did at least sometimes appear (in the past) in /usr/obj. It could be possible that some other tool wrote to /usr/src and modified things it wasn't supposed to touch... -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...